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 13th February 2022, 17:06   #1  |  Link
Mitra
Registered User
 
Join Date: Mar 2021
Posts: 31
Can a filter (e.g. QTGMC ) be skipped at run-time?

I have a script that feeds my player like this:


Code:
FFMS2("s.ts")
QTGMC()
It works, but it's very slow when seeking to different positions (with a slider), although I need a fast seek.

my question:
Is it possible to skip/ignore QTGMC filter when the player is seeking/paused?
OR
Is it possible to change and apply the script at run-time?

Last edited by Mitra; 13th February 2022 at 17:21.
Mitra is offline   Reply With Quote
Old 13th February 2022, 17:43   #2  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 1,191
Here is fastest ver of QTGMC:
https://github.com/Dogway/Avisynth-S...ods/QTGMC.avsi
kedautinh12 is offline   Reply With Quote
Old 13th February 2022, 21:04   #3  |  Link
Mitra
Registered User
 
Join Date: Mar 2021
Posts: 31
@kedautinh12, Thanks for your reply, I use the same but not fast enough to seek. (my source is 1080i50)

I need to control the Avisynth filters from my player, but I do not know how.

Last edited by Mitra; 13th February 2022 at 21:06.
Mitra is offline   Reply With Quote
Old 13th February 2022, 21:07   #4  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,228
From RT_Stats,
Code:
RT_GetProcessName(bool "parent"=false,bool "debug"=false)
 Returns string, name of current process eg "VirtualDubMod.exe" or "AvsPMod.exe" or name of parent process
 (the one that started our process eg "Explorer.exe"). Debug outputs some info to DebugView.
 Returns String, if error returns -ve int error code.
Call QTGMC dependent upon process name.

Untested
Code:
FFMS2("s.ts")
Proc = RT_GetProcessName()
Assert(Proc.IsString,"RT_GetProcessName, Error="+String(Proc))
(Proc!="PotPlayer.Exe") ? QTGMC() : Last
Return Last
__________________
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; 13th February 2022 at 21:38.
StainlessS is offline   Reply With Quote
Old 13th February 2022, 21:32   #5  |  Link
Mitra
Registered User
 
Join Date: Mar 2021
Posts: 31
Quote:
Originally Posted by StainlessS View Post
From RT_Stats,
Code:
RT_GetProcessName(bool "parent"=false,bool "debug"=false)
 Returns string, name of current process eg "VirtualDubMod.exe" or "AvsPMod.exe" or name of parent process
 (the one that started our process eg "Explorer.exe"). Debug outputs some info to DebugView.
 Returns String, if error returns -ve int error code.
Call QTGMC dependent upon process name.

Untested
Code:
Proc = RT_GetProcessName()
Assert(Proc.IsString,"RT_GetProcessName, Error="+String(Proc))
(Proc!="PotPlayer.Exe") ? QTGMC() : Last
Thanks, I was not aware of that, and a big thank you for creating such a great functions, but I honestly did not understand how your script works for what I need.
Mitra is offline   Reply With Quote
Old 13th February 2022, 21:37   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,228
If running in PotPlayer then it dont call QTGMC(), if not then does call QTGMC().
you would have to test against all your player process names.
(Potplayer [proc name PotPlayer.Exe] is a media player)
Process name is the one shown via Task Manager, or CTRL/SHIFT/ESCape.

Or
Code:
FFMS2("s.ts")
Proc = RT_GetProcessName()
Assert(Proc.IsString,"RT_GetProcessName, Error="+String(Proc)) # check for Error getting Process name
(Proc=="PotPlayer.Exe" || Proc=="MPC-HC (x64).Exe") ? Last : QTGMC()  # if "PotPlayer" or "MPC-HC (x64)" then skip QTGMC() else call it
Return Last
Change the names depending upon which players you use.
__________________
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; 13th February 2022 at 21:47.
StainlessS is offline   Reply With Quote
Old 13th February 2022, 21:53   #7  |  Link
Mitra
Registered User
 
Join Date: Mar 2021
Posts: 31
Quote:
Originally Posted by StainlessS View Post
If running in PotPlayer then it dont call QTGMC(), if not then does call QTGMC().
you would have to test against all your player process names.
(Potplayer is a media player)
Process name is the one shown via Task Manager, or CTRL/SHIFT/ESCape.
Thanks, but I want to skip QTGMC in one player at run-time, but the RT_GetProcessName always returns myPlayer.exe and cannot get a signal/command from my player,
I mean : I wrote my video player using ffmpeg API that feeds by Avisynth, now how can I say to the script something like this :

if (my player is playing)
{return QTGMC}
else
if (my player is paused/seeking)
{return Last }

sorry for my bad English.

Last edited by Mitra; 13th February 2022 at 22:11.
Mitra is offline   Reply With Quote
Old 13th February 2022, 22:02   #8  |  Link
Mitra
Registered User
 
Join Date: Mar 2021
Posts: 31
@StainlessS, If it was possible to rename the process whenever the player was running, I could use it, but unfortunately this is not the case.
Mitra is offline   Reply With Quote
Old 13th February 2022, 22:33   #9  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,228
OK, you want to know if seeking or whatever, sorry cant help.
[Dont think you are going to have much luck with that]
(I had read your post earlier, but forgot your requirement,
I only posted after kedautinh12 post, and did not re-read requirement)
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 13th February 2022, 22:48   #10  |  Link
Mitra
Registered User
 
Join Date: Mar 2021
Posts: 31
Quote:
Originally Posted by StainlessS View Post
OK, you want to know if seeking or whatever, sorry cant help.
[Dont think you are going to have much luck with that]
(I had read your post earlier, but forgot your requirement,
I only posted after kedautinh12 post, and did not re-read requirement)

,Thank you so much for your time.

I wish I could send keyboard keys to filters at run-time to control them.
Mitra is offline   Reply With Quote
Old 13th February 2022, 22:55   #11  |  Link
Zarxrax
Registered User
 
Join Date: Dec 2001
Posts: 1,213
If its a player that you wrote yourself, is it possible to have it load two scripts? One of the scripts would have QTGMC disabled, and you would pull frames from that when seeking. Then when you begin playback, swap to the other script. Not sure if its feasible, but just an idea.
Zarxrax is offline   Reply With Quote
Old 13th February 2022, 23:02   #12  |  Link
Mitra
Registered User
 
Join Date: Mar 2021
Posts: 31
Quote:
Originally Posted by Zarxrax View Post
If its a player that you wrote yourself, is it possible to have it load two scripts? One of the scripts would have QTGMC disabled, and you would pull frames from that when seeking. Then when you begin playback, swap to the other script. Not sure if its feasible, but just an idea.

Thanks for the idea, but I've done this before, and unfortunately it takes about 0.7 second when loading and replacing the sources / scripts.
Mitra is offline   Reply With Quote
Old 13th February 2022, 23:08   #13  |  Link
Frank62
Registered User
 
Join Date: Mar 2017
Location: Germany
Posts: 187
If I understand right: You want to watch, sometimes seek, and again watch. So why do these 0.7 seconds matter?
Frank62 is offline   Reply With Quote
Old 13th February 2022, 23:20   #14  |  Link
Mitra
Registered User
 
Join Date: Mar 2021
Posts: 31
Quote:
Originally Posted by Frank62 View Post
If I understand right: You want to watch, sometimes seek, and again watch. So why do these 0.7 seconds matter?
The video is playing in slow motion for many people in a hall and should not be interrupted.
I'm curious to know if this can be done with Avisynth or not,but I'm disappointed.

Last edited by Mitra; 13th February 2022 at 23:23.
Mitra is offline   Reply With Quote
Old 13th February 2022, 23:23   #15  |  Link
Zarxrax
Registered User
 
Join Date: Dec 2001
Posts: 1,213
Its a little curious that you can play the video in realtime with qtgmc but the seeking performance is not good enough. I wouldn't expect seeking to use that much more resources than playback, but maybe I'm wrong.
Have you tried tweaking the qtgmc settings to make it perform faster, or is it possible to use a quicker filter instead of qtgmc?
Zarxrax is offline   Reply With Quote
Old 13th February 2022, 23:33   #16  |  Link
Mitra
Registered User
 
Join Date: Mar 2021
Posts: 31
Quote:
Originally Posted by Zarxrax View Post
Its a little curious that you can play the video in realtime with qtgmc but the seeking performance is not good enough. I wouldn't expect seeking to use that much more resources than playback, but maybe I'm wrong.
Have you tried tweaking the qtgmc settings to make it perform faster, or is it possible to use a quicker filter instead of qtgmc?
Yes, of course , I tried tweaking the qtgmc settings to make it perform faster and my machine is very fast, but seeking is not fast enough for my 1080i50 sources.

also, tried some another filters, but the qtgmc has better quality for what i want.

Last edited by Mitra; 13th February 2022 at 23:37.
Mitra is offline   Reply With Quote
Old 13th February 2022, 23:43   #17  |  Link
Mitra
Registered User
 
Join Date: Mar 2021
Posts: 31
These are my questions:

Can a filter (e.g. QTGMC ) be skipped/ignored at run-time?
OR
Is it possible to skip/ignore QTGMC filter when the player is seeking/paused?
OR
Is it possible to change and apply the script at run-time?

But unfortunately, their answer seems to be NO.

I compiled Avisynth+ CUDA to get better performance, but could not use qtgmc please see this my post.

Last edited by Mitra; 13th February 2022 at 23:52.
Mitra is offline   Reply With Quote
Old 14th February 2022, 00:29   #18  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,373
Quote:
Originally Posted by Mitra View Post
Thanks for the idea, but I've done this before, and unfortunately it takes about 0.7 second when loading and replacing the sources / scripts.
You can extract multiple clips programatically from one AviSynth environment, then switch between them instantly for display. E.g., have a script which says:

Code:
source = AviSource("source.avi")
_preview = source
return source.QTGMC()
The return value of the script will be the QTGMC'd clip, but you can use env->Invoke to get a PClip for _preview.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 14th February 2022, 01:39   #19  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 1,191
If you use Avs cuda, you can try KTGMC
https://github.com/pinterf/AviSynthC...er/TestScripts

Or you can try another faster filter like
yadifmod2:
https://github.com/Asd-g/yadifmod2
BWDIF:
https://github.com/Asd-g/AviSynth-BWDIF
kedautinh12 is offline   Reply With Quote
Old 14th February 2022, 08:14   #20  |  Link
Mitra
Registered User
 
Join Date: Mar 2021
Posts: 31
Quote:
Originally Posted by wonkey_monkey View Post
You can extract multiple clips programatically from one AviSynth environment, then switch between them instantly for display. E.g., have a script which says:

Code:
source = AviSource("source.avi")
_preview = source
return source.QTGMC()
The return value of the script will be the QTGMC'd clip, but you can use env->Invoke to get a PClip for _preview.
I'll try it,thanks.
Mitra is offline   Reply With Quote
Reply

Tags
avisynth, filter, qtgmc, video

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 09:16.


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