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. |
|
|
Thread Tools | Search this Thread | Display Modes |
7th December 2020, 05:06 | #82 | Link |
Registered User
Join Date: May 2019
Posts: 42
|
The reason why it hangs is because the plugin tries to get frame on it own whenever the script is imported. However, the filter needs to import script during initialization phase to determine video info, when the source samples are not yet available. It becomes a chicken egg problem.
I could make it not hang by providing fake empty frame during initialization, and switch to real frame after, but I think you might be better just use FDecimate2 instead, if that's an option. I can give you a test build if you want. Last edited by CrendKing; 7th December 2020 at 05:14. |
7th December 2020, 14:55 | #83 | Link | |
Registered User
Join Date: Mar 2016
Posts: 160
|
Quote:
I've added SetFilterMTMode("ApparentFPS", MT_SERIALIZED) string to script, nothing changed.
__________________
I'm infected with poor sources. Last edited by cork_OS; 7th December 2020 at 15:06. |
|
7th December 2020, 18:04 | #84 | Link |
Registered User
Join Date: May 2019
Posts: 42
|
It's not necessarily bad practice, because for conventional avs usage the source video file is probably always available. It is just not very compatible with the video playing use case.
You can try https://github.com/CrendKing/avisynt...ynthFilter.zip if that fixes the TDecimate problem. It shouldn't hang, and I can see FPS change to 24, but I can't guarantee if every part of TDecimate is working properly. I'll tend to the other one later. Maybe you can submit an issue for tracking purpose? |
7th December 2020, 20:53 | #85 | Link | |
Registered User
Join Date: Mar 2016
Posts: 160
|
Quote:
Interestingly, TDecimate injected into SVP generated script doesn't hang with the previous AVSF version. Sure, I'll do it now.
__________________
I'm infected with poor sources. |
|
7th December 2020, 23:15 | #86 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Yeh, and how bout RequestFramesLinear() ?
__________________
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 ??? |
16th October 2021, 10:26 | #87 | Link |
Registered User
Join Date: Jun 2014
Posts: 3
|
Here's autohotkey code to control - switch on/off - avisynthfilter from the player. PotPlayer taken as an example, replace with your .avs path,
remote control should be enabled Code:
StrPutVar(string, ByRef var, encoding) { ; Ensure capacity. VarSetCapacity( var, StrPut(string, encoding) ; StrPut returns char count, but VarSetCapacity needs bytes. * ((encoding="utf-16"||encoding="cp1200") ? 2 : 1) ) ; Copy or convert the string. return StrPut(string, &var, encoding) } ;------------------------------------------------------------------------------- send_WM_COPYDATA(Code, Str, WinId) { ; send string via WM_COPYDATA ;------------------------------------------------------------------------------- DetectHiddenWindows, On avsfilter := WinExist(WinId) VarSetCapacity(COPYDATASTRUCT, A_PtrSize * 3, 0) NumPut(Code, COPYDATASTRUCT) if Str > 0 { Numput(StrPutVar(Str, Str, "cp0"), COPYDATASTRUCT, A_PtrSize) NumPut(&Str, COPYDATASTRUCT, A_PtrSize * 2) SendMessage, 0x4a, A_ScriptHwnd, ©DATASTRUCT,, ahk_id %avsfilter% } else SendMessage, 0x4a, A_ScriptHwnd, ©DATASTRUCT,, ahk_id %avsfilter% } #IfWinActive, ahk_exe potplayermini64.exe Q:: DetectHiddenWindows, On potavsfilter := WinExist("ahk_class AvsFilterRemoteControlClass ahk_exe potplayermini64.exe") if potavsstate != %potavsfilter% { potavstoggle = 0 Send_WM_COPYDATA(403,"C:\Progs\PotPlayer\AviSynth\work\pot.avs","ahk_class AvsFilterRemoteControlClass ahk_exe potplayermini64.exe") potavsstate = %potavsfilter% } else if potavstoggle = 1 { potavstoggle = 0 Send_WM_COPYDATA(403,"C:\Progs\PotPlayer\AviSynth\work\pot.avs","ahk_class AvsFilterRemoteControlClass ahk_exe potplayermini64.exe") potavsstate = %potavsfilter% } else { potavstoggle = 1 Send_WM_COPYDATA(403,0,"ahk_class AvsFilterRemoteControlClass ahk_exe potplayermini64.exe") } return |
3rd November 2022, 03:50 | #88 | Link | |
Registered User
Join Date: Aug 2016
Posts: 605
|
Is it possible to get the filepath of the video being played so that we can apply per-file/folder processing? I saw this question was asked earlier by chainik_svp but didn't see to have an answer, only this:
Quote:
Also here is a test clip 720x576 square pixels 1.25:1 according to MediaInfo and MadVR, but running it through CrendKing's Avisynth filter results in slightly squished 1.22:1 aspect & MadVR reporting 1.22:1 also. edit: how it should look: After Avisynth plugin with propShow(): Last edited by flossy_cake; 3rd November 2022 at 04:54. |
|
10th November 2022, 14:05 | #90 | Link |
Registered User
Join Date: Aug 2016
Posts: 605
|
Thanks a lot. Looks like I'll be migrating all my scripts across and using Avisynth this way from now on
Here is a template for noobs like myself Code:
# main.avs AvsFilterSource() # replaces DirectShowSource() etc. if (FindStr(AvsFilterGetSourcePath(), "Series\Comedy\(2001-2003) The Office") != 0){ Import("The Office.avs") } else if (FindStr(AvsFilterGetSourcePath(), "Series\Comedy\(2005-2007) Extras") != 0){ Import("Extras.avs") } else { AvsFilterDisconnect() } # FindStr() is case-sensitive. Code:
# The Office.avs Subtitle("Now playing: The Office", last_frame=int(5*last.FrameRate)) # show for 5 seconds Code:
# Extras.avs Subtitle("Now playing: Extras", last_frame=int(5*last.FrameRate)) Note that resizing works differently now since the filter passes on aspect ratio metadata to the renderer. eg. no need to scale NTSC 4:3 720x480 to 720x540, but there may be an upcoming override for that to force square pixels for backwards compatibility with existing scripts (link) Last edited by flossy_cake; 10th November 2022 at 14:37. |
11th November 2022, 09:27 | #91 | Link | |
Registered User
Join Date: Aug 2016
Posts: 605
|
Quote:
Actually letting the renderer perform the DAR correction has an added benefit in that it allows deinterlacing to be performed by the renderer (eg. MadVR's film mode and DXVA deint). Whereas if the renderer already receives the aspect-corrected 720x540 from Avisynth, the field alignment is ruined and deinterlacing cannot be done after this point. Although it would be possible to workaround it by instead performing the DAR correction manually in MadVR using its "screen config" setting, but this is a bit convoluted and would require making multiple "screen config" profiles in MadVR. Last edited by flossy_cake; 11th November 2022 at 09:46. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|