digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Capture, Record, Transfer (https://www.digitalfaq.com/forum/video-capture/)
-   -   Deinterlacing already captured footage? (https://www.digitalfaq.com/forum/video-capture/10720-deinterlacing-captured-footage.html)

retractOffer 06-13-2020 03:23 AM

Deinterlacing already captured footage?
 
3 Attachment(s)
Hello,

I have captured my NTSC 8mm tapes as well as my VHS-C PAL tapes using virtualdub (Lagarith) and now I am trying to encode them to mp4 using avidemux.
I have analyzed the captured file and determined it to be interlaced because I can see the combing effect. In avidemux's x264 settings, there is the "Interlaced" checkbox that I am assuming I have to check because the source is interlaced. When I check the box and select TFF, the output seems sped up (not really sped up but it just looks that way) in VLC when its "Deinterlace" option is set to auto or on. However, when Deinterlace is set to off in VLC, it looks like the master copy (looks normal).
1) Why is this the case?

Also when the output MP4 file is displayed on TV (Sony A9G) it looks sped up just like on PC with VLC's Deinterlace option set to auto or on and there's no setting for toggling deinterlacing on the TV.
I was under the impression that I should not deinterlace just for the heck of it because modern TVs do deinterlace interlaced videos on the fly.
When I do not check the "Interlaced" option in avidemux, the output mp4 looks fine on PC with VLC's deinterlace option set to auto or off and looks jerky when set to on.

2) Doesn't not checking the "Interlaced" option in avidemux mean avidemux is going to deinterlace the video? It seems to do so because mediainfo reports "progressive" on the output but I can still see the combing effect on the end result. The output in terms of combing effect is the same as the one with "Interlaced" checked. What am I missing here?

3) Am I correct to say that for viewing on TV I shouldn't deinterlace?

4) If I wanna view on a PC, should I deinterlace or use on the fly deinterlace like the one in VLC?

5) If I need to deinterlace for the scenarios I explained, what is the best software (+instructions) to do so? I've read that QTGMC is very good, but I had trouble setting up avisynth on Windows 10.

6) Select TFF or BFF?

Attached are 10s samples of the master, interlaced checked, and interlaced not checked videos for reference.

Thanks

lordsmurf 06-13-2020 11:22 PM

Do not deinterlace in Avidemux.
Do not even encode in VLC. It's a player, the encoding is terrible.

VLC has all kinds of screwy issues, and I never use it for anything but casually watching videos. Never to check anything of important. The Yadif(x2) looks best for deinterlace, but on 2 of your clips it stutters. The other is buttery smooth 59.94fps.

H.264 handles interlace poorly on playback devices.
MPEG = interlaced
H264 = deinterlaced (QTGMC, use Hybrid to make it easy)

TFF vs. BFF is completely determined by the source. VHS via lossless will be TFF.

retractOffer 06-14-2020 12:27 AM

Quote:

Originally Posted by lordsmurf (Post 69446)
Do not deinterlace in Avidemux.
Do not even encode in VLC. It's a player, the encoding is terrible.

VLC has all kinds of screwy issues, and I never use it for anything but casually watching videos. Never to check anything of important. The Yadif(x2) looks best for deinterlace, but on 2 of your clips it stutters. The other is buttery smooth 59.94fps.

H.264 handles interlace poorly on playback devices.
MPEG = interlaced
H264 = deinterlaced (QTGMC, use Hybrid to make it easy)

TFF vs. BFF is completely determined by the source. VHS via lossless will be TFF.

Appreciate your response. Could you address all my questions? Also which 2 clips are you referring to? I think you should've tried only on the original sample. The other two were derived from the original.

lordsmurf 06-14-2020 12:43 AM

Some of the question don't make much sense, other made moot by earlier post.

1. Why? I don't see what you see.
2. That setting just flags (or doesn't) the file. Interlace flagged as progressive is possible (and wrong).
3. It's about source, not viewing device.
4. "PC" (computer) viewed how? Local vs. online/streaming. Again, about source, not viewer.
5. QTGMC using Hybrid as the encoder.
6. Already answered.

VHS is interlaced, should be left that way, aside from something like Youtube uploading.

retractOffer 06-22-2020 12:25 AM

Quote:

Originally Posted by lordsmurf (Post 69455)
VHS is interlaced, should be left that way, aside from something like Youtube uploading.

I need to compress to mp4 and upload to Google Photos (which is basically YouTube). So, you're saying I should deinterlace?

Also, is there a guide for setting up QTGMC on Windows 10?

-- merged --

I followed this tutorial to install QTGMC. Do you have a script available? I'm not sure how to proceed now.

lordsmurf 06-24-2020 10:19 PM

Quote:

Originally Posted by retractOffer (Post 69592)
I need to compress to mp4 and upload to Google Photos (which is basically YouTube). So, you're saying I should deinterlace?
Also, is there a guide for setting up QTGMC on Windows 10?
I followed this tutorial to install QTGMC. Do you have a script available? I'm not sure how to proceed now.

For merely deinterlacing and converting to H264 (MP4 wrapper), Avisynth scripting is a waste of time and energy.

Use Hybrid. http://www.selur.de/downloads

That's what I do. Easy.

Spend that time tweaking the encode settings for the H264 encoding. And use a good CRF mode, high teens or low 20s.

Deinterlace is a few switches (with Vapoursynth being better than Avisynth).

Save scripted QTGMC for more complex Avisynth needs.

retractOffer 07-02-2020 02:00 AM

Quote:

Originally Posted by lordsmurf (Post 69705)
For merely deinterlacing and converting to H264 (MP4 wrapper), Avisynth scripting is a waste of time and energy.

Use Hybrid. http://www.selur.de/downloads

That's what I do. Easy.

Spend that time tweaking the encode settings for the H264 encoding. And use a good CRF mode, high teens or low 20s.

Deinterlace is a few switches (with Vapoursynth being better than Avisynth).

Save scripted QTGMC for more complex Avisynth needs.

Thanks. So yes to deinterlacing?

-- merged --

bump!
bump!
bump!

lordsmurf 07-10-2020 06:12 AM

Quote:

I need to compress to mp4 and upload to Google Photos (which is basically YouTube). So, you're saying I should deinterlace?
Yes.
Yes.
Yes. :)

retractOffer 07-12-2020 07:11 PM

Quote:

Originally Posted by lordsmurf (Post 70015)
Yes.
Yes.
Yes. :)

Thanks. Regarding the Hybrid encoder:
1) which AVC Profile/Level should I select? High10, High4:2:2, High4:4:4 and the level 5:2, 5:1, 5:0, 4:2, ...
2) Deinterlacer Yadif custom or QTGMC(Vapoursynth) or something else?
3) Do I select even or odd?
4) Do I do anything to double the framerate? How? Does this affect the quality adversely?
4) I tried QTGMC(Vapoursynth) and I can still see the combing effect in the output file, albeit less. Is this expected? (played the output using virtualdub)

http://www.digitalfaq.com/forum/error.gif

Thanks

lordsmurf 07-12-2020 07:41 PM

You need to attach images to the forum, not hotlink Imgur (which breaks).

4:2:2 retains all color data.
Depends on use. Something like Youtube compresses to 4:2:0

QTGMC, never Yadif, when the choice exists.
Neither even or odd, but bob to get 59.94fps (NTSC) / 50fps (PAL)

I'd need a sample clip to process. But if this is lossless AVI source, you need to force deinterlace. Not auto.

retractOffer 07-12-2020 09:20 PM

1 Attachment(s)
Quote:

Originally Posted by lordsmurf (Post 70119)
You need to attach images to the forum, not hotlink Imgur (which breaks).

4:2:2 retains all color data.
Depends on use. Something like Youtube compresses to 4:2:0

QTGMC, never Yadif, when the choice exists.
Neither even or odd, but bob to get 59.94fps (NTSC) / 50fps (PAL)

I'd need a sample clip to process. But if this is lossless AVI source, you need to force deinterlace. Not auto.

Thanks, Sample is attached to the first post with title 'org.avi'.

1) 4:2:2 with what level?
2) when bob is selected, the footage becomes slow mo and sound is lost for the ~second half.
3) how does doubling the frame rate improve the quality? I mean if the source is 30 fps how does it becomes 60 fps?
4) please refer to question 4 in the previous post.

Picture attached.

lordsmurf 07-15-2020 09:34 PM

2 Attachment(s)
See screen shots.

High422 + i422, select in BOTH places.

The interlace is just settings issue. Force, specify source, set method.
59.94 retains all possible motion data.
To get there, interpolation happens, so it can be argued that 29.97 is fine. But it's somewhat like 720x480 for VHS source. Overkill to nth degree, but CPU and space is less of an issue these days.

That help? :)

And yes, in case you noticed, I have my own templates saved. I do intend to share those eventually, but must have time to make guides. Not getting time I need lately.

retractOffer 07-16-2020 01:53 AM

2 Attachment(s)
Quote:

Originally Posted by lordsmurf (Post 70170)
See screen shots.

High422 + i422, select in BOTH places.

The interlace is just settings issue. Force, specify source, set method.
59.94 retains all possible motion data.
To get there, interpolation happens, so it can be argued that 29.97 is fine. But it's somewhat like 720x480 for VHS source. Overkill to nth degree, but CPU and space is less of an issue these days.

That help? :)

And yes, in case you noticed, I have my own templates saved. I do intend to share those eventually, but must have time to make guides. Not getting time I need lately.

Thanks for the explanation. Please see BOTH items below:
1) I was asking about the AVC level shown with an arrow in the attached screenshot. It has all sorts of numbers. What is the 4.1 selection based off of?
2) The footage is doubled in duration when bob is selected. That is why it becomes slow motion and the audio only plays for half the duration (original duration). I have attached the encoded sample here which is twice the length of the original file @ 20 seconds.

lordsmurf 07-19-2020 11:37 PM

4.1 @ 4:2:2 was fine. Let it auto.
BTW, CRF of 10 is nuts. Too low number.

You need to show your deinterlace screen, you made a wrong settings choice somewhere.

retractOffer 07-20-2020 12:30 AM

2 Attachment(s)
Quote:

Originally Posted by lordsmurf (Post 70276)
4.1 @ 4:2:2 was fine. Let it auto.
BTW, CRF of 10 is nuts. Too low number.

You need to show your deinterlace screen, you made a wrong settings choice somewhere.

What is the 4.1 selection based off of?
Please see the deinterlace screenshot attached. I've also tried with "Faster" preset and it didn't make a difference in terms of the issue. (nothing else under the "Vapoursynth" tab is selected except the ones in the screenshot that were set by default)

lordsmurf 07-20-2020 12:33 AM

It's just default. Hybrid has documentation that will explain what each is more in depth. In fact, it's not app specific, but general info on profiles. I think you're thinking too much into this.

Stop using Slower, use Faster.

I don't see any issue there. It must be a settings problem elsewhere.

retractOffer 07-20-2020 01:40 AM

5 Attachment(s)
Quote:

Originally Posted by lordsmurf (Post 70300)
It's just default. Hybrid has documentation that will explain what each is more in depth. In fact, it's not app specific, but general info on profiles. I think you're thinking too much into this.

Stop using Slower, use Faster.

I don't see any issue there. It must be a settings problem elsewhere.

Attached are my settings based on a combination of online research and mostly avidemux documentation. It's a bit overkill, but I prefer quality over size. Please tell me if you see anything wrong here that contributes to the slow-mo issue.

Bogilein 07-20-2020 09:17 AM

2 Attachment(s)
Quote:

Originally Posted by retractOffer (Post 70297)
What is the 4.1 selection based off of?

https://en.wikipedia.org/wiki/Advanced_Video_Coding#Levels


I would use the presets under the x264 tab. I prefer the preset:slow and tune:grain. Don't forget to push the arrows on the right to set your preset and grain selection.

Two-pass is another bad choice. That was good for mpg encoding.

You should use constant rate factor (1pass) and a quantization factor between 17-23.

Attachment 12219

You can watch your vapoursynth script which is used when you hit the sign next to the eye.

Attachment 12220

retractOffer 07-22-2020 01:33 AM

Quote:

Originally Posted by Bogilein (Post 70323)
https://en.wikipedia.org/wiki/Advanced_Video_Coding#Levels

I would use the presets under the x264 tab. I prefer the preset:slow and tune:grain. Don't forget to push the arrows on the right to set your preset and grain selection.

Two-pass is another bad choice. That was good for mpg encoding.

You should use constant rate factor (1pass) and a quantization factor between 17-23.

Attachment 12219

You can watch your vapoursynth script which is used when you hit the sign next to the eye.

Attachment 12220

Appreciate your response. I also tried CRF, but the slo-mo issue persists.

Below is the vapoursynth script being run:

Code:

# 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
core = vs.get_core()
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.append(os.path.abspath(scriptPath))
# Loading Plugins
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
# input color space: YUV422P8, bit depth: 8, resolution: 720x480, fps: 29.97
# Loading C:\Users\jackie\Desktop\org.avi using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/jackie/Desktop/org.avi", format="YUV422P8", cache=0, prefer_hw=0)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 29.970
clip = core.std.AssumeFPS(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
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=True) # new fps: 59.94
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=True)
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
# adjusting output color from: YUV422P8 to YUV422P10 for x264Model (i422)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, range_s="limited")
# Output
clip.set_output()


lordsmurf 07-22-2020 04:13 AM

The current version of Hybrid is messed up. It encodes to 200%, and the video is half speed. Roll back to a previous version. I'm not sure how far. I was using 3/19, upgraded to 7/20 tonight, and it's worse for sure.


All times are GMT -5. The time now is 08:03 PM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.