Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th February 2023, 23:58   #1  |  Link
antoniu200
Registered User
 
Join Date: Feb 2023
Posts: 2
Messed up something in many MKV files, now getting dropped frames

Hi,

I managed to mess up multiple files recorded from TV, most likely after cutting with AviDemux, all of them MKV files. Most of them can be fixed by simply remuxing them from MKV to MP4 right from AviDemux, but I got like 4-5 that cannot be fixed by doing this.
These 4-5 files, after being cut with AviDemux and exported in MKV, have again been remuxed using MKVToolNix GUI v42.0.0, because I changed the audio. Remuxing the raw cut MKV files from AviDemux with the audio without changing any settings in MKVToolNix resulted in files with stuttery frame rate. So I forced the video's "Default duration/FPS" setting to 50i (possibly even "Fix bitstream timing info"), while setting the delay for the audio stream to be identical to that of the original audio (audio files were synced in Audacity). At this point, while the video and audio are in sync and stutter is (relatively) minimal, frames are being dropped constantly while playing back, about 5 each second.

I tried fixing one of these files using the most upvoted answer of FFmpeg: recreate timestamps without reencoding - Super User, but even the raw .h264 file is losing frames while being played back (MPC-HC using LAV Filters 0.77.1). After the final command, the resulting file loses frames just like the original, with absolutely nothing changing. I also tried the second answer, but it did not seem to help either.

I have no idea what I must have managed to mess up in these files and how. Worth mentioning is the fact that I can fix them by fully re-encoding the video, but that is not desirable, from obvious reasons. I managed to mess the file up by simply remuxing, so I would assume it should be fixable by remuxing somehow, no?

If anybody has some suggestions, I would be ready to give them a try. Right now, I have no idea where to look for my issue anymore.

Here's a short sample of the file, cut using AviDemux (dropping frames just like the original): https://drive.google.com/file/d/1qPG...mxCvUhl9l/view
antoniu200 is offline   Reply With Quote
Old 18th February 2023, 22:40   #2  |  Link
antoniu200
Registered User
 
Join Date: Feb 2023
Posts: 2
Okay, I recorded some more from the TV channel where all the MKV files with lost frames came from. It seems like their broadcast contains Non-monotonous DTS coded right into the H.264 video. If I was to cut such file using AviDemux and save it as MKV, it starts losing frames when played back. If saved as MP4, it does not lose any frames, i.e. most likely the player ignores DTS (please, correct me if I'm wrong).

In MKVToolNix GUI, with one of the MKV files that have only been cut using AviDemux from the source TS, I tried to "Fix bitstream timing info" of the video, set the Frame Rate to 50i and apply a delay to its audio track. The resulting video file cannot be fixed by simply remuxing to MP4 and loses frames regardless of the container, just like the other 5. So, this is definitely the way I broke them.
antoniu200 is offline   Reply With Quote
Old 10th June 2023, 07:04   #3  |  Link
martinwill
Registered User
 
Join Date: Mar 2023
Posts: 1
Quote:
Originally Posted by antoniu200 View Post
Hi,

I managed to mess up multiple files recorded from TV, most likely after cutting with AviDemux, all of them MKV files. Most of them can be fixed by simply remuxing them from MKV to MP4 right from AviDemux, but I got like 4-5 that cannot be fixed by doing this.
These 4-5 files, after being cut with AviDemux and exported in MKV, have again been remuxed using MKVToolNix GUI v42.0.0, because I changed the audio. Remuxing the raw cut MKV files from AviDemux with the audio without changing any settings in MKVToolNix resulted in files with stuttery frame rate. So I forced the video's "Default duration/FPS" setting to 50i (possibly even "Fix bitstream timing info"), while setting the delay for the audio stream to be identical to that of the original audio (audio files were synced in Audacity). At this point, while the video and audio are in sync and stutter is (relatively) minimal, frames are being dropped constantly while playing back, about 5 each second.

I tried fixing one of these files using the most upvoted answer of FFmpeg: recreate timestamps without reencoding - Super User, but even the raw .h264 file is losing frames while being played back (MPC-HC using LAV Filters 0.77.1). After the final command, the resulting file loses frames just like the original, with absolutely nothing changing. I also tried the second answer, but it did not seem to help either.mini militia old version

I have no idea what I must have managed to mess up in these files and how. Worth mentioning is the fact that I can fix them by fully re-encoding the video, but that is not desirable, from obvious reasons. I managed to mess the file up by simply remuxing, so I would assume it should be fixable by remuxing somehow, no?

If anybody has some suggestions, I would be ready to give them a try. Right now, I have no idea where to look for my issue anymore.

Here's a short sample of the file, cut using AviDemux (dropping frames just like the original):
You should probably check out on MKV official community which is created by official website of MKV.

Last edited by martinwill; 10th June 2023 at 07:18.
martinwill is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.