This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] Video have different time and audio desync after conversion
#1
I'm trying to compress stream capture into smaller size file but have some troubles with it. After conversion from TS AVC to MP4 AV1 video time becomes shorter and at some point it's audio begin to desync. I assume it's because it's in a vaiable frame rate mode, while Hybrid mistakenly assumes that it's in 30 CFR, and i dunno how to change it or enforce vsync (i heard that it helps in such cases)
Reply
#2
Streamed captures often have broken time codes, try enabling "Config->Automation->On Load->Always extract timecodes from input" (and disable 'only some').
Also, if there are any stream defects, Hybrid is not the right tool to use.
You can also try if it works to first use mkvtoolnix to remux the transport stream to mkv.
(mkvtoolnix has some workarounds that often helps with streams that have some header problems)
Assuming the new mkv plays fine feeding that to Hybrid might help.

Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#3
Tried with MKVToolNix and then convert - now time is the same, and info in general more correct, but audio is still desynced after conversion, and apparantly internally time still differend - video abrupts at some point. Which means problem still persists. What exactly i should do in MKVToolNix to make it work? And i heard it's possible to do this with FFmpeg, but i don't know how to use it
Reply
#4
Is the mkv sync before conversion?
If yes, then share a debug output of Hybrids analysis. (read sticky)
If no, you can also try ffmpeg -i <path to input> -codec copy "<path to output.mkv>", but my guess is that this will also not work better than ffmpeg.
=> seems like you should fix your stream first by running it through tsdoctor or similar.

You could also try converting your file with some ffmpeg or handbrake gui, which process audio&video at the same time and try to handle 'broken' files. (depending on the tool you could convert to some lossless intermediate and feed that to Hybrid, assuming the intermediate is sync)

Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#5
(20.10.2023, 09:23)Lemenus Wrote: And i heard it's possible to do this with FFmpeg, but i don't know how to use it

usually on VFR clips i use Kdenlive (that is just an FFMPEG / MLT gui ), placing the VFR clip on the project bin make Kdenlive to request to "convert" to a "friendly" (not VFR)  format using FFMPEG...
Reply
#6
Tried ts-doctor, ffmpeg, premiere - nothing helped


Attached Files
.7z   HybridDebugOutput_Lemenus_tsmkv.7z (Size: 123,01 KB / Downloads: 51)
Reply
#7
Assuming the output of those processing steps is still sync, then Hybrid simply can't deal with your source.
Hybrid does extract audio&video and the time stamps, reencode the streams, mux the streams, add the time stamps back in.
=> A ffmpeg or handbrake based gui might, which processes video&audio in parallel, might be better suited for your source.

Cu Selur
--- mainly offline 20.-26 of May ---
Reply
#8
I tried HandBrake and Shutter Encoder, and it works which is cool so thank you. But now there's another problem, which is unrelated to Hybrid - after SE or HB video data describes original video framerate which is 50 fps, but it seems like 30-24 fps actually
Reply
#9
Your source if vfr = variable frame rate, so if their output isn't vfr any more, they decoded to cfr and inserted duplicate frames.
--- mainly offline 20.-26 of May ---
Reply
#10
How can i make framerate look same as source? Stream had some accasional dips in framerate, i expected that cfr will make duplicates only here, not for every frame
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)