LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-16-2008, 02:50 PM   #1
Frank64
Member
 
Registered: Feb 2008
Distribution: Kubuntu 19.10
Posts: 77

Rep: Reputation: 15
HowTo play .avi 5.1 Dolby sound encode AC3 pass through spdif


I give up.

I have searched the web and tried many things (config files, etc.) for 6hours straight. I cannot succeed but in getting sick. I might have to rollback to crappy windows just cuz I cannot play .AVI xvid files (DVD rips) with Dolby Digital 5.1 surround sound.

I have no problem to play full DVDs from disks through spdif and it's 5.1 surround, AC3 or DTS. But when I play a .AVI file which is a ripped sample of a full DVD, I cannot pass AC3 surround sound. This works very good under windows using AC3Filter, but under Linux I cannot get it to work! AC3Filter can encode any audio source to AC3 on-the-fly and send it over SPDIF to the receiver, which what I need.

When I force spdif output with
Code:
mplayer /moviename.avi -ao alsa:device=spdif
it does go through spdif, but only as 2-channels.

When I force spdif using AC3 with
Code:
mplayer /moviename.avi -ao alsa:device=spdif -ac hwac3
I get a codec error "Cannot find codec for audio format 0x55." This is probably ok cuz the audio is actually mp3 and not real AC3. But I want to encore the mp3 so it passes AC3 through spdif, which is what AC3Filter under windows does.

Anybody had this working?
 
Old 02-17-2008, 07:54 AM   #2
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Maybe I am misunderstanding completely, or just don't know enough about this area. But why would you want to play back mp3 sound as AC3? Are you looking for some way to fake 5.1 channels from a 2 channel input?

This package

http://tovid.wikia.com/wiki/Main_Page

looks like it will let you create DVDs from various formats, so would probably convert mp3 to AC3, but maybe not in real time for playback.
 
Old 02-17-2008, 12:43 PM   #3
Frank64
Member
 
Registered: Feb 2008
Distribution: Kubuntu 19.10
Posts: 77

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by maroonbaboon View Post
Maybe I am misunderstanding completely, or just don't know enough about this area. But why would you want to play back mp3 sound as AC3? Are you looking for some way to fake 5.1 channels from a 2 channel input?

This package

http://tovid.wikia.com/wiki/Main_Page

looks like it will let you create DVDs from various formats, so would probably convert mp3 to AC3, but maybe not in real time for playback.
It's a good question, tnx for replying. Actually I cannot explain with enough details how the process works, cuz I don't know it.

What I know is that I don't want to create my DVD files, I want to play AC3 6-ch .AVI xvid files, which have been already ripped down a file from a DVD disk or any other 5.1 surround source.

On the web you find samples, previews and well complete full 700megs movies (ok illegal I know, but they are on the web and they use some kind of audio I want to play) encoded in xvid, divx, MP4, Matroska, etc. That's for video. On the audio part, the guys who rip the movies to samples, previews or full 700megs movies also rip the surround 5.1 into a Dolby Digital signal. Possible AC3, but I think you have to pass (transcode) it through AC3, cuz the audio is actually MP3 when I check properties of the AVI files.

Under Windows, using the AC3Filter program HERE was able to pass (transcode, encode on the fly) MP3 sound to AC3 and get it out into your sound system (hardware) as a Dolby Digital 5.1 surround sound. This is incredible and awesome sound experience! It's just like playing the movie from DVD disk.

I cannot play surround sound using those files under Linux. I always get stereo 2-ch sound, like if Linux software I have (missing codecs maybe?) cannot emulate, send or transcode the 5.1 signal to my sound system, using my optical spdif.

In worst case, if I cannot make it to work, I would like to upmix my spdif 2-ch to 6-ch so that the sound would come out of all speakers and not just left-right (when using spdif). I have tried different upmixing codes I found on the web but none upmixed 2-ch to 6-ch. As said, this is worst case scenario if I cannot play 5.1 with those xvid encoded files. But I am sure someone else on this forum plays windows xvid .AVI files in 5.1 surround sound, these files are way too popular for no one else than me playing them.

Maybe your Tovid has some kind of AC3Filter-like in there, I mean if you create your DVDs into files with 5.1 sound, you gotta be able to play them, right? They don't say if tovid can play 5.1 sound on the resulting file.

As for codecs, I have a52dec, ffmpeg and some others for 5.1 sound. I don't have transcode, maybe I would need it, I will take a look. tnx
 
Old 02-17-2008, 03:37 PM   #4
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
OK, that's much clearer. AC3filter looks like a pretty sophisticated sound processor, and must be doing a lot more than just format conversion. Sorry, I've never seen anything comparable in linux.
 
Old 02-17-2008, 04:46 PM   #5
Frank64
Member
 
Registered: Feb 2008
Distribution: Kubuntu 19.10
Posts: 77

Original Poster
Rep: Reputation: 15
I found something! Funny thing is I cannot find how to use it!

Anybody knows how to use "ac3jack" and "ac3dec" I have those 2 installed but cannot find how to use.

ac3jack is:
Code:
Realtime AC3 stream encoder for JACK
ac3jack is a tool for creating an AC3 (Dolby Digital) multichannel stream from its JACK input
ports. Using this tool, an AC3 stream (up to 5.1 channels) is created in realtime and either
written to a file or streamed to standard output. When streamed to stdout and piped through
the ALSA tool 'ac3dec -C', the AC3 stream can be passed out the SPDIF port on your audio
interface for connection to a multichannel surround receiver.
That's what I need! To encode on the fly AC3 and pass it through an AC3 decoder of ALSA and out to my SPDIF port!! Grrr, now that I have found (99% sure it is) what I want, I cannot find how to use it!

I wonder if it's possible to use it with graphical applications like mplayer and vlc, and not just from command line, but if I could get it to work in command line, that would still be it.

tnx!
 
Old 02-17-2008, 08:30 PM   #6
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
Is this any use to you - not much detail unfortunately...

http://www.linuxfromscratch.org/pipe...st/024432.html
 
Old 02-17-2008, 08:58 PM   #7
Frank64
Member
 
Registered: Feb 2008
Distribution: Kubuntu 19.10
Posts: 77

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by maroonbaboon View Post
Is this any use to you - not much detail unfortunately...

http://www.linuxfromscratch.org/pipe...st/024432.html
Well yes it is, you got it, that's what I want to do. ac3dec is now a52dec, but it's the same thing.

So sad that guy didn't say what he did to get it working. But he's right, Linux is far more flexible than Winblows, but you need to know what to do to take advantage of the flexibility, otherwise you end up tied up compared to Winblows.

I have come across several sites talking about the AC3 mixing from a avi file, but it is very very complicated to get it working. I don't understand why, it's so popular, but I guess all the people are using that thing called Winblows.

No matter what, I am not reverting to Bill Gates/Steve Balmer. No way in hell I am doing that, I love Linux despite the drawbacks (which are usually different from a person to another). What's most interesting is that all drawbacks can be solved once you find how... That's the beauty of it.

Whenever I find how to make it work, I will definitely post it here. And change the subject to something more suitable on a google search.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
alsa spdif coax in stereo instead of AC3 (DD/DTS) shrabok Debian 0 10-17-2006 06:41 PM
Bad quality sound on SPDIF and no AC3-passthrough babyface Linux - Hardware 5 06-14-2006 02:11 AM
mencoder: how to encode video to avi format Lotharster Linux - Software 3 02-08-2006 11:47 AM
Can hear only AC3 through SPDIF zaphands Linux - Hardware 0 06-27-2005 01:41 PM
ac3 pass through support tim1661 Linux - Software 2 04-29-2004 07:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration