Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th February 2024, 01:37   #1  |  Link
iz-Moff
Registered User
 
Join Date: May 2014
Posts: 3
Having difficulties with QTGMC \ MakeMKV

Hi.

I want to encode a tv series from DVD source, using QTGMC for de-interlacing, but there seems to be an issue with it not maintaining the field order. The source is BFF, if i do
Code:
FFMPEGSource2("D:\recomp\S01D1\VIDEO_TS\mkv\A1_t00.mkv", atrack=1)
AssumeBFF()
SeparateFields()
everything looks fine, playback is smooth. But then if i use QTGMC
Code:
FFMPEGSource2("D:\recomp\S01D1\VIDEO_TS\mkv\A1_t00.mkv", atrack=1)
AssumeBFF()
QTGMC(preset="Very Slow", FPSDivisor=2, TR2=3, Sharpness=0.0
i get "jumpy" video, and the thing is, it happens regardless of which field order i choose.

Now, i'm using MakeMKV to mux DVD into mkv container. The reason i'm doing it is cause it's very convenient, it automatically splits the DVD stream into individual episodes, convers chapter time codes, subtitles, audio streams etc. So all i have to do then is run a script to generate .avs and encoder .bat scripts, making the entire process almost automatic.

But there seems to be something about the mkv files that throws QTGMC off. Cause i tried to use DGIndex to demux the problematic episode, DGDecode_mpeg2source as the source filter, and then, using the same script above, QTGMC works fine.

Which is all well and good, but i'm really not looking forward to manually demuxing every individual episode with DGIndex. Does anyone know if anything can be done to make QTGMC work smoothly with mkv files? I tried to google it, but haven't found much besides a few comments suggesting that it could be an issue with FFmpegSource, which i use to load mkvs.

Or maybe someone knows of a program that can do something similar to what MakeMKV does, except producing .d2v files and extracting streams instead?
iz-Moff is offline   Reply With Quote
Old 20th February 2024, 11:18   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,018
Maybe its NTSC telecine source, with (non-separated frames) 3 good frames, 2 combed frames, where DgIndex would remove repeated fields and provide
output of 'smooth' non combed 23.976FPS instead of the 3 good, 2 combed frames of 29.97FPS that you are probably getting.
[DGindex in such case probably using, Menu/Video/Field-Operation/Ignore Pulldown Flags ticked (or is it Honour Pulldown Flags, I dont often have such source, and hate it)]

To separate ripped VIDEO_TS/VOBs into episodes, I usually use DvdShrink/ReAuthor mode, (WITHOUT shrinking, ie Compession Settings @ "No Compression"),
In DvdShrink Preferences, set Target DVD size to DVD-9, where no re-compression will ever be necessary [ie no shrinking, no quality loss].
[EDIT: You can also choose which episode language audio/subs you require]

Then, I use DGindex on each of the new DvdShrink extracted [episode] VIDEO_TS/VOB sets.
EDIT: Best results will be using DGIndex to de-telecine, better than MakeMkv/DgIndexNV where extra processing would be required to identify and remove the extra telecine repeat fields.

EDIT: I aint no expert on such 'stuff', perhaps others have better suggestions.

EDIT: Below a DGIndex Template file, set location of it in DGIndex settings. [I usually copy it to DGINDEX/TEMPLATES Folder]
DgIndex_Test_Template.avs [Totally untested, Requires the audio source + TFM filters]
Code:
# DGIndex Template, below "__???__" filled in by DgIndex
DGI_VideoFileName   ="__vid__"
DGI_AudioFileName   ="__aud__"
DGI_AudioDelay      =Value("__del__")

Video = Mpeg2Source(DGI_VideoFileName)
#Video = Video.TFM(d2v=DGI_VideoFileName)  # Remove repeat fields from NTSC telecine stuff, ie 29.97 > 23.976 FPS, use if DGIndex "Honour Pulldown Flags"

AudioExt = GetFileExtension(DGI_AudioFileName)

Audio=    (AudioExt==".ac3") ? NICAC3Source(DGI_AudioFileName,channels=2,DRC=0)
        \ : (AudioExt==".mpa"||AudioExt=="mp1"||AudioExt==".mp2"||AudioExt==".mp3") ? NicMPG123Source(DGI_AudioFileName,Normalize=False)
        \ : (AudioExt==".wav") ? RaWavSource(DGI_AudioFileName)
        \ : (AudioExt==".dts") ? NicDTSSource(DGI_AudioFileName)
        \ : (AudioExt==".w64") ? RaWavSource(DGI_AudioFileName,samplerate=6)
        \ : 0

Assert(!isInt(Audio),"NO AUDIO")

AudioDubEx(Video,Audio)    # Last is now Video + Audio
DelayAudio(DGI_AudioDelay)
Trim(0,0) # Chop/Pad audio to same length as video

# Dont think these are necessary, think DGIndex sets field order by default
#AssumeTFF
#AssumeBFF

########################################
### YOUR EXTRA PROCESSING STUFF HERE ###


###   END OF YOUR EXTRA PROCESSING   ###
########################################

Prefetch(4) # Or whatever number
Return Last

#
Function GetFileExtension(string fn) { rfn=fn.RevStr i=rfn.FindStr(".") Return (i==0) ? "" : rfn.LeftStr(i).RevStr }
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 20th February 2024 at 12:49.
StainlessS is offline   Reply With Quote
Old 20th February 2024, 12:55   #3  |  Link
takla
Registered User
 
Join Date: May 2018
Posts: 213
Or try
Code:
LWLibavVideoSource("C:\Users\Admin\Documents\INPUT.mkv")
https://github.com/HomeOfAviSynthPlu...Works/releases
takla is offline   Reply With Quote
Old 20th February 2024, 14:55   #4  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,208
"SeparateFields()"

After separate fields you got x2 fps and smooth enough motion. And with FPSDivisor=2, you got 1x fps at output (?). So if you need same smooth motion as field-based you need to run QTGMC in 2x fps processing mode and output 2x fps.

From documentation - http://avisynth.nl/index.php/QTGMC
By default QTGMC outputs video at "double-rate", twice the frame rate of the source. This is because there are two separate images (fields) in every frame, which the deinterlacing process restores in full. By setting FPSDivisor to 2, every second frame is dropped and the output frame rate is the same as the source ("single-rate")
DTL is offline   Reply With Quote
Old 20th February 2024, 15:40   #5  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,508
Quote:
Originally Posted by iz-Moff View Post
But there seems to be something about the mkv files that throws QTGMC off. Cause i tried to use DGIndex to demux the problematic episode, DGDecode_mpeg2source as the source filter, and then, using the same script above, QTGMC works fine.
The only explanation is bad source filter, such as old ffms2 version

Quote:
Which is all well and good, but i'm really not looking forward to manually demuxing every individual episode with DGIndex. Does anyone know if anything can be done to make QTGMC work smoothly with mkv files? I tried to google it, but haven't found much besides a few comments suggesting that it could be an issue with FFmpegSource, which i use to load mkvs.

Or maybe someone knows of a program that can do something similar to what MakeMKV does, except producing .d2v files and extracting streams instead?
If you have a compatible Nvidia card, DGSource (DGDecNV) works on MKV

Or lsmash suggested above , or update ffms2
poisondeathray is offline   Reply With Quote
Reply

Tags
de-interlacing, ffmpegsouce, makemkv, qtgmc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:46.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.