I need to concatenate a number of video files with different framerates to play them with OMXPlayer on a Raspberry PI (the concatenation is also done on the PI).
Both the originals and the concatenation are mp4/h264 and the originals are also created by some software of mine.
Using ffmpegs copy muxer doesn't work when the files have different time bases.
So I was thinking that I produce the original videos with an explicit timebase of 120 (120 is divisible by both 25 and 30, the only frame rates I care about).
The test
ffmpeg.exe -i .\ballon.mp4 -enc_time_base 1:120 .\ballon-120.mp4
seems promising: ffmpeg says it produces a 30fps video (the original was 30fps) with a timebase of 120 in the output.
However, it also says that it "duplicates frames" a lot and the following command tells me I have 4 times as many frames as I actually should have:
ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_frames -of default=nokey=1:noprint_wrappers=1 .\ballon.mp4
ffprobe also thinks the frame rate is now 120 and indeed OMXPlayer complains about the framerate being too high and plays the video somewhat slow.
What I want is to change the timebase, not the frame rate or the number of frames. How do I do that?