ffmpeg is generating an out-of-sync audio/video file

前端 未结 1 1268
抹茶落季
抹茶落季 2021-02-03 10:19

I am trying to convert a flv video to mp4 using a264, but the result video has a out of sync audio/video. The audio seems ok but the vide

1条回答
  •  日久生厌
    2021-02-03 11:20

    For those who may be trying this, I was better of recording flash in h264 right away, instead of using yuv420p for audio codec. That worked like a charm. Adding the flag -async 1 also helped.

    Update: Check out this bit from the ffmpeg documentation (http://ffmpeg.org/ffmpeg.html):

    -async: Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps, the parameter is the maximum samples per second by which the audio is changed. -async 1 is a special case where only the start of the audio stream is corrected without any later correction. This option has been deprecated. Use the aresample audio filter instead.

    You can read about the aresample filter here: http://ffmpeg.org/trac/ffmpeg/wiki/FilteringGuide

    0 讨论(0)
提交回复
热议问题