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] Hybrid introducing audio delay that is not present in source material
#11
Ah sorry I'm working on some issues witht interlaced encoding handling in the dev versions atm. :/
Crash was probably caused by the Vapoursynth script:
# Imports
import os
import sys
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/VsResizer->Selector.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/DCTFilter.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DeblockFilter/Deblock/Deblock.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/EEDI3.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/temporalsoften.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
import havsfunc
# source: 'E:\amarec(20210928-1250)-01.avi'
# current color space: YUV422P8, bit depth: 8, resolution: 720x480, fps: 29.97, color matrix: 470bg, yuv luminance scale: limited, scanorder: top field first
# Loading E:\amarec(20210928-1250)-01.avi using LWLibavSource
clip = core.lsmas.LWLibavSource(source="E:/amarec(20210928-1250)-01.avi", format="YUV422P8", cache=0, prefer_hw=0)
# making sure input color matrix is set as 470bg
clip = core.resize.Bicubic(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 29.970
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# setting field order to what QTGMC should assume (top field first)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Slower", TFF=True) # new fps: 29.97
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
clip = clip[::2]
# DEBUG: VsQTGMC changed scanorder to: progressive
# applying deblocking using DeBlock QED
clip = havsfunc.Deblock_QED(clip, quant1=26, quant2=28)
# rainbow removal using LUTDeRainbow
clip = havsfunc.LUTDeRainbow(input=clip,cthresh=20,ythresh=20)
# denoising using Neo-FFT3D
clip = core.neo_fft3d.FFT3D(clip=clip, sigma=3.00, bw=16, bh=16, sharpen=0.35)
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=960, h=720, interlaced=False, interlacedd=False)
# converting progressive to interlaced for 'progressive to interlaced'
clip = core.std.DoubleWeave(clip, tff=True)
clip = core.std.SelectEvery(clip , 2, 0)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# DEBUG: progressiveToInterlaced changed scanorder to: top field first
# adjusting output color from: YUV422P16 to YUV420P8 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# reinterlacing for output
# set output frame rate to 29.970fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# Output
clip.set_output()
Will look into it.

Cu Selur

Ps.: does the audio delay handling work if you use video passthrough?
Pps.: please zip/compress the HybridDebugOutput files before uploading them in the future.
Reply
#12
The video actually didn't get passed through when I tried passthrough. It's just black. This is for mkv - mp4 does not allow Lagarith.
Attached is the debug for that job.

MediaInfo says it only brought in about 5s of the video, and all the other data like bit rate, height, width, frame rate are also wrong.
Even the format is incorrect, the source is Lagarith but it claims it passed through AVC.
General
Unique ID                                : 69532220780247726838159832377666097016 (0x344F6B2A0719ACB18F3EAE2EE07CCF78)
Complete name                            : C:\Video\Hybrid Output\amarec(20210928-1250)-01.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 488 MiB
Duration                                 : 1 min 26 s
Overall bit rate                         : 47.3 Mb/s
Encoded date                             : UTC 2021-10-01 16:43:19
Writing application                      : mkvmerge v59.0.0 ('Shining Star') 64-bit
Writing library                          : libebml v1.4.2 + libmatroska v1.6.4
Encoding Gui                             : Hybrid 2021.09.30.1

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 5 s 171 ms
Bit rate                                 : 787 Mb/s
Width                                    : 3 632 pixels
Height                                   : 16 pixels
Display aspect ratio                     : 227.000
Frame rate mode                          : Variable
Frame rate                               : 33.262 FPS
Bits/(Pixel*Frame)                       : 407.064
Stream size                              : 485 MiB (99%)
Default                                  : Yes
Forced                                   : Yes

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : A_AAC-2
Duration                                 : 1 min 26 s
Bit rate                                 : 132 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Delay relative to video                  : 21 ms
Stream size                              : 1.37 MiB (0%)
Default                                  : Yes
Forced                                   : No
Reply
#13
What is black? The video?

The muxing call:
"C:\Program Files\Hybrid\64bit\mkvmerge.exe" --ui-language en -o "C:\Video\Hybrid Output\2021-10-01@11_43_07_7510__05.mkv" --global-tags "C:\Users\Michael\AppData\Local\Temp\mkvtags_2021-10-01@11_43_07_7510__05.xml" -d 0 --default-track 0:yes --default-duration "0:30000/1001fps" --no-chapters --compression -1:none --forced-track 0:yes --no-audio --no-subtitles "C:\Users\Michael\AppData\Local\Temp\amarec(20210928-1250)-01_2021-10-01@11_43_07_7510_04.avi" --default-track 0:yes --sync 0:-43 --forced-track 0:no -a 0 --compression -1:none --no-video --no-subtitles --no-chapters "C:\Users\Michael\AppData\Local\Temp\iId_4_aid_1_DELAY_-43ms_2021-10-01@11_43_07_7510_02.aac"
2021.10.01 - 11:43:16_Windows 10 Version 2009 (64bit)_2021.09.30.1 - level 9: tokenizeAndStart(1): "C:\Program Files\Hybrid\64bit\mkvmerge.exe" --ui-language en -o "C:\Video\Hybrid Output\2021-10-01@11_43_07_7510__05.mkv" --global-tags "C:\Users\Michael\AppData\Local\Temp\mkvtags_2021-10-01@11_43_07_7510__05.xml" -d 0 --default-track 0:yes --default-duration "0:30000/1001fps" --no-chapters --compression -1:none --forced-track 0:yes --no-audio --no-subtitles "C:\Users\Michael\AppData\Local\Temp\amarec(20210928-1250)-01_2021-10-01@11_43_07_7510_04.avi" --default-track 0:yes --sync 0:-43 --forced-track 0:no -a 0 --compression -1:none --no-video --no-subtitles --no-chapters "C:\Users\Michael\AppData\Local\Temp\iId_4_aid_1_DELAY_-43ms_2021-10-01@11_43_07_7510_02.aac"
looks fine and there's no error in the log,..

Encoding the audio und passing through the video works fine here with the sample you provided,...

Cu Selur
Reply
#14
I'm not sure why that is. Here is what I got as output:
https://drive.google.com/file/d/1DHQYkAl...sp=sharing
Reply
#15
Quote:Unfortunately after uninstalling 9-30 and installing 10-01 it is giving the exact same output.
Try, remuxing your source with mkvtoolnix to mkv before processing it with Hybrid.
No clue why the sample you send me worked fine, but the extraction from the original has problems.

Cu Selur
Reply
#16
So the mux from avi to mkv using MKVToolNix worked as expected, but when running that mkv file through Hybrid (video passthrough & audio encode) I got the same output with the botched video.
Reply
#17
Does is change if you:
a. dis/enable: Config->Input->Extraction->Stream extraction with ffmpeg ?
b. dis/enable:Config->Containers->FFmpeg for .mkv muxing?

Cu Selur
Reply
#18
Unfortunately no combination of those worked. When I enabled FFMPEG for mkv muxing I got an error.
Reply
#19
C:\Users\Michael\AppData\Local\Temp\amarec(20210928-1250)-01_2021-10-01@12_41_55_9810_05.avi: Invalid data found when processing input
okay, what is strange is that Hybrid uses .avi as container for the extraciton.
-> looking into it.
Reply
#20
When I use the sample you send me I Hybrid properly uses .264 and the h264 bitstream filter.
ffmpeg -y -i "C:\Users\Selur\Desktop\sync_problem.mkv" -map 0:0 -vcodec copy -an -sn -map_metadata -1 -metadata encoding_tool="Hybrid 2021.10.01.1" -r 24000/1001 -bsf:v h264_mp4toannexb,filter_units=remove_types=6 "E:\Temp\sync_problem_new_2021-10-01@19_51_42_9710_03.264"

Please create a debug output of the analysis of:
a. the analysis of the file
b. the job creation

Cu Selur
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)