-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Merge Fails due to framerate differences in video files #2338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If we were to specify a fixed framerate for the whole merged video, wouldn’t that mean that each clip would play back at different speeds because the actual number of frames per second is different? Is that desireable? |
Hi @mifi Thanks for replying and this wonderful software you wrote. I also further did some more testing and have use cases.
Just 2 clips and i merged them both. The issue with the new flagship smartphones is to optimize on storage space they sometime switch to VFR (Variable Frame rate) from CFR (Constant Frame Rate) automatically... we have no control on it. Below is a batch of files which fails (merge file stops playing after 1st clip plays). FN: VID_20250223_111409 | D: 00:00:48.077 | FS: 232 MiB | FR: 60.000 fps | FMR: CFR | W: 3840 | H: 2160 | F: AVC | C: avc1 below is the command i used for getting the info above on the video files I think this is a very common use case where people record multiple video clips through the day/ tour and just want to merge it all into one file so that they can upload it to youtube (no processing). More than happy to test this issue for you or provide the test files of working batch of files and non working batch. |
Hmm, you merged one file of Cfr 30 with another file of cfr 60 with losslesscut and the output plays correctly? (The first portion of the merged output file plays back at 30 fps and then it speeds up to 60 at the second portion?) i’m surprised that even works! TBH i’m quite out my depth here, as I don’t know all these internals of ffmpeg |
i understand what you are saying about fps. in my current quest of trying to find a command line or 'simple straightforward' merger/joiner software solution without having to use video suites like adobe to re-encode, i have seen others comment what the author of this post is trying to say. i havent tested myself but what he is saying is that if you join two videos, one 30fps and the other 60fps, there are are some softwares out there that claim to do the merge and defaulting to the lowest fps without significant/noticeable speed/play differences. i sincerely thank you for your work here and what you do to the community so, dont want to promote other products here, but i did try one(i am on windows) and it did work with no significant 'loss' - caveat though, my two vids are very similar fps but have not worked with your software or any other that is ffmpeg 'based' - but the one that i tried did work but unfortunately it adds a watermark at the end despite it being 'free'. i apologize if my coment sounds 'complaining' but just want to clarify i am not. i am just comenting on my current experience. for my case, i am just going to end up re-enconding all vids(they are all on physical CD media currently so i have a lot of tedious repetetive tasks ahead of me...) with diff software and then merging with lossless-cut. thanks again for your work! |
The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first
Operating System
MacOS 15
Steps to reproduce
Hi,
I records kids football videos on Honor 200 Pro Android Smartphone.
There are generally 2-6 videos with different durations as shown in example below
All videos were shot on 4k@60 fps but as all mobile phones do optimization for framerate
they reduce the frames according to lighting and various other conditions (phone temperature).
(Only some phones have the feature to disable Automatic Frame rate feature (for e.g Xiaomi 14))
VID_20250223_111409 | Size: 232 MiB | Duration: 00:00:48.077 | Frame Rate: 60.000 fps | Format: MPEG-4 | Codec ID: mp42
VID_20250223_113523 | Size: 5.57 GiB | Duration: 00:19:50.213 | Frame Rate: 50.166 fps | Format: MPEG-4 | Codec ID: mp42
VID_20250223_120234 | Size: 5.82 GiB | Duration: 00:20:38.187 | Frame Rate: 38.083 fps | Format: MPEG-4 | Codec ID: mp42
VID_20250223_120409 | Size: 391 MiB | Duration: 00:01:21.479 | Frame Rate: 32.574 fps | Format: MPEG-4 | Codec ID: mp42
VID_20250223_122909 | Size: 900 MiB | Duration: 00:03:07.552 | Frame Rate: 44.198 fps | Format: MPEG-4 | Codec ID: mp42
I simply merge all the videos and upload to youtube and dont do any processing
The issue is most times (75%) the merged file works even if the framerates are different
but sometime the merged file plays upto the some part and then it gets stuck.
I noticed when it works the final merged file has framerate as 30fps or the lowest framerate from the files given files.
Is it possible to specify an option to take the lowest available framerate from the files and do the merging so that it always works?
It will be great enhancement on top of what this great tool does so nicely saving hunderds or rendering times of CPU's and GPU's.
Expected behavior
The multi video files output merged file should play properly all through out
Actual behavior
The multi video files output merged file plays up to some length and its stuck due to mismatch in framrate.
But many times the merged file works and it shows the framerate as 30fps or the lowest from the files being merged
Share log from developer tools
No response
The text was updated successfully, but these errors were encountered: