VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker or buy PlayOn and record Netflix! :)
+ Reply to Thread
Results 1 to 8 of 8
  1. 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 ???


    I'm using windows XP sp2.

    The input video is in format:

    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 FFMPEG command line:

    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
    The output file format:

    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 Ver.:

    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)
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Search Comp PM
    Try a newer ffmpeg build and see how it works.

    And what kind of sync problem do you get? Progressive where it gets worse and worse or ?
    Quote Quote  
  3. 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.
    Quote Quote  
  4. 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:

    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.
    So what you need to do is to download build 18709 from this page:

    It is the newest build as I found that still support AAC.

    Hope this will be helpful as it was for me
    Quote Quote  
  5. 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.
    Quote Quote  
  6. 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?
    Quote Quote  
  7. Member
    Join Date
    Nov 2009
    United States
    Search Comp PM
    I love FFmpeg for encoding MPEG, and maybe XviD, but I use Handbrake or StaxRip when encoding MKV or MP4.
    Quote Quote  
  8. 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]
    For me it's like reading chines
    Last edited by jenak1980; 5th May 2010 at 02:39.
    Quote Quote  

Similar Threads