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.

Audio not fully sync after feeding through Hybrid
#11
Quote:Remuxing the source with ffmpeg in a command line to see warnings&go might help.

How do I do that? Is that on the MKVToolNix software or do I have to type it in cmd?

-

Another note although you say it was an estimate, when I did the the simple remux, I loaded that up in Hybrid and it shown it has lost 182 frames, almost the same amount of frame loss than doing it before. The least amount of frame loss I got is when I tick prefer avisource for .avi input. I don't think it your software not being able to handle it since it also happened when doing a simple edit like changing the RGB filter on VirtualDub itself.

Another troubleshooting I could do is attempt it with a completely different VHS tape since the problems regarding the syncing has all came from one particular tape which I have found to have several jitters and weird artefact, there definitely something off with that tape but I could be wrong.

It seem like I'm not the only one who encounter this tedious problem when capturing VHS.

https://github.com/FFMS/ffms2/issues/370
Reply
#12
You can also try whether it makes a difference if:
a. "Config->Internals->Decoding->CFR Output" is enabled
or when
b. "Config->Internals->Automation->On Load->Always extract time codes from input" is enabled (and 'only some' is disabled)

Quote:"PATH TO Hybrid/64bit/ffmpeg.exe" -c copy -vsync 2 -i "PATH to source" "PATH to output file"
Is a command line call, you need to call inside a Windows Command prompt.

Cu Selur
Reply
#13
Tried to do the command on cmd and I got this:


C:\Program Files\Hybrid\64bit>ffmpeg.exe -copy vsync 2 -i "F:\VHS\Broken Silence - Waste Not Want Not.avi" "F:\VHS\Broken Silence - Waste Not Want Not ffmpeg.mkv"

ffmpeg version N-106315-g69efe3d1e4-g6f210ebae2+1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev10, Built by MSYS2 project)
  configuration:  --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --ld='ccache g++' --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libopenmpt --enable-version3 --enable-librav1e --enable-libsrt --enable-libgsm --enable-libvmaf --enable-libsvtav1 --enable-mbedtls --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads
  libavutil      57. 24.101 / 57. 24.101
  libavcodec    59. 25.100 / 59. 25.100
  libavformat    59. 20.100 / 59. 20.100
  libavdevice    59.  6.100 / 59.  6.100
  libavfilter    8. 29.100 /  8. 29.100
  libswscale      6.  6.100 /  6.  6.100
  libswresample  4.  6.100 /  4.  6.100
  libpostproc    56.  5.100 / 56.  5.100
Unrecognized option 'copy'.
Error splitting the argument list: Option not found

Edit:

So I tried doing CFR Output enable without ticking the prefer .avi source for .avi input and it still not sync but only lost around 10 frames.

Also tried doing it with "Always extract time codes from input" enabled and 'only some' is disabled and that lost about 182 frames.

Out of the tests I did, ticking CFR Output or Prefer .avi source for .avi input settings seems to mitigate the async and less obvious but it not 100% synced. (For some reason, the Prefer .avi source input setting now has an extra frame, from 38311 to 38112 frames. I know the frame thing is an estimate but still strange since it previously said 38311.)


Attached Files
.7z   Broken Silence - Waste Not Want Not (Editied) 25fps deinterlace prefer avisource for .avi input CFR Ouput enabled.7z (Size: 34,27 KB / Downloads: 5)
.7z   Broken Silence - Waste Not Want Not (Editied) 25fps deinterlace CFR Ouput enabled.7z (Size: 25,25 KB / Downloads: 6)
.7z   Broken Silence - Waste Not Want Not (Editied) 25fps deinterlace Always extract time codes from input enabled but only some disabled.7z (Size: 62,01 KB / Downloads: 8)
Reply
#14
C:\Program Files\Hybrid\64bit>ffmpeg.exe -copy vsync 2 -i "F:\VHS\Broken Silence - Waste Not Want Not.avi" "F:\VHS\Broken Silence - Waste Not Want Not ffmpeg.mkv"
You missed a '-', should be '-vsnyc 2'.
+ I made a mistage should be '-c copy' instead of just '-copy' Wink

Looking at the debug output I see:
LAVF_check: AVI (Audio Video Interleaved)
AVI file format detected.
list_end=0x2344
======= AVI Header =======
us/frame: 40000  (fps=25.000)
max bytes/sec: 7259364
padding: 0
MainAVIHeader.dwFlags: (272) HAS_INDEX IS_INTERLEAVED
frames  total: 7261   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  720 x 576
==========================
list_end=0x11B4
==> Found video stream: 0
ID_VIDEO_ID=0
[aviheader] Video stream found, -vid 0
====== STREAM Header =====
Type: vids   FCC: HFYU (55594648)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 25/1 = 25.000
Start: 0   Len: 38311
Suggested BufferSize: 535336
Quality 10000
Sample size: 0
==========================
Found 'bih', 232 bytes of 40
======= VIDEO Format ======
  biSize 232
  biWidth 720
  biHeight 576
  biPlanes 1
  biBitCount 24
  biCompression 1431914056='HFYU'
  biSizeImage 829440
Unknown extra header dump: [2] [10] [0] [0] [42] [25] [26] [47] [68] [c9] [a] [9] [b] [b] [c] [9] [d] [9] [e] [9] [f] [8] [10] [9] [d1] [32] [31] [d2] [53] [34] [53] [74] [35] [37] [36] [37] [38] [59] [7a] [38] [37] [38] [79] [3a] [39] [3a] [59] [58] [39] [38] [37] [58] [39] [78] [59] [5a] [98] [79] [3a] [39] [38] [37] [56] [35] [36] [35] [36] [35] [34] [35] [74] [73] [12] [8] [11] [8] [10] [8] [f] [9] [ee] [d] [9] [c] [a] [b] [b] [ea] [c9] [88] [67] [26] [24] [22] [42] [24] [26] [28] [2a] [2b] [2c] [2d] [2e] [2f] [30] [51] [32] [73] [74] [35] [34] [95] [54] [55] [36] [37] [19] [19] [1a] [8c] [19] [10] [58] [39] [38] [37] [38] [76] [75] [14] [a] [93] [72] [31] [50] [2f] [4e] [2c] [2b] [2a] [27] [25] [23] [22] [21] [23] [25] [27] [28] [29] [4b] [2c] [4d] [2e] [4f] [70] [71] [52] [94] [35] [39] [38] [59] [38] [19] [b8] [38] [19] [c] [38] [39] [58] [36] [37] [35] [54] [33] [52] [31] [30] [4f] [2e] [2d] [4c] [2b] [2a] [29] [28] [27] [24] [22] [0]
===========================
====== AVI Super Index Header ========
  FCC (indx) dwSize (4120) wLongsPerEntry(4)
  bIndexSubType (0) bIndexType (0)
  nEntriesInUse (5) dwChunkId (00dc)
  dwReserved[0] (0) dwReserved[1] (0) dwReserved[2] (0)
===========================
ODML (00dc): [0] 0x000000029709a4bc 0x10020 8192
ODML (00dc): [1] 0x00000002970aa4dc 0x10020 8192
ODML (00dc): [2] 0x00000002970ba4fc 0x10020 8192
ODML (00dc): [3] 0x00000002970ca51c 0x10020 8192
ODML (00dc): [4] 0x00000002970da53c 0xad58 5543
list_end=0x2238
==> Found audio stream: 1
ID_AUDIO_ID=1
[aviheader] Audio stream found, -aid 1
====== STREAM Header =====
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 192000/4 = 48000.000
Start: 0   Len: 73557120
Suggested BufferSize: 96000
Quality -1
Sample size: 4
==========================
Found 'wf', 16 bytes of 18
======= WAVE Format =======
Format Tag: 1 (0x1)
Channels: 2
Samplerate: 48000
avg byte/sec: 192000
Block align: 4
bits/sample: 16
cbSize: 0
==========================================================================
====== AVI Super Index Header ========
  FCC (indx) dwSize (4120) wLongsPerEntry(4)
  bIndexSubType (0) bIndexType (0)
  nEntriesInUse (5) dwChunkId (01wb)
  dwReserved[0] (0) dwReserved[1] (0) dwReserved[2] (0)
===========================
ODML (01wb): [0] 0x00000002970e5294 0x10020 15750720
ODML (01wb): [1] 0x00000002970f52b4 0x10020 15728640
ODML (01wb): [2] 0x00000002971052d4 0x10020 15728640
ODML (01wb): [3] 0x00000002971152f4 0x10020 15728640
ODML (01wb): [4] 0x0000000297125314 0xad00 10620480
list_end=0x2344
AVI: dmlh found (size=248) (total_frames=38311)
list_end=0x7EFAEE94
Found movie at 0x280C - 0x7EFAEE94
Reading INDEX block, 14521 chunks for 7261 frames (fpos=2130374300).
Additional RIFF header...
list_end=0xFDFB8D38
Found movie at 0x280C - 0xFDFB8D38
Additional RIFF header...
list_end=0x7CF74010
Found movie at 0x280C - 0x7CF74010
Additional RIFF header...
list_end=0xFBF2C504
Found movie at 0x280C - 0xFBF2C504
Additional RIFF header...
list_end=0x7AEDC05C
Found movie at 0x280C - 0x7AEDC05C
Additional RIFF header...
list_end=0x97130014
Found movie at 0x280C - 0x97130014
AVI: ODML: Building ODML index (2 superindexchunks).
====== AVI Standard Index Header ========
  FCC (ix00) dwSize (65560) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (8192) dwChunkId (00dc)
  qwBaseOffset (0x19F1C) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix00) dwSize (65560) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (8192) dwChunkId (00dc)
  qwBaseOffset (0x9057DC70) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix00) dwSize (65560) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (8192) dwChunkId (00dc)
  qwBaseOffset (0x1190EE528) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix00) dwSize (65560) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (8192) dwChunkId (00dc)
  qwBaseOffset (0x1A49C79FC) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix00) dwSize (44368) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (5543) dwChunkId (00dc)
  qwBaseOffset (0x2326CFD34) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix01) dwSize (65560) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (8192) dwChunkId (01wb)
  qwBaseOffset (0x2814) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix01) dwSize (65560) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (8192) dwChunkId (01wb)
  qwBaseOffset (0x9057BE68) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix01) dwSize (65560) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (8192) dwChunkId (01wb)
  qwBaseOffset (0x1190EC720) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix01) dwSize (65560) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (8192) dwChunkId (01wb)
  qwBaseOffset (0x1A49C5BF4) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix01) dwSize (44280) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (5532) dwChunkId (01wb)
  qwBaseOffset (0x2326CDF2C) dwReserved3 (0)
===========================
AVI index offset: 0x0 (movi=0x280C idx0=0x280C idx1=0x19F14)
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=10828842120 (38311) audio size=294228480 (73557120)
VIDEO:  [HFYU]  720x576  24bpp  25.000 fps  56531.2 kbps (6900.8 kbyte/s)
Auto-selected AVI video ID = 0
Auto-selected AVI audio ID = 1
[V] filefmt:3  fourcc:0x55594648  size:720x576  fps:25.000  ftime:=0.0400
It seems like ffmpeg has some problems with the headers of the AVI.
Additionalls there are three places in the clip where the time stamps are not correct for 25fps.

My guess is the combination of both is what causes the problem. (Hybrid isn't desinged to deal with content where the input has sync issues&co.)

Is the .avi sync if you open it in Virtual Dub? If it is may be converting to another lossless format and using mkv as container in Virtual Dub helps to get a file that can be processed by libav based tools.

Cu Selur
Reply
#15
Got given this, is this correct?:

C:\Program Files\Hybrid\64bit>ffmpeg.exe -c copy -vsync 2 -i "F:\VHS\Broken Silence - Waste Not Want Not.avi" "F:\VHS\Broken Silence - Waste Not Want Not ffmpeg.mkv"

ffmpeg version N-106315-g69efe3d1e4-g6f210ebae2+1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev10, Built by MSYS2 project)
  configuration:  --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --ld='ccache g++' --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libopenmpt --enable-version3 --enable-librav1e --enable-libsrt --enable-libgsm --enable-libvmaf --enable-libsvtav1 --enable-mbedtls --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads
  libavutil      57. 24.101 / 57. 24.101
  libavcodec    59. 25.100 / 59. 25.100
  libavformat    59. 20.100 / 59. 20.100
  libavdevice    59.  6.100 / 59.  6.100
  libavfilter    8. 29.100 /  8. 29.100
  libswscale      6.  6.100 /  6.  6.100
  libswresample  4.  6.100 /  4.  6.100
  libpostproc    56.  5.100 / 56.  5.100
Passing a number to -vsync is deprecated, use a string argument as described in the manual.
[avi @ 0000022604897bc0] non-interleaved AVI
Unknown decoder 'copy'
Reply
#16
nearly try:
ffmpeg.exe  -i "F:\VHS\Broken Silence - Waste Not Want Not.avi" -c copy -vsync vfr "F:\VHS\Broken Silence - Waste Not Want Not ffmpeg.mkv"

Cu Selur
Reply
#17
C:\Program Files\Hybrid\64bit>ffmpeg.exe  -i "F:\VHS\Broken Silence - Waste Not Want Not.avi" -c copy -vsync vfr "F:\VHS\Broken Silence - Waste Not Want Not ffmpeg.mkv"
ffmpeg version N-106315-g69efe3d1e4-g6f210ebae2+1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (Rev10, Built by MSYS2 project)
  configuration:  --pkg-config=pkgconf --cc='ccache gcc' --cxx='ccache g++' --ld='ccache g++' --disable-autodetect --enable-amf --enable-bzlib --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-iconv --enable-lzma --enable-nvenc --enable-zlib --enable-sdl2 --enable-ffnvcodec --enable-nvdec --enable-cuda-llvm --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libaom --disable-debug --enable-fontconfig --enable-libass --enable-libbluray --enable-libfreetype --enable-libmfx --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libwebp --enable-libxml2 --enable-libzimg --enable-libshine --enable-gpl --enable-avisynth --enable-libxvid --enable-libopenmpt --enable-version3 --enable-librav1e --enable-libsrt --enable-libgsm --enable-libvmaf --enable-libsvtav1 --enable-mbedtls --extra-cflags=-DLIBTWOLAME_STATIC --extra-libs=-lstdc++ --extra-cflags=-DLIBXML_STATIC --extra-libs=-liconv --disable-w32threads
  libavutil      57. 24.101 / 57. 24.101
  libavcodec    59. 25.100 / 59. 25.100
  libavformat    59. 20.100 / 59. 20.100
  libavdevice    59.  6.100 / 59.  6.100
  libavfilter    8. 29.100 /  8. 29.100
  libswscale      6.  6.100 /  6.  6.100
  libswresample  4.  6.100 /  4.  6.100
  libpostproc    56.  5.100 / 56.  5.100
[avi @ 000001b6f4dd7ac0] non-interleaved AVI
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, avi, from 'F:\VHS\Broken Silence - Waste Not Want Not.avi':
  Duration: 00:25:32.44, start: 0.000000, bitrate: 58074 kb/s
  Stream #0:0: Video: huffyuv (HFYU / 0x55594648), yuv422p, 720x576, 56547 kb/s, 25 fps, 25 tbr, 25 tbn
  Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Output #0, matroska, to 'F:\VHS\Broken Silence - Waste Not Want Not ffmpeg.mkv':
  Metadata:
    encoder        : Lavf59.20.100
  Stream #0:0: Video: huffyuv (HFYU / 0x55594648), yuv422p, 720x576, q=2-31, 56547 kb/s, 25 fps, 25 tbr, 1k tbn
  Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=38128 fps= 44 q=-1.0 Lsize=10864705kB time=00:25:32.44 bitrate=58079.7kbits/s speed=1.75x
video:10575041kB audio:287332kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.021463%

There suppose to be 38311 frames but it seems to finish at 38128. There wasn't any errors during the process and still out of sync.
Reply
#18
Okay, if a basic remux with ffmpeg and mkvtoolnix both create an async output there is something wrong and Hybrid can't fix it.
No clue whats the cause if the original file plays fine.
(Could be an issue with the file or the system, or both ffmpeg and mkvtoolnix having some problem nobody encountered so far.)
-> I'm out of ideas.

Cu Selur
Reply
#19
You did what you can to help which I'm very thankful for, I think I know how to mitigate the problem though and finger crosses it only happened on that particular VHS tape.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)