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.

[BUG] QTGMC deinterlaced video has audio desynchronisation
#1
Hi Selur and everyone else,

I'm using Hybrid 2025.11.09.1 installed on my new PC.

I've noticed when I attempting to process interlaced captures, output files have a synchronisation issue - it's more of a constant offset rather than a drift.


Here's an example input file, a 720x576 interlaced 25 fps video in HuffYUV and PCM. I am attempting to encode using either x264 or x265 and AAC FDK audio, bob deinterlacing using QTGMC and scaling to 768x576 (standard adjustment for PAL SD non-square footage). 

I made these captures myself using AmaRecTV on my Avermedia C027 card from a professional Panasonic SVHS deck. I've used AmaRecTV and the capture device for many years and I trust that it's capturing and encoding everything in sync.

The AVI plays in sync in MPC-HC, mpv or VLC. If I remux the .avi with MKVToolNix, it also plays in sync in those programs.

ffprobe -v error -show_format -show_streams otuput:

[STREAM]
index=0
codec_name=huffyuv
codec_long_name=HuffYUV
profile=unknown
codec_type=video
codec_tag_string=HFYU
codec_tag=0x55594648
width=720
height=576
coded_width=720
coded_height=576
closed_captions=0
film_grain=0
has_b_frames=0
sample_aspect_ratio=N/A
display_aspect_ratio=N/A
pix_fmt=yuv422p
level=-99
color_range=unknown
color_space=unknown
color_transfer=unknown
color_primaries=unknown
chroma_location=unspecified
field_order=unknown
refs=1
id=N/A
r_frame_rate=25/1
avg_frame_rate=25/1
time_base=1/25
start_pts=0
start_time=0.000000
duration_ts=11203
duration=448.120000
bit_rate=78324880
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=11203
nb_read_frames=N/A
nb_read_packets=N/A
extradata_size=192
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
DISPOSITION:non_diegetic=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
[/STREAM]
[STREAM]
index=1
codec_name=pcm_s16le
codec_long_name=PCM signed 16-bit little-endian
profile=unknown
codec_type=audio
codec_tag_string=[1][0][0][0]
codec_tag=0x0001
sample_fmt=s16
sample_rate=48000
channels=2
channel_layout=unknown
bits_per_sample=16
initial_padding=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/48000
start_pts=0
start_time=0.000000
duration_ts=N/A
duration=N/A
bit_rate=1536000
max_bit_rate=N/A
bits_per_raw_sample=N/A
nb_frames=21509760
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
DISPOSITION:timed_thumbnails=0
DISPOSITION:non_diegetic=0
DISPOSITION:captions=0
DISPOSITION:descriptions=0
DISPOSITION:metadata=0
DISPOSITION:dependent=0
DISPOSITION:still_image=0
[/STREAM]
[FORMAT]
filename=amarec(20251120-2051).avi
nb_streams=2
nb_programs=0
format_name=avi
format_long_name=AVI (Audio Video Interleaved)
start_time=0.000000
duration=448.120000
size=4473288704
bit_rate=79858764
probe_score=100
[/FORMAT]



I have found if I manually offset the audio to around -800 ms then the audio is more synchronised. I've tried Vapoursynth and Avisynth in the Filtering tab.

Here's a MediaInfo output of the source file:

General
Complete name                            : D:\caps\amarectv231_en\amarec(20251120-2051).avi
Format                                  : AVI
Format/Info                              : Audio Video Interleave
Format settings                          : WaveFormatEx
File size                                : 4.17 GiB
Duration                                : 7 min 28 s
Overall bit rate                        : 79.9 Mb/s
Frame rate                              : 25.000 FPS

Video
ID                                      : 0
Format                                  : HuffYUV
Format version                          : Version 2
Codec ID                                : HFYU
Duration                                : 7 min 28 s
Bit rate                                : 75.2 Mb/s
Width                                    : 720 pixels
Height                                  : 576 pixels
Display aspect ratio                    : 5:4
Frame rate                              : 25.000 FPS
Standard                                : PAL
Color space                              : YUV
Chroma subsampling                      : 4:2:2
Bit depth                                : 8 bits
Scan type                                : Interlaced
Bits/(Pixel*Frame)                      : 7.248
Stream size                              : 3.92 GiB (94%)

Audio
ID                                      : 1
Format                                  : PCM
Format settings                          : Little / Signed
Codec ID                                : 1
Duration                                : 7 min 28 s
Bit rate mode                            : Constant
Bit rate                                : 1 536 kb/s
Channel(s)                              : 2 channels
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 82.1 MiB (2%)
Alignment                                : Aligned on interleaves

ReportBy                                : MediaInfoLib - v24.12
CreatedOn                                : UTC 2025-12-22 16:12:38



Not sure what other info you'd like? I can clip a short section of this file and supply as .avi or .mkv if it would help, though I'm not sure what else I can do to try and stop this A/V sync issue.

I also noticed a couple of other things:

* Hybrid is incorrectly detecting the interlacing as BFF when the file is TFF interlaced, even when it runs its own evaluative scan. Is Hybrid incorrectly assuming it's a DV clip based on resolution and PAR?
* When Vapoursynth is loaded, it claims "Detected no AVX2 support", although this CPU (AMD R9 7950X) supports AVX, AVX2 & AVX512.

Cheers!
Chris
Reply
#2
usually related to use MP4 as output (changing to MKV can solve)
with MP4.. using FFMPEG instead of MP4BOX can solve also.

P.S. you don't need to "SCALE"... just leave 720x576... and force an INPUT PAR 16:15 ( for 4/3 PAL ) and leave "resizing" to the player.
Reply
#3
Quote:* Hybrid is incorrectly detecting the interlacing as BFF when the file is TFF interlaced, even when it runs its own evaluative scan.
a. source is only flagged as interlaced not as tff or bff, so there is no way to know from the flags
b. the heuristic might be guessing to depending on the results
Quote:Is Hybrid incorrectly assuming it's a DV clip based on resolution and PAR?
I do not think so.
Quote:When Vapoursynth is loaded, it claims "Detected no AVX2 support", although this CPU (AMD R9 7950X) supports AVX, AVX2 & AVX512.
Strange, I got the same CPU here and that does not happen here. Huh

About the sync issue:
Might be:
a. because of the source filter used
b. because of an issue with the source
1. try whether telling Hybrid to decode to cfr helps.
2. try whether remuxing to mkv before feeding the file to Hybrid helps.

Cu Selur

Ps.: read the sticky and share a debug output if you need further help
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)