Capture in sync, but convert to MP4 is not?
I captured a VHS tape using my ATI 9600XT. The resulting AVI is in sync even after 2 hours, when I view it in my Windows 10 in MPC.
However, when I converted to mp4 (x264) with Selur Hybrid—as I've done many times before with other tapes—the resulting video gets further out of sync as it goes. The audio sampling rate of the raw capture and the mp4 are both 48000. I'm a bit stumped. What could be causing this? What setting should I zero in on? |
Is it a uniform drift rate?
How much drift; e.g., frames per hour? Does it drift if you use other players or platforms? |
Does it make a difference if you enable "Config->Automation->On Load->Always extract timecodes from input" and disable the 'only some' suboption?
|
Is the video stream constant frame rate (CFR) or variable frame rate (VFR)? MediaInfo will tell you.
|
MediaInfo looks at a few time codes at the beginning of the file not the whole file.
So if the first xy hundred frames have a constant frame rate MediaInfo will report CFR and if a single frame has a wrong time stamp it will report VFR. Especially with captures MediaInfo can be easilty wrong. |
It could also be drop frames marked in the avi file - I've encountered something similar with using avisynth directly rather than hybrid (while VLC and similar seem to be able to sync up on it's own). Don't think I managed to find a way around it when loading directly in avisynth. (The main issue is something with the capture card (Avermedia U3) driver causing frame drops/inserts at the start of a recording with virtualdub. It doesn't occur with amarectv but amarec has issues getting all the possible output formats.)
Don't think AVI can even be VFR, at least not if using huffyuv, lagarith et. al. More modern formats like mp4 and mkv feature timestamps for the individual frames but AVI can only mark frame drops and possibly inserts afaik. |
Quote:
(.avi also has time stamps, with the settings above Hybrid uses ffmpeg to extract those and then check if the input is vfr or cfr) |
Quote:
- dropped frame: the data is simply missing, and in the avi file there is no a (simple) way to recognize it. I can only discover a dropped frame looking to the capture software report (for example the log file in AmarecTV) and comparing two captures of the same segment, where one presents a dropped frame. AFAIK a dropped frame can be written as a 0-byte length frame, but I ignore if the capture software we use do that, and eventually how to extract that info from the avi file with a piece of custom software and recognize a "dropped frame". - inserted frame: this is easy, because an inserted frame is just a repetition of the previous frame. The capture software does not re-write the full frame, but just a few byte instruction, saying to repeat the previous frame. This is easily detectable, for exampe with VirtualDub, opening the avi file and using "Video -> Go -> Prev drop frame" or "Video -> Go -> Next drop frame". In VirtualDub the name "drop" is used, but it actually refers to "inserted" frames. Just for curiosity, how do you manage the dropped frames in vhs-decode? |
I tried but this didn't help.
|
According to MediaInfo, my captured AVI has constant audio. But my mp4 output is variable.
CAPTURED RAW FILE Code:
Audio Code:
Audio |
aac is variable bit rate, but that the audio uses variable bit rate has nothing to do with sync issues.
|
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.