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) GB-PVR Support (legacy) v
« Previous 1 … 710 711 712 713 714 … 1231 Next »
Batch file question

 
  • 0 Vote(s) - 0 Average
Batch file question
theredbaron
Offline

Member

Posts: 69
Threads: 16
Joined: Feb 2006
#11
2006-09-22, 03:26 PM
23skidoo Wrote:Sounds like the problem is, AutoXVid.exe's isn't a "blocking" program. It's main thread may return control before the operation is complete.

Does AutoXVid.exe actually make use of stderror? It could be that every time the EXE executes it returns a code, indicating its current status. Which you could check, in a loop

Does AutoXVid.exe generate an output file? It seems that it does. Can you test for that? You know, if not exist whatever.txt goto keeptrying?
Are those actual commands i can throw into the batch ('if not exist' / 'goto' / 'keeptrying')?
23skidoo
Offline

Member

Posts: 120
Threads: 9
Joined: Sep 2006
#12
2006-09-22, 06:53 PM
theredbaron Wrote:Are those actual commands i can throw into the batch ('if not exist' / 'goto' / 'keeptrying')?

Si senor. To wit, fire up Ye Olde Notepad and type in the following:

Code:
@echo off

:tryagain

echo Still waiting...

if not exist whatchoodoinhere.sem goto tryagain

pause
Save the file as test.cmd. Or test.bat, if you swing that way. No matter. Now double-click it. Watch the message scroll endlessly in the console window. Leave the console window open. Let it scroll.

Now, in the same folder, right-click and select New->Text Document. Rename it to whatchoodoinhere.sem. Notice the scrolling list in the console window has paused. No, it's not magic! It's a legacy batch processing syntax interpreted by cmd.exe (The Artist Formerly Known as command.com). You might find this topic useful.
WinTV PVR-150 / ATI X1600 512 / 3GHz P4 / 2GB RAM
madcat
Offline

Senior Member

Posts: 634
Threads: 104
Joined: Apr 2006
#13
2006-09-22, 07:50 PM
23skidoo Wrote:
Code:
@echo off

:tryagain

echo Still waiting...

if not exist whatchoodoinhere.sem goto tryagain

pause

Although maybe not the cleansest way, this will work. However, this can result in 100% cpu. I would just add a sleep call in the loop (even only 1 or 2 seconds), this will make it more sane.
* Rogers Analog Cable [Canada]
* Hauppauge WintTV PVR USB2
* IBM Thinkpad T42 / 1GB Mem / Centrino 1.6Ghz / 60GB HD / ATI Mobility Radeon 7500 + VGA/DVI out
* MCE Remote + Keyboard
* Win XP SP2 / GBPVR [Latest version. always]
* Pioneer HDTV via VGA (1360x768)
* MS Remote Keyboard
* Logitech Harmony 880 [via MS Remote Control Reciever]
Jim_
Offline

Senior Member

Posts: 696
Threads: 21
Joined: Dec 2005
#14
2006-09-22, 08:21 PM
I use this in PostProcessing.bat to check if the video is in use (by comskip, or just being watched) before doing other stuff...
Code:
:rename
timeout 30
move "%~dpnx1" "%~dp1-%~nx1"
if %ERRORLEVEL% == 1 goto rename:
move "%~dp1-%~nx1" "%~dpnx1"
REM RenameRecording -t %1 > rename.log
I posted a link to "timeout.exe" in this thread.
[SIZE="1"]HP e9240f| Phenom II X4-945| Radeon HD4650 1-gig | 8 gig ram | Blu-Ray
Windows 7 64bit | 1TB system | 1.5TB Recordings | 3-TB Library
HDMI >> Sony 40" 1080p LCD TV
HVR-2250 | HVR-1290 | WinTV PVR USB2 | WinTV HD-PVR | GBPVR 1.4.7[/SIZE]
Projects: I-xmltv (Unsupported at this time) |
23skidoo
Offline

Member

Posts: 120
Threads: 9
Joined: Sep 2006
#15
2006-09-23, 12:06 AM
madcat Wrote:Although maybe not the cleansest way, this will work.
It will work? For what? Showing someone an example of the if syntax? You know, it just might...lol.

Quote:However, this can result in 100% cpu.
Is that the new one from AMD?

Quote:I would just add a sleep call in the loop (even only 1 or 2 seconds), this will make it more sane.
Sane? No comment. lol

But sleep.exe...yes, good old pointless sleep.exe. I wonder if a little Microsoftie got brownie points for "creating" that unnecessary utility.


Use this instead. Impress your friends:[INDENT]ping -n 6 127.0.0.1 > nul

[/INDENT]That'll pause your batch file for 5 seconds. Very politely. Does other cool stuff too.
WinTV PVR-150 / ATI X1600 512 / 3GHz P4 / 2GB RAM
Carlito
Offline

Posting Freak

Posts: 817
Threads: 41
Joined: May 2006
#16
2006-09-23, 12:39 AM
EDIT

Maybe you should just stick to posting stuff that may be of help to people.
I've read many of your posts and a lot of them border on flaming people.
I don't think the gbpvr community needs that.
----------------------
[SIZE="1"]PVRX2 1.3.11
Shuttle SG33G5 Case
Core2Duo E8400 3Ghz -- 4 GB RAM
Hauppauge PVR-150
Adaptec AVC-3610 Dual Tuner
Onboard Intel GMA 3100 through HDMI -- 500GB
37" Westinghouse LCD (1920 x 1080p)

Projects
Program Image Tool[/SIZE]
23skidoo
Offline

Member

Posts: 120
Threads: 9
Joined: Sep 2006
#17
2006-09-23, 12:54 AM
Carlito Wrote:Do you always sound like a d*ck or just in your posts?
I don't know. But I'm usually right. Not always, but usually. So who cares what I sound like?

I prefer a falsetto "a la Sting" when I sing, but that's only because I don't have the pipes to stay on key in the lower registers. Unless I'm in the shower. Now that thing is magical, that shower. I can sing like a nightingale in there. But with words, of course. And you know, actual songs.

But whistling in the shower...hmm...it hadn't occurred to me.

Honestly though, if you're a serious tinkerer and you want to do cool pre- or post-processing stuff that's launched from batch files or whatever, Windows Scripting is the ticket.

But if people want to use batch files, I'll help them out. The ping method I described above doesn't require any non-standard stuff. You don't have to worry about finding sleep.exe somewhere and putting it in your path or anything.

Oh, and as a sort of post script: It's a forum on the Web. You can't see me smiling as I chug my Newcastle getting ready to head out for the evening. If you promise to take me with a grain of salt, I promise to keep helping out. Deal? :-)
WinTV PVR-150 / ATI X1600 512 / 3GHz P4 / 2GB RAM
23skidoo
Offline

Member

Posts: 120
Threads: 9
Joined: Sep 2006
#18
2006-09-23, 01:02 AM
Carlito Wrote:EDIT

Maybe you should just stick to posting stuff that may be of help to people.
I've read many of your posts and a lot of them border on flaming people.
I don't think the gbpvr community needs that.
So I've got a little personality? Heaven forbid!

I also have a tremendous amount of relevant programming knowledge and experience, and I like this project. And I want to help out. It's a simple system that works really well despite itself. I love that!

I hope for the sake of sub (and whoever else) that it continues to grow and improve. It's become a staple on my kids' computers. So just deal, mmmkay?
WinTV PVR-150 / ATI X1600 512 / 3GHz P4 / 2GB RAM
theredbaron
Offline

Member

Posts: 69
Threads: 16
Joined: Feb 2006
#19
2006-09-23, 04:52 PM
I appreciate your help guys. I will try all these things this weekend. I might also try StaxRip (which has native command line support) to transcode
Jim_
Offline

Senior Member

Posts: 696
Threads: 21
Joined: Dec 2005
#20
2006-09-23, 07:30 PM
theredbaron Wrote:I appreciate your help guys. I will try all these things this weekend. I might also try StaxRip (which has native command line support) to transcode
Let us know how it goes.
Assuming the file is in-use while being transcoded, post #14 is a working solution for your direct question. Wink
Jim
[SIZE="1"]HP e9240f| Phenom II X4-945| Radeon HD4650 1-gig | 8 gig ram | Blu-Ray
Windows 7 64bit | 1TB system | 1.5TB Recordings | 3-TB Library
HDMI >> Sony 40" 1080p LCD TV
HVR-2250 | HVR-1290 | WinTV PVR USB2 | WinTV HD-PVR | GBPVR 1.4.7[/SIZE]
Projects: I-xmltv (Unsupported at this time) |
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): « Previous 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  file types of recorded TV paul1 3 3,677 2012-09-30, 05:20 PM
Last Post: sub
  GBPVR Database question - Recording Schedule David B 1 1,621 2010-11-08, 09:21 PM
Last Post: sub
  Descriptive Audio Service Question mikeh49 3 3,121 2010-10-21, 10:49 PM
Last Post: sub
  No Data In the Recorded File zb1 5 2,234 2010-08-24, 01:08 AM
Last Post: zb1
  Italian channels post and a question about compatibility with Seven 64 bit pinopallino 2 1,650 2010-08-18, 09:14 AM
Last Post: pinopallino
  Path to file being recorded. brianj 5 2,277 2010-08-08, 10:58 PM
Last Post: brianj
  error: failure playing back file yonu 4 2,022 2010-07-12, 12:52 AM
Last Post: yonu
  UK Freesat Scan.cache File jeffers 3 2,039 2010-05-25, 10:34 PM
Last Post: jeffers
  Newbie Question rthefish 4 2,084 2010-05-25, 08:06 PM
Last Post: pBS
  3 AC3Filter instances when playing back a still recording TS file? jksmurf 3 1,898 2010-05-17, 12:30 AM
Last Post: jksmurf

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

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

Linear Mode
Threaded Mode