tsftd
28th April 2018, 05:05
Hi there, first of all, I'm not entirely sure that this is the right subforum, so please move it if it's not.
I'm trying to capture + convert family VHS tapes, and some work fine, but I've been hitting a wall with the audio sync on others.
I'm using virtualdub to record, mediainfo results here:
General
Complete name : D:\2004 Vid Exer brick wall No#12 cut beg end.avi
Format : AVI
Format/Info : Audio Video Interleave
Format profile : OpenDML
File size : 25.9 GiB
Duration : 25 min 36 s
Overall bit rate : 145 Mb/s
Writing library : VirtualDub build 35491/release
Video
ID : 0
Format : YUV
Codec ID : YUY2
Codec ID/Info : YUV 4:2:2 as for UYVY but with different component ordering within the u_int32 macropixel
Duration : 25 min 36 s
Bit rate : 143 Mb/s
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:2
Compression mode : Lossless
Bits/(Pixel*Frame) : 15.568
Stream size : 25.6 GiB (99%)
Audio
ID : 1
Format : PCM
Format settings : Little / Signed
Codec ID : 1
Duration : 25 min 36 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 : 281 MiB (1%)
Alignment : Aligned on interleaves
Interleave, duration : 33 ms (1.00 video frame)
Interleave, preload duration : 500 ms
The resulting AVI works perfectly, but is obviously a little... big. So I switch to MeGUI, using QTGMC to deinterlace, using the AVS script here:
Import("C:\Programs\Megui\tools\QTGMC\plugins\QTGMC.avsi")
Import("C:\Programs\Megui\tools\QTGMC\plugins\SMDegrain_v3.1.2.93s.avsi")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\RgTools.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\masktools2.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\nnedi3.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\mvtools2.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\EEDI2.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\PlanarTools.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\TDeint.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\eedi3.dll")
SetMemoryMax(1024)
LoadPlugin("C:\Programs\Megui\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("D:\2004 Vid Exer brick wall No#12 cut beg end.avi")
crop(4, 4, -8, -8)
ConvertToYV12(interlaced=true)
QTGMC( Preset="Slow" )
#denoise
And the output is fine... until I mux it into an MKV. The audio isn't just offset, it wanders, so setting a delay doesn't help. Mediainfo here:
General
Unique ID : 179977519268871847062986824869458377060 (0x876668CC5167C18A1A2094AF0C2E7964)
Complete name : D:\2004 Vid Exer brick wall No#12 cut beg end.avi (1).mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 919 MiB
Duration : 25 min 36 s
Overall bit rate : 5 018 kb/s
Encoded date : UTC 2018-04-28 02:29:52
Writing application : mkvmerge v22.0.0 ('At The End Of The World') 64-bit
Writing library : libebml v1.3.5 + libmatroska v1.4.8
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L3.1@Main
Codec ID : V_MPEGH/ISO/HEVC
Duration : 25 min 36 s
Bit rate : 4 834 kb/s
Width : 628 pixels
Height : 468 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 58.322 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Bits/(Pixel*Frame) : 0.282
Stream size : 885 MiB (96%)
Writing library : x265 2.7+1-2aa737a99f51:[Windows][GCC 7.3.0][64 bit] 8bit+10bit+12bit
Encoding settings : cpuid=1173503 / frame-threads=4 / numa-pools=16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=628x468 / interlace=0 / total-frames=89584 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=5 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=25 / keyint=250 / gop-lookahead=0 / bframes=8 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=40 / lookahead-slices=0 / scenecut=40 / radl=0 / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / amp / max-tu-size=32 / tu-inter-depth=3 / tu-intra-depth=3 / limit-tu=4 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=4 / limit-refs=1 / limit-modes / me=3 / subme=4 / merange=57 / temporal-mvp / weightp / weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=6 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=23.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1
Language : English
Default : Yes
Forced : No
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC-2
Duration : 25 min 36 s
Bit rate : 180 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : 9 ms
Stream size : 33.0 MiB (4%)
Language : English
Default : Yes
Forced : No
I've tried everything that I can think of: muxing the encoded video + original audio, importing the original video's timestamps, etc, etc.
Any help would be greatly appreciated!
I'm trying to capture + convert family VHS tapes, and some work fine, but I've been hitting a wall with the audio sync on others.
I'm using virtualdub to record, mediainfo results here:
General
Complete name : D:\2004 Vid Exer brick wall No#12 cut beg end.avi
Format : AVI
Format/Info : Audio Video Interleave
Format profile : OpenDML
File size : 25.9 GiB
Duration : 25 min 36 s
Overall bit rate : 145 Mb/s
Writing library : VirtualDub build 35491/release
Video
ID : 0
Format : YUV
Codec ID : YUY2
Codec ID/Info : YUV 4:2:2 as for UYVY but with different component ordering within the u_int32 macropixel
Duration : 25 min 36 s
Bit rate : 143 Mb/s
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:2
Compression mode : Lossless
Bits/(Pixel*Frame) : 15.568
Stream size : 25.6 GiB (99%)
Audio
ID : 1
Format : PCM
Format settings : Little / Signed
Codec ID : 1
Duration : 25 min 36 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 : 281 MiB (1%)
Alignment : Aligned on interleaves
Interleave, duration : 33 ms (1.00 video frame)
Interleave, preload duration : 500 ms
The resulting AVI works perfectly, but is obviously a little... big. So I switch to MeGUI, using QTGMC to deinterlace, using the AVS script here:
Import("C:\Programs\Megui\tools\QTGMC\plugins\QTGMC.avsi")
Import("C:\Programs\Megui\tools\QTGMC\plugins\SMDegrain_v3.1.2.93s.avsi")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\RgTools.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\masktools2.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\nnedi3.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\mvtools2.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\EEDI2.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\PlanarTools.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\TDeint.dll")
LoadPlugin("C:\Programs\Megui\tools\QTGMC\plugins\eedi3.dll")
SetMemoryMax(1024)
LoadPlugin("C:\Programs\Megui\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("D:\2004 Vid Exer brick wall No#12 cut beg end.avi")
crop(4, 4, -8, -8)
ConvertToYV12(interlaced=true)
QTGMC( Preset="Slow" )
#denoise
And the output is fine... until I mux it into an MKV. The audio isn't just offset, it wanders, so setting a delay doesn't help. Mediainfo here:
General
Unique ID : 179977519268871847062986824869458377060 (0x876668CC5167C18A1A2094AF0C2E7964)
Complete name : D:\2004 Vid Exer brick wall No#12 cut beg end.avi (1).mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 919 MiB
Duration : 25 min 36 s
Overall bit rate : 5 018 kb/s
Encoded date : UTC 2018-04-28 02:29:52
Writing application : mkvmerge v22.0.0 ('At The End Of The World') 64-bit
Writing library : libebml v1.3.5 + libmatroska v1.4.8
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L3.1@Main
Codec ID : V_MPEGH/ISO/HEVC
Duration : 25 min 36 s
Bit rate : 4 834 kb/s
Width : 628 pixels
Height : 468 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 58.322 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Bits/(Pixel*Frame) : 0.282
Stream size : 885 MiB (96%)
Writing library : x265 2.7+1-2aa737a99f51:[Windows][GCC 7.3.0][64 bit] 8bit+10bit+12bit
Encoding settings : cpuid=1173503 / frame-threads=4 / numa-pools=16 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=628x468 / interlace=0 / total-frames=89584 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=5 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=25 / keyint=250 / gop-lookahead=0 / bframes=8 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=40 / lookahead-slices=0 / scenecut=40 / radl=0 / no-intra-refresh / ctu=64 / min-cu-size=8 / rect / amp / max-tu-size=32 / tu-inter-depth=3 / tu-intra-depth=3 / limit-tu=4 / rdoq-level=2 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=4 / limit-refs=1 / limit-modes / me=3 / subme=4 / merange=57 / temporal-mvp / weightp / weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=6 / no-early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=1.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=23.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=1 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=2 / transfer=2 / colormatrix=2 / chromaloc=0 / display-window=0 / max-cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / no-opt-cu-delta-qp / no-aq-motion / no-hdr / no-hdr-opt / no-dhdr10-opt / analysis-reuse-level=5 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-mv-type=0 / copy-pic=1
Language : English
Default : Yes
Forced : No
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC-2
Duration : 25 min 36 s
Bit rate : 180 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : 9 ms
Stream size : 33.0 MiB (4%)
Language : English
Default : Yes
Forced : No
I've tried everything that I can think of: muxing the encoded video + original audio, importing the original video's timestamps, etc, etc.
Any help would be greatly appreciated!