1

I'm trying to change the frame rate of a MP4 file so it runs at the correct speed. I asked how to do this with FFmpeg without re-encoding here and the answer tgies gave worked. This was on a 25fps video. Now I have a 30fps video and it is not working as I expected. I changed the atempo value by dividing 23.98/30. The resulting video plays much slower than I want. Also, the audio is not in sync. Here's what I did...

ffmpeg -i source.mp4 -r 23.98 -i output.h264 -filter_complex "[0:a]atempo=0.7993[out]" -map 1:v -map "[out]" -c:a aac -c:v copy output.mp4

Is there something I need to do differently because the source frame rate is now 30?

4
  • "Now I have a 30fps video" -- Are you sure? How do you know? Dec 30, 2021 at 13:28
  • Windows and various Media Players show 30fps. Ffmpeg did also as it was processing it.
    – MrRAlan
    Dec 30, 2021 at 20:04
  • It's challenging to answer without the input files. You may try to use FFprobe with -show_packets: ffprobe -i source.mp4 -show_packets > source.txt and ffprobe -i output.h264 -show_packets > output.txt. Make sure that duration_time=0.033333 for all packets in source.txt and duration_time=0.041701 for all packets in output.txt.
    – Rotem
    Dec 30, 2021 at 21:56
  • Thanks for the replies.
    – MrRAlan
    Jan 6, 2022 at 19:48

0

You must log in to answer this question.

Browse other questions tagged .