I'm trying to encode MP4 video to new MP4 with reduced resolution and bit rate.
No matter what kind of parameters I set to encode the file, the output file audio is fester then the video (out of sync).
How can I solve this problem ???
SOMEONE PLEASE HELP ME CAUSE I'M GETTING CRAZY
I'm using windows XP sp2.
The input video is in format:
The FFMPEG command line:Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1)
-> 25.00 (25/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\temp\Video\20468.mp4':
Duration: 00:01:51.54, start: 0.000000, bitrate: 2107 kb/s
Stream #0.0(eng): Video: h264, yuv420p, 1280x720, 25 tbr, 25 tbn, 50 tbc
Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16
The output file format:Code:d:\ffmpeg\ffmpeg.exe -i "d:\temp\video\20468.mp4" -async 25 -copyts -ar 44100 -b 500k -r 25 -f mp4 -acodec libfaac -ab 96k -s 480x320 -vcodec libx264 -threads 0 d:\Temp\Video\20468_out.mp4
FFMPEG Ver.:Seems stream 0 codec frame rate differs from container frame rate: 50.00 (50/1)
-> 25.00 (25/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'd:\temp\Video\20468_out.mp4':
Duration: 00:01:51.45, start: 0.000000, bitrate: 643 kb/s
Stream #0.0(eng): Video: h264, yuv420p, 480x320, 25 tbr, 25 tbn, 50 tbc
Stream #0.1(eng): Audio: aac, 44100 Hz, stereo, s16
FFmpeg version SVN-r18639, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-memalign-hack --enable-postproc --enable-gpl --enable-
libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libvorbis
--enable-libtheora --enable-libx264 --enable-libxvid --disable-ffserver --enable
-avisynth --enable-pthreads
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.27. 0 / 52.27. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 21 2009 13:44:38, gcc: 4.2.4 (TDM-1 for MinGW)
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 8 of 8
Thread
-
-
Try a newer ffmpeg build and see how it works. http://ffmpeg.arrozcru.org/autobuilds/
And what kind of sync problem do you get? Progressive where it gets worse and worse or ? -
I am having a sync problem right now too, and what I am finding with an MP4 file I am converting is that it has 2 audio channels, and if I set to convert to 1 audio channel, the a/v is out of sync. I am still testing it now but it looks like that could be one of the possiblities.
-
Baldrick thanks for your help a newer build in deed solves the problem.
For all who have the same problem as I had, pay attention that from r18715 build there is no support for AAC format as it posted on autobuilds log:2009/05/19
libfaac removed
Filed under: system update — ramiro @ 3:46 am
As of r18715, FFmpeg considers libfaac to be nonfree code, and so I have removed them from the builds. All builds from the start of this blog (after I recovered from the failed harddrive) do not have libfaac any longer.
http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/mingw32/static/
It is the newest build as I found that still support AAC.
Hope this will be helpful as it was for me -
OK, after much testing, I found out these two thing:
- If you use the built in AAC encoder (-vcodec aac), and your have a file with two audio, channels, and you convert it to a single channel, the audio starts way before the video and it is out of sync. I went back and forth between AAC and MP3, MP3 worked each time, AAC always made the delay. Funny thing though on the flash player that played the video, if you moved the play cursor back after it started playing, it would make the audio and video sync up. So, I ended up using the libfaac and it worked perfectly each time.
- The built in AAC encoder made the audio sound super tinty if that make sense. High frequency spikes, hard to listen to. The libfaac fixed that as well. -
Jenak1980, regarding what you wrote concerning the aac library, what needs happen in order to use the aac library, do you have to purchase a license?
-
onemorecoke sorry I'm not that good in the licensing problems. I'm just use it.
As it's written in the wiki:
The FAAC contains code based on the ISO MPEG-4 reference code, whose license is not compatible with the LGPL license[2]. Only the FAAC changes to this ISO MPEG-4 reference code are licensed under the LGPL license.[2] The ISO MPEG-4 reference software was published as ISO/IEC 14496-5 (MPEG-4 Part 5: Reference software) and it is freely available for download from ISO website.[15][16] ISO/IEC gives users of the MPEG-2 NBC/MPEG-4 Audio standards free license to this software module or modifications thereof for use in hardware or software products claiming conformance to the MPEG-2 NBC/MPEG-4 Audio standards. Those intending to use this software module in hardware or software products are advised that this use may infringe existing patents.[7][17][18]Last edited by jenak1980; 5th May 2010 at 01:39.
Similar Threads
-
Editing MP4 files with H.264 (AVC) video and AAC audio
By Ahari in forum Newbie / General discussionsReplies: 4Last Post: 16th Apr 2012, 16:30 -
MeGUI audio encoding dts/ac3 to aac-mp4, keep getting errors
By runLoganrun in forum AudioReplies: 5Last Post: 29th Jul 2010, 17:15 -
Convert h.264 MP4 w/AAC 5.1 audio to AVI file w/AC3 5.1 audio for Xbox 360
By ycrazyy in forum Newbie / General discussionsReplies: 6Last Post: 14th Jan 2010, 15:25 -
Sync audio starts-ok but near end 1 sec lag H.264/MPEG-4 AVC AAC LC
By JoeBolden in forum Video ConversionReplies: 6Last Post: 7th Jan 2010, 14:31 -
MP4(H.264-AAC) to AVI something help
By hibbs in forum Video ConversionReplies: 3Last Post: 30th Dec 2008, 20:31