View Full Version : Changing incorrect frame rate flag without re-encoding
leonccyiu
27th February 2018, 01:26
Hello
I recently purchased some videos online which have been encoded incorrectly with a strange frame rate of 24.95fps or 24.99fps instead of 25fps and is causing presentation glitches on playback.
When I use handbrake and set the frame rate to constant 25fps with audio passthrough, the newly encoded video is free of presentation glitches, but becomes a second generation encode which is lossy. I have the options of re-encoding the 4k videos as 10bit h265, using x264 or intel qsv.
Is there a simple way I can get the videos to playback at 25fps or alter the flag without having the re-encode?
Thanks
foxyshadis
27th February 2018, 10:25
What are they encoded into? If you can re-encode them, at least it isn't a proprietary DRM container.
If it's AVI, then changing the framerate is as simple as changing a couple of bytes in the header, but that wouldn't cause glitches, just a steady drift between audio and video. VirtualDub is your best bet for AVI. If it's some form of MP4 (/MOV) or MKV, you can use their respective tools to re-stream them with a new default frame duration, with a tool like MP4Box GUI (https://www.videohelp.com/software/My-MP4Box-GUI) for MP4 (be sure to add the latest MP4Box (https://www.videohelp.com/software/MP4Box)) or MKVToolNix (https://mkvtoolnix.download/) for MKV. You might not even need to change the framerate, sometimes just rewriting them with a proper tool fixes glitches.
These tools just pull the encoded frames out of whatever they're in now and put them in a new file, so they don't cause any kind of generational loss.
leonccyiu
1st March 2018, 04:36
What are they encoded into? If you can re-encode them, at least it isn't a proprietary DRM container.
If it's AVI, then changing the framerate is as simple as changing a couple of bytes in the header, but that wouldn't cause glitches, just a steady drift between audio and video. VirtualDub is your best bet for AVI. If it's some form of MP4 (/MOV) or MKV, you can use their respective tools to re-stream them with a new default frame duration, with a tool like MP4Box GUI (https://www.videohelp.com/software/My-MP4Box-GUI) for MP4 (be sure to add the latest MP4Box (https://www.videohelp.com/software/MP4Box)) or MKVToolNix (https://mkvtoolnix.download/) for MKV. You might not even need to change the framerate, sometimes just rewriting them with a proper tool fixes glitches.
These tools just pull the encoded frames out of whatever they're in now and put them in a new file, so they don't cause any kind of generational loss.
Thank you very much for your reply, I used the MP4Box GUI to separate the video and audio streams, and changed the frame rate to 25fps, before the video and audio length didn't match, now they do and they play back without glitches and without re-encoding.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.