2-pass ffmpeg faac .mp4 encode hangs in Linux

Archive of historical development discussions
Discussions / Development has moved to GitHub
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
mirkwood
Experienced
Posts: 83
Joined: Mon Jan 01, 2007 7:50 pm

2-pass ffmpeg faac .mp4 encode hangs in Linux

Post by mirkwood »

When I try to do a 2-pass encode of a single DVD chapter using the ffmpeg encoder and faac audio encoder to a .mp4 file, the encode hangs very early on the 2nd pass.

Oddly, doing a 2-pass ffmpeg encode with the lame audio encoder to a .mp4 works fine, although the resulting file has no playable audio (and crashes VLC most of the time). Maybe a stupid question, but I guess mp3 (lame) audio is not actually supported in an .mp4 file?

So, something is wrong with faac + ffmpeg + .mp4 output on Linux?

Can someone try this on MacOSX and see if it works?

This works on the Windows/Cygwin build.

As for the Windows/MinGW port I'm working out, well that's another story...ffmpeg 2-pass encodes to .mp4 or .avi with lame or faac end up with a very low quality output, it basically looks like the bitrate actually used was extremely low (GSpot reports the video bitrate of the file as 100kbps!). I haven't been able to figure this out yet, so currently the MinGW build is screwed as far as ffmpeg 2-pass goes.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: 2-pass ffmpeg faac .mp4 encode hangs in Linux

Post by jbrjake »

mirkwood wrote:Can someone try this on MacOSX and see if it works?
faac + ffmpeg + .mp4 works fine in OS X with HBTest.

However, muxing lame mp3 audio into an mp4 gave me the same results it did you. VLC has no audio and crashes after a few seconds. QuickTime won't open it. MPlayer freezes at the first frame.

mp4 will let you shove anything inside it, so it technically supports mp3, but nothing really plays non-standard tracks. (i'm getting this from bond's mp4 faq over at doom9: http://forum.doom9.org/showthread.php?s=&threadid=62723 )
mirkwood
Experienced
Posts: 83
Joined: Mon Jan 01, 2007 7:50 pm

Post by mirkwood »

jbrjake wrote:faac + ffmpeg + .mp4 works fine in OS X with HBTest.
Not to sound anal, but you did 2-pass right?

I also discovered another Linux problem with ffmpeg 2-pass:

Encoding to an .avi with ffmpeg 2-pass and lame results in low quality audio. I dunno if it's encoded poorly or just plays back poorly, but GSpot claims the audio is 128kbps, but VLC and KLite Media Player Classic in Windows playback very low quality audio, both both report 128kbps MP3.

However, encoding to an .avi with ffmpeg single pass and lame works ok.

So it looks like there's a few problems with ffmpeg 2-pass & HandBrake on Linux.

Oddly, I am definitely a Linux/Unix programmer by nature, but my personal target is Windows since that's what I use for all my video/audio related work, so I'll be focusing on Windows. I will report these Linux ffmpeg problems in a Trac ticket.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Post by jbrjake »

mirkwood wrote:Not to sound anal, but you did 2-pass right?

Code: Select all

./HBTest -i /Volumes/KILL_BILL_VOL2 -o /Users/jon/Movies/kbmirktest.mp4 -t1 -c9 -e ffmpeg -E faac -2 --crop 58:64:0:0 -v
mirkwood
Experienced
Posts: 83
Joined: Mon Jan 01, 2007 7:50 pm

Post by mirkwood »

I tried with a different DVD, same hang problem with 2-pass ffmeg .mp4 and faac. And same lousy audio problem with .avi and 2-pass ffmpeg and lame.
Post Reply