VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Member
    Join Date
    Jul 2008
    Location
    Poland
    Search Comp PM
    Hello,

    I'm encoding some videos from my camera (mjpeg+mp3) to x264+aac in FFmpeg. Here's the command line I use:

    Code:
    ffmpeg -i "in.mp4" \
      -vcodec libx264 -preset veryslow -crf 25 \
      -af "aresample=44100" -async 1000 \
      -strict experimental -acodec aac -ab 192k \
      "out.mkv"
    What happens is... when I play out.mkv in ffplay, it plays fine. When I play it in mplayer, audio is played a bit ahead of the video. It is possible to play out.mkv in mplayer in sync, when I add "-autosync 1000" option to mplayer command... Other videos (those not encoded by me) play fine without this option.

    It's the same without "-async 1000" in FFmpeg command... I'm using newest FFmpeg (2013/04/01). This behavior replicable with all older versions I tried so far.

    What's wrong with my command?
    Quote Quote  
  2. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Try remuxing your "out.mkv" with MKVtoolnix. The Matroska muxer of ffmpeg is buggy, and probably the Matroska demuxer of ffplay is equivalently-buggy.
    Quote Quote  
  3. Member
    Join Date
    Jul 2008
    Location
    Poland
    Search Comp PM
    Got it. =P Thanks.

    Anyway, I ended up writing my own script that uses neroAacEnc, x264 (executable) (level 3.1) and muxing their outputs to .mp4.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!