Topic: Enabling/Disabling SVP Through API

I'm currently writing a program in C# that controls MPC-HC through API to play automated sequences of videos. It's taking shape pretty well.

However, some videos don't currently play well with SVP, such as DVDs, .ts and .tp videos. In order to play those automatically without user action, I would need to disable SVP for those. One option would be to send ALT+CTRL+WIN+P to the player but then I can't be sure as to whether I an enabling or disabling it. The other option is to kill the process. Is there a better option than killing the process?

Also, when SVP opens back up after either MPC-HC or SVP crashes, it displays a message saying there was an error in the last session and asking whether I'd like to report it. Is there a way to disable this warning?

Re: Enabling/Disabling SVP Through API

Mystery
Is there a better option

nope
all I can think of right now is to enable/disable "ffdshow raw" in external filters if it's possible through the API
or just run x64 version  big_smile

===
or change ffdshow's remote API WM_MESSAGE id in the registry (and then change it back to make SVP Manager "see" running ffdshow instance)

Re: Enabling/Disabling SVP Through API

Mystery
it displays a message saying there was an error in the last session and asking whether I'd like to report it. Is there a way to disable this warning?
There is no option to disable this warning but you can delete log file before launch SVPMgr.
Usually it is C:\ProgramData\SVP 3.1\Logs\Log.txt

Re: Enabling/Disabling SVP Through API

Strangely, if I close SVP while MPC is running, the video statistics keep showing 60fps. SVP doesn't seem to be taking effect but I don't know whether that has side-effects.

So if I delete this file before running SVP, it won't show the startup message? Great.
C:\ProgramData\SVP 3.1\Logs\Log.txt

I just want to make this as transparent as possible. Killing the process removes the exit confirmation message. Deleting this file removes the startup message.

Btw, I regularly receive this error. Is there something that can be done about it?

Error preparing smooth playback! Script error:
Write: File 'C:\ProgramData\SVP 3.1\Logs\avsFPS.txt' cannot be opened.
(ffdshow_filter_avisynth_script, line 7)

Re: Enabling/Disabling SVP Through API

One issue with this log file is that it is version-dependent. I can ask the user for the path to SVP, but he won't know how to configure the path to the log. I guess this small feature would only work with the latest SVP version.

Then, you say it is "generally" under ProgramData

I could write this to get the file
string LogFile = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + @"\SVP 3.1\Logs\Log.txt";

Under Windows Server 2003, will it be under C:\ProgramData or under C:\Documents and Settings\All Users\Application Data ?
http://stackoverflow.com/questions/8957 … ng-c-docum

6 (edited by Mystery 05-09-2014 06:34:02)

Re: Enabling/Disabling SVP Through API

OK I got my 1080p TV back so I could do some tests. 15mbps .tp files can't play well on 1080p. Interestingly enough, killing SVP isn't enough. The video keeps lagging out of sync. I have to close MPC-HC and re-open it while SVP is closed, then it plays fine.

Edit: If I close SVP normally, then the video plays fine right away. I can understand that it won't restore proper playback if it's being killed smile

7 (edited by Mystery 06-09-2014 01:11:00)

Re: Enabling/Disabling SVP Through API

Chainik
or change ffdshow's remote API WM_MESSAGE id in the registry (and then change it back to make SVP Manager "see" running ffdshow instance)

Can you tell me more about this option? Sending a Close message doesn't close it at all, and killing it doesn't detach it from the player so I need to also restart the player.