INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Script to check and see if a recording is in progress?  (Read 683 times)

jachin99

  • Citizen of the Universe
  • *****
  • Posts: 559
Script to check and see if a recording is in progress?
« on: August 01, 2019, 02:33:02 pm »

I use videoredo, comskip, and vap  to cut commercials.  I want to run vap as an automated scheduled task each night to cut commercials and move recordings to a file share.  Unfortunately as it stands right now if something is being recorded then vap might try to cut the commercials as the program is being recorded.  Is there a script I can use to ask jrmc if a recording is in progress and if not then run either my scheduled task or some script that opens vap to let it do it's work.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Script to check and see if a recording is in progress?
« Reply #1 on: August 01, 2019, 04:54:03 pm »

Are you just using a Windows Scheduled Task?

Can't you just set your task to run only when the PC is idle, and wait a period after it becomes idle before starting?

I would hope that Windows could see a recording in progress and not consider the PC idle, and so wait. But maybe it wouldn't. Try and see?
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14276
  • I won! I won!
Re: Script to check and see if a recording is in progress?
« Reply #2 on: August 01, 2019, 05:21:57 pm »

This MCWS cmd should do what you want:

      GetAllRecordingProgramKeys
         Get all television program keys currently being recorded
         Response:
            ChannelKey: Returns a channel key
            ProgramKeys: Returns a comma separated list of program keys
Logged
JRiver CEO Elect

jachin99

  • Citizen of the Universe
  • *****
  • Posts: 559
Re: Script to check and see if a recording is in progress?
« Reply #3 on: August 01, 2019, 07:05:19 pm »

Thanks for suggestions!!  I'll probably try both.
Logged

jachin99

  • Citizen of the Universe
  • *****
  • Posts: 559
Re: Script to check and see if a recording is in progress?
« Reply #4 on: August 21, 2019, 09:22:37 pm »

Are you just using a Windows Scheduled Task?

Can't you just set your task to run only when the PC is idle, and wait a period after it becomes idle before starting?

I would hope that Windows could see a recording in progress and not consider the PC idle, and so wait. But maybe it wouldn't. Try and see?

I appreciate all of the suggestions.  Roderick, I'm checking overnight whether or not video redo and vap will try to cut the commercials from a current recording so I'll let you know how that goes
Logged

jachin99

  • Citizen of the Universe
  • *****
  • Posts: 559
Re: Script to check and see if a recording is in progress?
« Reply #5 on: August 22, 2019, 07:46:04 am »

I setup a recording, and had VAP monitor my recordings folder for new files so that it could cut the commercials over night.  Everything worked fine so I'm guessing Windows or JRiver didn't release the file until the recording was complete. 
Logged
Pages: [1]   Go Up