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] Audio/video out of sync in output
#11
Quote:I can see the combing effect though which I've read is a good indicator of interlaced content.
You also see combing artifacts on telecined content.
To know what your content is (interlaced, telecined, some other pull-down, progressive, mix of those) you need to look at the fields, easy way to do this is to look at the source:
When there are no combing artifacts then the clip is progressive.
When there are only combing artifacts on some scenes you got mixed content. -> more analysis needed
When there are combing artifacts: -> more analysis needed
For analysis you bob deinterlace the content and look whether there are duplicates.
no duplicates: the content is normal interlaced
duplicates that follow a pattern: some pull-down, or frame duplication; if you are lucky just telecined or simple frame duplication. Smile (see: https://en.wikipedia.org/wiki/Telecine)
duplicates that do not follow a patter: manual scripting is needed to properly handle this

Quote:Isn't the 10s sample enough for identifying?
I can tell you from the 10s that that sample is properly interlaced content.
(when bobbed each interpolated frame is different from it's predecessor)
So your source is probably NTSC interlaced, but you should look out for that if you convert NTSC->PAL.

Cu Selur
Reply
#12
(01.08.2020, 12:33)Selur Wrote:
Quote:I can see the combing effect though which I've read is a good indicator of interlaced content.
You also see combing artifacts on telecined content.
To know what your content is (interlaced, telecined, some other pull-down, progressive, mix of those) you need to look at the fields, easy way to do this is to look at the source:
When there are no combing artifacts then the clip is progressive.
When there are only combing artifacts on some scenes you got mixed content. -> more analysis needed
When there are combing artifacts: -> more analysis needed
For analysis you bob deinterlace the content and look whether there are duplicates.
no duplicates: the content is normal interlaced
duplicates that follow a pattern: some pull-down, or frame duplication; if you are lucky just telecined or simple frame duplication. Smile (see: https://en.wikipedia.org/wiki/Telecine)
duplicates that do not follow a patter: manual scripting is needed to properly handle this

Quote:Isn't the 10s sample enough for identifying?
I can tell you from the 10s that that sample is properly interlaced content.
(when bobbed each interpolated frame is different from it's predecessor)
So your source is probably NTSC interlaced, but you should look out for that if you convert NTSC->PAL.

Cu Selur
Thanks. The source is PAL VHS. I have attached the new logs here.


Attached Files
.zip   HybridDebugOutput.zip (Size: 406,48 KB / Downloads: 12)
Reply
#13
Looked at the debug output, sadly none of the tools used reported any problems.
No clue what is different between this and your other files which work without a problem.
Only thing that seems strange is that Hybrid expected 255 388 frames but x264 encoded only 254 844 frames. Small difference +/- 2 frames are do be expected but ~500 frames difference seems like there might be something wrong with the processing of the source.
Here are a few things to try:
  • Assuming you have a 64bit vfw codec for Lagarinth installed on your system you can try using AviSource instead of LWLibAVSource, by enabling "Filtering->Vapoursynth->Misc->Input->Prefer AviSource for .avi input"
  • You can also try using FFMpegVideoSource2 instead of LWLibAVSource by disabling "Filtering->Vapoursynth->Misc->Input->Prefer LWLibAVSource over FFmpegSource2.
  • You can also try enabling "Config->Internals->Decoding->CFR output"
  • You can try whether using Avisynth does change anything. There you can also try whether enabling "Filtering->Avisynth->Misc->Sourcefilter Settings->Prefer AviSource for avi input" does change anything.

Cu Selur
Reply
#14
(01.08.2020, 18:36)Selur Wrote: Looked at the debug output, sadly none of the tools used reported any problems.
No clue what is different between this and your other files which work without a problem.
Only thing that seems strange is that Hybrid expected 255 388 frames but x264 encoded only 254 844 frames. Small difference +/- 2 frames are do be expected but ~500 frames difference seems like there might be something wrong with the processing of the source.
Here are a few things to try:
  • Assuming you have a 64bit vfw codec for Lagarinth installed on your system you can try using AviSource instead of LWLibAVSource, by enabling "Filtering->Vapoursynth->Misc->Input->Prefer AviSource for .avi input"
  • You can also try using FFMpegVideoSource2 instead of LWLibAVSource by disabling "Filtering->Vapoursynth->Misc->Input->Prefer LWLibAVSource over FFmpegSource2.
  • You can also try enabling "Config->Internals->Decoding->CFR output"
  • You can try whether using Avisynth does change anything. There you can also try whether enabling "Filtering->Avisynth->Misc->Sourcefilter Settings->Prefer AviSource for avi input" does change anything.

Cu Selur
Thanks for the analysis. I have a theory before trying your suggestion. The original VHS tape had some defects near the edges of the film, so the captured footage was not smooth as you can see in the sample I've PM'd you. Could this be the reason for the frame drop/sync issues? I thought of this originally, but then thought this is just converting one format to the other, so if the AVI doesn't have sync issues then the mp4 shouldn't either.
Reply
#15
Have you tried reproducing the issue with that sample?

And sure frame drops&co can cause problems during re-compression, especially with Hybrid since it's designed for having non-broken files as input.
You might have better results with Handbrake or FFmpeg based guis which do Audio&Video in one go, since that allows some additional error handling.

Cu Selur
Reply
#16
(01.08.2020, 21:53)Selur Wrote: Have you tried reproducing the issue with that sample?

And sure frame drops&co can cause problems during re-compression, especially with Hybrid since it's designed for having non-broken files as input.
You might have better results with Handbrake or FFmpeg based guis which do Audio&Video in one go, since that allows some additional error handling.

Cu Selur
Yes, I tried with that sample and the output was fine. It's when the whole file gets encoded that the a/v drift happens.
I tried about 7 ffmpeg GUIs and they seem to not have the sync issue as you suggested, but none of them have the same output quality as Hybrid (for one I couldn't figure out how to enable qtgmc bob deinterlace). I'm not sure if you are familiar with ffmpeg but I was gonna ask if I can post my hybrid command line and you help me with the equivalent ffmpeg command line so I can get ffmpeg's ouput as close to hybrid's as possible.

x264 --preset fast --crf 15.00 --profile high422 --level 4.1 --sync-lookahead 14 --qpmax 51 --vbv-maxrate 150000 --vbv-bufsize 187500 --sar 1:1 --qpfile GENERATED_QP_FILE --non-deterministic --colormatrix bt470bg --demuxer raw --input-res 720x576 --input-range tv --input-depth 10 --fps 50/1 --output-csp i422 --output-depth 10 --output "C:\Users\retract\AppData\Local\Temp\tape 22.264" -

Also, since I selected the "fast" preset, do the settings from other tabs. namely "Frames", "Rate Control", etc... matter and if yes, are they reflected in the command line from the "Base" tab?
Reply
#17
Regarding deinterlacing you are at a dead end.
There's no qtgmc equivalent in ffmpeg.
Regarding mapping x264 options to ffmpeg, see: https://sites.google.com/site/linuxencod...eg-mapping

Quote:Also, since I selected the "fast" preset, do the settings from other tabs. namely "Frames", "Rate Control", etc... matter and if yes, are they reflected in the command line from the "Base" tab?
Yes, the settings in the other tabs matter. When you applied the 'fast' preset, Hybrid adjusted all settings covered by the preset to those values.
So if you change a setting in any of the tabs it will change the command line.

Quote:I tried about 7 ffmpeg GUIs and they seem to not have the sync issue as you suggested,
Yup, that's the downside of processing audio&video in different processes you can't adjust one to problems of the other, which is why Hybrid is intended for non-broken/defect content.
You can also try Handbrake, but it also doesn't have QTGMC or something on it's level.

Cu Selur
Reply
#18
(04.08.2020, 17:02)Selur Wrote: Regarding deinterlacing you are at a dead end.
There's no qtgmc equivalent in ffmpeg.
Regarding mapping x264 options to ffmpeg, see: https://sites.google.com/site/linuxencod...eg-mapping

Quote:Also, since I selected the "fast" preset, do the settings from other tabs. namely "Frames", "Rate Control", etc... matter and if yes, are they reflected in the command line from the "Base" tab?
Yes, the settings in the other tabs matter. When you applied the 'fast' preset, Hybrid adjusted all settings covered by the preset to those values.
So if you change a setting in any of the tabs it will change the command line.

Quote:I tried about 7 ffmpeg GUIs and they seem to not have the sync issue as you suggested,
Yup, that's the downside of processing audio&video in different processes you can't adjust one to problems of the other, which is why Hybrid is intended for non-broken/defect content.
You can also try Handbrake, but it also doesn't have QTGMC or something on it's level.

Cu Selur
Thanks. I found the nnedi deinterlacer which does a better job in terms of quality but it's awfully slow. By the way the latest version of Hybrid got rid of the "force" checkbox for deinterlace. Is there no longer a way to force deinterlace?
Reply
#19
Quote: Is there no longer a way to force deinterlace?
Sure, simply tell Hybrid which scan type it should assume. Smile
btw. depending on the speed setting QTGMC also uses nnedi3, it's not really new. Wink

Cu Selur
Reply
#20
(07.08.2020, 04:39)Selur Wrote:
Quote: Is there no longer a way to force deinterlace?
Sure, simply tell Hybrid which scan type it should assume. Smile
btw. depending on the speed setting QTGMC also uses nnedi3 Wink

Cu Selur
Oh, good to know. I've been using the placebo preset but it's still much faster than nnedi with ffmpeg. 1h 25m avi took ffmpeg with nnedi 14 hours, but it took Hybrid ~3 hours.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)