This drove me nuts for a while, but I thought I'd post it in case anyone else couldn't figure out why this happens (though I still dont know if you can make it work, I haven't been able to)
Apparently AAC audio in an H264 / avi container don't get along too well, the video plays at double speed while the audio plays at normal speed. This happened during a video conversion from a DIVX (mp3 audio) avi to am H264 (aac audio) avi. Once I told ffmpeg to use MP3 audio instead playback was fine. (note only an avi container causes this, using an mp4 container works fine)
Problematic:
ffmpeg -i vdivx_amp3.avi -vcodec libx264 -b 1500000 -r 24 -async 1 -acodec libfaac -ar 44100 -ab 128000 -ac 2 output.avi
Works fine:
ffmpeg -i vdivx_amp3.avi -vcodec libx264 -b 1500000 -r 24 -async 1 -acodec libmp3lame -ar 44100 -ab 128000 -ac 2 output.avi
An inspection of the aac encoded avi didn't reveal any problems either, the duration of the audio & video channels were correct, proper bitrates etc, tried multiple video players to make sure. If anyone does know what causes this I'd love to know, otherwise I'll stick with mp3 audio when not using an mp4 container. In my case I had to use AVI because im converting to WMV9 from here and windows media encoder wont read mp4 files.
+ Reply to Thread
Results 1 to 7 of 7
-
Michael Brown
360 Replays Ltd. -
VideoAudio.pl - Serwis o technologii wideo & audio
-
Probably the actual problem is *not* in the "AVI container" itself,
but in the AVI muxer of ffmpeg.exe.AVI-Mux GUI is capable
of wrapping AAC streams in AVI files correctly. OTOH,
ffmpeg apparently cannot generate OpenDML .AVIs. -
the h264 with aac should be output to the mp4 container. it's not an "avi" per se, but a type of mpeg. try mediacoder, handbrake, or there are others in the tools section.
-
Originally Posted by El Heggunte
Output file, less than 1 GB = AVI 1.0
Output file, larger than 1 GB = OpenDML AVI
(Same in MEncoder.)
BTW
libfaac is removed from latest FFmpeg (due to licensing problems).VideoAudio.pl - Serwis o technologii wideo & audio -
Originally Posted by Placio74
BTW, didn't you mean 2 GB
BTW again, this is what I get when I use ffmpeg 0.5 and type in "ffmpeg -formats":
.
.
.
D E dirac raw Dirac
D E dnxhd raw DNxHD (SMPTE VC-3)
D dsicin Delphine Software International CIN format
D E dts raw DTS
D E dv DV video format
E dvd MPEG-2 PS format (DVD VOB)
D dxa DXA
D ea Electronic Arts Multimedia Format
D ea_cdata Electronic Arts cdata
D E eac3 raw E-AC-3
.
.
. -
Originally Posted by El Heggunte
FFmpeg and MEncoder AVI files larger than 1GB write to OpenDML.
Originally Posted by El Heggunte
BTW
libfaac is removed from latest FFmpeg SVN (is still present in older 'stable' 0.5).
However... this issue is not relate to encoder (libfaac), because same is when mux from external audio file.
Is not relate to AVI 1.0 too, because same is with OpenDML (also same is with small and large files).
It looks like muxing MP2 audio to AVI used latest MEncoder (odd issue - does not exist in some old builds).VideoAudio.pl - Serwis o technologii wideo & audio
Similar Threads
-
how to embedded subtitles in mp4 container format using ffmpeg
By fahad_200506 in forum Newbie / General discussionsReplies: 2Last Post: 11th Oct 2012, 07:39 -
AAC 2.0 vs AC3 5.1 for h264 video inside MKV container
By ekred in forum AudioReplies: 9Last Post: 26th Oct 2011, 12:36 -
change an MKV container to AVI container???
By Spdngblt56 in forum Newbie / General discussionsReplies: 10Last Post: 17th May 2010, 21:23 -
Audio out of sync problem with FFMPEG encoding MP4 (h.264,AAC)
By jenak1980 in forum Video ConversionReplies: 7Last Post: 5th May 2010, 01:03 -
Problem while converting MP4 container into avi
By Fire Foxer in forum Video ConversionReplies: 4Last Post: 29th Nov 2009, 15:55