Changing Frame Rate (remux) = No Audio

Questions involving a Windows version of FFmpeg.
Post Reply
mrralan
Posts: 2
Joined: Sat Nov 09, 2019 7:14 pm

Changing Frame Rate (remux) = No Audio

Post by mrralan » Sat Nov 09, 2019 7:26 pm

I am trying to change the frame rate of an MKV that's 25 FPS to an MP4 @ 23.976 FPS. The video runs a little fast. I want the best quality so I don't want to re-encode.

I'm new to ffmpeg but I saw and example where you extract to raw bitstream and then remux. I ran these commands...

ffmpeg -y -i source.mkv -c copy -f h264 source.h264

ffmpeg -y -r 23.976 -i source.h264 -c copy dest.mp4

This creates a video that now runs the correct time however, there is no audio. How can I retain the audio (in sync) during this operation?

mrralan
Posts: 2
Joined: Sat Nov 09, 2019 7:14 pm

Re: Changing Frame Rate (remux) = No Audio

Post by mrralan » Tue Nov 12, 2019 2:46 pm

I extracted the audio with...

ffmpeg -i source.mkv -vn -acodec copy source.aac

This gave me file that is the same fast speed as the original video. I then modified the speed with an audio editor so it plays correctly.

Now trying to merge the video and audio is a problem. I do this...

ffmpeg -r 23.976 -i source.h264 -i source.aac -c:v copy -c:a copy output.mp4

But the output doesn't show correctly in media players. It shows a total length of over 30 hours but it plays correctly. It stops at the right time but shows about 29 hours after that.

Post Reply
'