ffmpeg: videos before and after conversion aren't the same length

前端 未结 1 1126
情话喂你
情话喂你 2021-01-25 14:54

I have a set of .mov videos which require conversion to .mp4 format. I\'m using ffmpeg and running this command:

ffmpeg -i Banking.mov -vsync -async -sameq -ac 1         


        
相关标签:
1条回答
  • 2021-01-25 15:06

    Judging from your FFmpeg output, it's seeing the input file as 3:35.6 minutes long:

    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Banking.mov': Duration: 00:03:35.6

    So the difference in timing appears to be how FFmpeg sees your file, not anything directly relating to its transcoding of it. How are you measuring the duration to get 00:03:35.407?

    That said, some observations:

    • Since your overall goal is just conversion of the container format, why not simply copy the video and audio data exactly:

      ffmpeg -i Banking.mov -codec copy Banking.mp4
      

      That should preserve everything nicely.

    • According to the documentation, -vsync and -async each take a parameter, so not having any probably isn't helping anything. (Though your version of FFmpeg is somewhat older, so perhaps that is proper usage for that version; I don't see any errors in the output.)

    • On that note, is there a reason you're using a six year-old build of FFmpeg? You'll definitely get better support, and likely better results with a more recent version.

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