PDA

View Full Version : ffmpeg encoding to xvid + ac3 5.1 -- does it work?


JeanMarc
4th January 2012, 06:13
I am curious to find out if anyone has an issue with ffmpeg encoding to xvid with ac3 5.1 audio. I can't seem to make it work. This seems weird because I was under the impression that the audio processing was independent of the video, but in my case, the audio conversion that works with h.264 mp4 doesn't work with xvid.

I am doing dvd backups that I stream to my PS3, xvid is the only way to keep soft subtitles, and I would like to just copy the 5.1 ac3 audio typically found on those files. It would work with xvid + aac 5.1, but I want to avoid the ac3 to aac conversion. And, when I need the subtitles, I want to use xvid instead of h.264.
When I say I can play a compressed video, it means I can stream it to the PS3 (with ps3mediaserver) and send to my receiver the full audio in Dolby Digital 5.1 channels.

Here is what works:

I can play on the PS3 a VOB file with ac3 5.1 channels
I can encode and play a compressed file to mpg with ac3 5.1
gspot tells me that I have the codecs for ac3 5.1
I can encode and play a compressed file with H.264 mp4 and ac3 5.1 only if I re-encode the audio (i.e. -acodec ac3 -ac 6 -ar 48000 -ab 448k, but not -acodec copy) although the original audio is ac3 5.1
I can encode and play a compressed file with libxvid and aac 5.1 (-acodec libfaac -ac 6 -ar 48000 -ab 448k)
I can use autoGK and get an excellent video with Xvid + ac3 5.1 passthrough audio (but I want to use a command line tool)


Here is what doesn't work for me:

Pretty much any compression to xvid + ac3 5.1 audio, whether the source is a vob file with mpeg2 and ac3 5.1 audio, or a separate video from avisynth and a separate ac3 5.1 audio file, and whether the audio is passthrough or re-converted to ac3 5.1.
Compression to H.264 mp4 with -acodec copy of the source ac3 5.1 audio stream doesn't work either (but re-converting to ac3 5.1 does).

I think I have seen inconclusive threads on similar issues. I would appreciate if anyone could share any insight.

I did most of my testing with an ffmpeg version which I compiled on July 26, 2011 with the latest version at that time. I just downloaded the latest build today from Zeranoe's website (ffmpeg version N-36193-gf514695), which doesn't seem to improve the situation.

Thanks.

JeanMarc
4th January 2012, 22:16
In case anyone is interested, see Nologic's suggestion, that worked for me, at this page (http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=7&t=355&p=1099#p1099).
Correction: it turns out that the mp4box solution doesn't totally satisfy me yet: it doesn't maintain the video xvid format.