NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) v
« Previous 1 … 59 60 61 62 63 … 125 Next »
Problems with ExternalRecorder plugin

 
  • 0 Vote(s) - 0 Average
Problems with ExternalRecorder plugin
frazer
Offline

Member

Posts: 123
Threads: 12
Joined: Jul 2005
#91
2006-03-19, 07:28 AM
Hello again!

Unfortunately, using the Start command didn't help, as it seems the GBPVR topmost command just won't work when the batch file is launched from the plugin- I think fathoming out why that is so (and why I don't see the batch file running as I do from a custom task or when launchung manually) could be the key to finding the answer. One thing I haven't tried, but ought to work for recording could be to kill GBPVR first and then reopen it after myTheatre and VLC have been launched- a bit messy though, and it would muck up any chance of timeshift viewing.

As for using the FOR command, well I found out somewhere that I need to use %~na to be left with just the filename, but I couldn't get it to work at all (it's been a long and fruitless night!). I'm sure it's just a syntax issue, but I tried everything I could think of; testing first by trying to take off the path and extension from an actual file name and address rather than using the parameters from the plugin, but to no avail.

Oh well, not to worry- my XCard's buggering up the basic operation of GBPVR at the moment anyway!

Frazer
normanr
Offline

Posting Freak

Posts: 855
Threads: 3
Joined: Dec 2004
#92
2006-03-19, 03:08 PM
The batch file window doesn't show because it's specifically hidden. Otherwise it would get in the way of GB-PVR. Yes, killing gb-pvr would get very messy.

If you paste a sample of your batch file, I'll reply with a tweaked copy so that the filename is used correctly.
frazer
Offline

Member

Posts: 123
Threads: 12
Joined: Jul 2005
#93
2006-03-19, 07:21 PM
Thanks for your continued help normanr.

The command I'm trying to run is basically the one you suggested; if I write the relevant line without any particular syntax- i.e. quotation marks- and the relevant section of the myTheatre command perhaps you could suggest the exact final version.

%2 is the {filename} parameter in the external recorder configuration. I found that to get this to put the correct url in VLC, I had to set this parameter as {"{filename}"}

the relevant filename command switch in myTheatre is /event "name"

%1 is the {channel} parameter- this works as it is.


For %%a in (%2) do set %2=%%~na

..../record /chnum "%1" /dur 180 /event "%2"


I also tried just setting a variable to be the stripped down filename, like this;

set %%a=%2

set %%b=%%~na

..../record /chnum "%1" /dur 180 /event "%%b"

All I got in this instance was a file called %b, and if I took the quotation marks away from "%%b", the file had no name.

Cheers

Frazer
frazer
Offline

Member

Posts: 123
Threads: 12
Joined: Jul 2005
#94
2006-03-20, 05:26 AM
Got it to work like this;

for %%a in (%2) do set name=%%~na

...../record /chnum "%1"/ dur 90 /event "%name%"

don't know why, but any attempt to use %2 or %%b and the like for the final file name was just giving event names like "%b". Obviously I need to find a good book of batch file syntax to work this out properly, as I was experimenting with all sorts of variations- just trying to "echo" a file name out of an address string- until I came up with this.

This method works well for timeshifting, but unfortunately it can't record a file to the specific folder GBPVR creates for each recording.

And then I though I'd finally cracked the VLC version; I (for some reason) tried again to put a little delay and then GBPVR -topmost into the batch file, and it worked. And it worked again and again; enough times for me to work out the necessary length of delay for VLC to open before GBPVR could take focus again (seven seconds, to be precise!). And then it stopped working, and won't ever work now; and just to rub salt in my wounds, it still works every time if I run the batch file manually.

I thought computers were meant to do the same thing every time unless we change something? Well the only thing I changed was moving between using the software decoder and the XCard in GBPVR and back again (a few times), and I don't see how that could affect the running of this batch. The only thing I can think of is if VLC wasn't actually doing anything all the times it worked (it does occasionally fail to start streaming to file), and so it passed on to the next command, where perhaps it normally doesn't (even using Start). But I'll have to test that theory further, if I can be bothered. Which I will be; damn my stupid pride.

Frazer
normanr
Offline

Posting Freak

Posts: 855
Threads: 3
Joined: Dec 2004
#95
2006-03-20, 09:39 AM
Glad to see you got it working Smile As you found you can't re-assign %1, %2, also you _have_ to use for to get the ~a syntax to work. As you found if you want to assign a to b it's: set b=%a%

HA, computers are there just to taunt us.
frazer
Offline

Member

Posts: 123
Threads: 12
Joined: Jul 2005
#96
2006-03-20, 07:30 PM
And right now I feel very taunted. Thanks for the latest batch file syntax lesson though.

Still, it occurs to me that if I make the postprocessing batch file kill mytheatre and then move the newly recorded file to the empty folder GBPVR created, using FOR...~pa on the filename parameter, I would have pretty much the whole GBPVR functionality using the non-VLC batch file; minus only the ability to watch the file as it's being recorded from within the TV Guide- I'd have to open it from the Video Library. And this is a decent trade off for having timeshifting working well.

What's more, with that batch file, I only get the losing focus problem once, when it first opens myTheatre (this eventhough myTheatre opens minimised); after that, for every channel change (when myTheatre changes the channel it's recording), GBPVR stays on top.

So just one small hurdle to overcome now. And I can't say I haven't learnt something- even if it's only how little I know.

Frazer
normanr
Offline

Posting Freak

Posts: 855
Threads: 3
Joined: Dec 2004
#97
2006-03-21, 07:59 AM
Smile well, I guess a few of the issues that you've come up against, might be easier to solve if the plugin was extended. It's definitely on my todo list, but so are a lor of other things Tongue
frazer
Offline

Member

Posts: 123
Threads: 12
Joined: Jul 2005
#98
2006-03-22, 04:22 AM
Well, I don't know how many people would find my problems very relevant, apart maybe from the re-focusing issue, and thus would feel the need for improvements to the plugin, but I'll continue to write up my diary anyway!

The postprocessing idea to move the files to the correct folders turned out to be harder than I expected; the ~pa function gave the full file paths (for the batch file as well as the target file), and the brackets from the parameters proved impossible to shift as well, so I had to get creative, and parse the file name, taking out the date etc, to get the new recording folder name- which is the same as the programme name. It went something like this;

for %%a in (%2) do set file=%%~na
for /F "delims=_" %%b in ("%file%") do set folder=%%b
move c:\"%file%".mpg c:\"%folder%"\

I have first to run an If command to check to see if an empty file of the same name (i.e.%file%) has been made in the Manual Recordings folder, in which case I don't move the file to a new recording folder, as the Manual Recordings are stored separately (and named differently). If it was a Manual Recording, I'd like to be able to move the file myTheatre has recorded into the Manual Recordings folder, but I'm having trouble at the moment with it not allowing me to write over (or delete) the empty file (Access Denied error)- though I'm sure a messy workaround for this problem wouldn't be too hard.

Basically, I'm just trying to get as close with my batch files to the full functionality in GBPVR that the plugin normally provides. Ideally I'd like to have these files copied to the correct folders as they are created (and then delete the originals at the end) so that the GBPVR menus work fully, but I can't find reference to copying files on the fly like that anywhere. Is it simply not possible?

Frazer
normanr
Offline

Posting Freak

Posts: 855
Threads: 3
Joined: Dec 2004
#99
2006-03-22, 12:52 PM
build 9 is out.
- Added new launch executable for NowRecording, StopRecording, StopPreview.
- Added extra parameters (fullname, filename, filenamewithoutextension , extension, directoryname, etc).
- Each step gets its own set of executable with parameters.
- Made hiding of the recorder optional.

See how that helps Smile
frazer
Offline

Member

Posts: 123
Threads: 12
Joined: Jul 2005
#100
2006-03-22, 06:53 PM
that all sounds great! and to think, I was starting to get a bit discouraged by the new problems coming along each time I solved an old one; but I'm sure with these amendments things will work much more smoothly. have to do a bit more thinking now though to work out the best way to arrange things, but I'll let you know how it goes.

thanks for all your work; I'm sure many others will find these improvements very useful as well for integrating other applications into GBPVR.

Frazer
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (12): « Previous 1 … 8 9 10 11 12 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  BBC Iplayer Downloader Plugin - Beta + Support smiler 420 162,774 2012-01-20, 12:15 PM
Last Post: martint123
  Un-installation of the Weather plugin rkircher 1 14,070 2011-05-20, 08:40 PM
Last Post: scb147
  software recorder, any plugin like it for npvr? chesterusob 2 14,866 2011-04-11, 07:28 AM
Last Post: chesterusob
  Caller ID Plugin elbryyan 3 15,065 2011-02-23, 01:17 AM
Last Post: smajor
  Newest IMon display-hardware finally gets Plugin-mode back mila06 1 5,138 2011-01-01, 05:37 PM
Last Post: kindt nick
  Freazing up trying to watch live TV or access System plugin dspdrew 2 3,597 2010-11-03, 07:52 AM
Last Post: johnsonx42
  Music plugin support thread MixMan 103 41,610 2010-08-31, 09:46 PM
Last Post: povarotti
  New Videos Library Plugin jasonbs10 202 68,729 2010-08-22, 01:38 PM
Last Post: 7ore
  videos library plugin crashes pvrx2 on fanart... cs4 no crash and no fan art why??. tvshowman 2 4,162 2010-04-01, 09:59 PM
Last Post: tvshowman
  Program Plugin not launching MS Games jw100 0 2,767 2010-04-01, 05:53 PM
Last Post: jw100

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode