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.

How to crop and deinterlace in Hybrid?
#1
Version: Hybrid 2021.12.10.1

I previously posted it on DigitalFAQ.

After finding manually scripting on AviSynth too complicated, I decided to installed Hybrid instead. It looks appear to be a mash of all the things needed to clean up VHS capture in one software and functions via GUI.
  • I attempted to do a job with a HuffYUV compressed 720x576 YUY2 4:2:2 interleaved VHS capture
  • I set the x264 AVC Profile/Level to 4.2
  • Cropped out the noise edges and enlarged it to 1440x1080 via 10 - bicubic spline. I cropped Left 8, Bottom 0, Right 8 and Top 16.
  • QTGMC deinterlace on the default VapourSynth setting AND Bob ticked
  • I set the default container to .avi and set Audio Processing to "passthrough all"

Other than that, I haven't touch any of the other settings. When I execute the job, it done it all but the output is really tiny (like 6 kb). What am I doing wrong? I feel like I'm really close to having a workflow set up so I can upload future videos in better quality on my YouTube channel.

---

I don't fully understand how to resize a cropped video correctly. Also been told you need to adjust the bitrate if you are resizing the picture. There could be other settings I need to adjust that I wasn't aware about. 

The end goal is working out a basic workflow/post-capture procedure for cropping and deinterlace and then saving it as an .avi again (not encode the output) so I can upload it to YouTube to interlace it again. 
Please, read the 'Infos needed to fix&reproduce bugs,..'-sticky before you post about a problem.
Reply
#2
Looking at the debug output.
Audio extraction seems to work fine
created C:\Users\kakeh\AppData\Local\Temp\iId_1_aid_1_2022-03-08@22_31_41_4010_01.wav (5.596 MB)
Video encoding seems to work fine
created C:\Users\kakeh\AppData\Local\Temp\2022-03-08@22_31_41_4010_05.264 (5.41367 MB)
Video is then remuxed to mkv (to avoid problem on remuxing raw h.264), which seems to work fine
created C:\Users\kakeh\AppData\Local\Temp\2022-03-08@22_31_41_4010__09.mkv (5.42961 MB)
Muxing the audio&video using:
"C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y  -r 50/1 -i "C:\Users\kakeh\AppData\Local\Temp\2022-03-08@22_31_41_4010__09.mkv" -i "C:\Users\kakeh\AppData\Local\Temp\iId_1_aid_1_2022-03-08@22_31_41_4010_01.wav" -vcodec copy -acodec copy -metadata encoding_tool="Hybrid 2021.12.10.1" -map 0:0 -map 1:0  -aspect 1440:1080 -r 50/1 -f avi "F:\VHS\Test V2.avi"
fails with:
H.264 bitstream malformed, no startcode found, use the video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb' option with ffmpeg)
-> I will look into it, as a workaround not muxing into .avi as output container probably works fine.

Quote:The end goal is working out a basic workflow/post-capture procedure for cropping and deinterlace and then saving it as an .avi again (not encode the output)
There is no way around reencoding the video when cropping and deinterlacing video.

Cu Selur

Ps.: will send you a link to a dev verison for testing via pm in a few minutes.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
Quote:There is no way around reencoding the video when cropping and deinterlacing video.

What should I do with it after finishing my cleanups? Leave it as .h264 and .avi container? Thank you for the link, I will let you know if there any improvements. How come the output file came out tiny though?
Reply
#4
Quote:How come the output file came out tiny though?
The output was just some broken output,...
Quote:What should I do with it after finishing my cleanups?
Depends on what your goal is. If you want to create an intermediate file you should use lossless compression.
Also H.264 should be put in .mp4/.mkv/.mov/.m2ts containers not .avi which isn't really suited for frames types with multiple references in both directions.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#5
Looks like it worked. The file size is now 11mb (from a 30 second test video) instead of 11kb and it shows it has been deinterlaced and cropped and fully viewable. I uploaded the debug file below for your convenience. Do you have any advice to or settings I could use to improve the quality? Does the bitrate has to be altered in any way?

Quote:Depends on what your goal is. If you want to create an intermediate file you should use lossless compression.


Which I have done, captured it in HuffYUV. My goal is to create lossless VHS capture that I can upload onto YouTube.

The settings I been trying to use was based off another user's method over at DigitalFAQ who use Avisynth.

AviSource("G:\Tape14\Untitled1T.avi")
QTGMC(Preset="Fast")
prefetch(3)
Crop(8, 8, -16, -6)
LanczosResize(1440, 1080)
Quote:Also H.264 should be put in .mp4/.mkv/.mov/.m2ts containers not .avi which isn't really suited for frames types with multiple references in both directions.

So what video should I use if I use .avi as the container?
Reply
#6
Quote:Do you have any advice to or settings I could use to improve the quality?
For the filtering, without seeing the source? No
For compression, without knowing which format you use: No

Quote:Does the bitrate has to be altered in any way?
Not if you aim for that bitrate.

Quote:So what video should I use if I use .avi as the container?
Don't really know why you would use .avi as container, but if you were to use .avi an you wanted:

Quote:My goal is to create lossless VHS capture that I can upload onto YouTube.
+
Quote:Which I have done, captured it in HuffYUV.
Then you already got a lossless capture which you probably could upload to YouTube. (as long as your source < 256GB)
Deinterlacing will reduce the quality as will cropping and resizing, so you throw away the lossless part. Which is probably not a bad idea since it usually is advised to:
a. deinterlace interlaced content before uploading to YouTube (to make sure it's done properly)
b. upscale your content before uploading to YouTube (to get a bit of additional quality)

In general I would:
a. probably add tons of filtering before uploading VHS content to YouTube (denoise, degrain, deblocking, color corrections,...)
b. probably use x264 as video codec with a 1 pass quality encoding and a low crf (like 16).

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#7
Quote:Don't really know why you would use .avi as container, but if you were to use .avi an you wanted:
With the semi colon , I presume you were about to say something. So you think it better to use .mp4 as the container instead?



Quote:In general I would:
a. probably add tons of filtering before uploading VHS content to YouTube (denoise, degrain, deblocking, color corrections,...)
b. probably use x264 as video codec with a 1 pass quality encoding and a low crf (like 16).
Is it "constant rate factor (1-pass)" or "constant quaintizer (1-pass)" and then set the "Quantization factor" to 16?

It very trivial, but you misspelled in "Overwrite" in Config > Internals > Warnings    
Reply
#8
Quote:With the semi colon , I presume you were about to say something. So you think it better to use .mp4 as the container instead?
Yes, unless you use some ofl vfw based format I would not recommend to use .avi nowadays.
Quote:Is it "constant rate factor (1-pass)" or "constant quaintizer (1-pass)" and then set the "Quantization factor" to 16?
Constrained rate fractor.
Quote:It very trivial, but you misspelled in "Overwrite" in Config > Internals > Warnings
Will fix.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#9
One last question, how do you forcefully enable and disable Deinterlace? I can't seem to find it on there. Thank you for all the help, I'll seek help if needed in the future.
Reply
#10
Hybrid does apply deinterlacers if:
a. input scan type is not 'progressive' (Filtering->(De-)Interlace/Telecine->Deinterlace/Telecine Settings->Input scan type) or the input scan type is overwritten (Filtering->(De-)Interlace/Telecine->Deinterlace/Telecine Settings->Overwrite input scan type to) to something other than 'progressive'.
AND
b. the chosen encoder does not create interlaced output.
So if your source is interlaced, but wrongly flagged, you should overwrite the input scan type to let Hybrid know how to handle the source.
If you don't want Hybrid to deinterlace and your source is flagged as interlaced, you need to make sure the output encoder is set for interlaced output.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)