Hi,
I have edited some video files in VirtualDub and saved them using external encoders. Those are MP4 files with identical CONSTANT frame rate, resolution, encoded with crf 20 and around 20 minutes long. I tried joining the videos using FFMpeg. The output video came out with VARIABLE frame rate the reason for which is not known to me. I also tried avidemux, MP4box and I get the same variable frame rate video. But, I get constant frame rate when I join them using MKVToolnix. Again, I need to convert them to MP4 due to compatibility issues with the players. Can anyone suggest methods to get constant frame rate after joining!.
+ Reply to Thread
Results 1 to 12 of 12
-
-
-
What he ment was that you should join the files into a MKV with MKVToolnix, as you said this will create constant framerate. From here you can take the joined, constant framerate MKV and remux it to a MP4 with the command given. You might want to define a codec for audio:
Code:ffmpeg -i input.mkv -c:v copy -c:a copy output.mp4
I'm the developer behind FFQueue. My posts might reflect this! ;-) -
I followed what he meant and the video joined using mkvtoolnix i.e mkv file came with constant frame rate. This when remuxed to MP4 using the command given resulted in variable frame rate that is what is shown in the jpg file.
-
My experience has been that FFMpeg does not join MP4 files well due to the container (Atoms) format. The only way I have had it work is to list the files in a filelist and then use the concat method of ffmpeg. Even this will sometimes cause variable audio rate as it aligns the audio to the different segments.
-
-
But do you experience any playback problems with the mp4? Sync issues?
-
Most of my MP4 are shorter videos so it is hard to tell visually but if I graph them out there doesn't seem to be or very slight. It's hard to tell if I am looking at the same frame generation but I'd say if my program is working correctly, audio is delayed maybe .002 ms in 4 minutes. This is based on .041 ms per frame (23.976 fps) and difference shows approximately 20 pixels out of 375 shift or .002 ms delayed
-
I have attached the media info text file 1) MP4 file before joining 2) MP4 files joined in FFMpeg 3) MP4 files muxed as MKV and then changed to MP4 using FFMpeg. Thank you.
-
Similar Threads
-
Right way to join two different video files using ffmpeg?
By yetanotherlogin in forum EditingReplies: 15Last Post: 25th Jun 2021, 02:25 -
Joining two video files
By gracemichelle in forum EditingReplies: 6Last Post: 9th May 2015, 08:56 -
Joining two different sized video files
By nominalgrevious in forum Newbie / General discussionsReplies: 8Last Post: 7th Mar 2012, 16:38 -
Joining video files in mkvmerge
By Zee530 in forum Newbie / General discussionsReplies: 0Last Post: 13th Oct 2011, 14:29 -
Joining Blu ray video files.
By whatyaar in forum Authoring (Blu-ray)Replies: 3Last Post: 20th May 2011, 04:22