NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Information Community Announcements v
« Previous 1 … 28 29 30 31 32 … 56 Next »
transcode only if disk near full - batch file

 
  • 0 Vote(s) - 0 Average
transcode only if disk near full - batch file
Koenie
Offline

Senior Member

Posts: 356
Threads: 31
Joined: Aug 2005
#1
2006-09-25, 05:26 PM (This post was last modified: 2006-09-27, 07:37 AM by Koenie.)
I searched the forum and found several attampts to solve the problem of disks running full. However there was none which would transcode files when the disk nearly full, so I made a little batch file. Please comment on it.

Code:
rem video directory
set video="V:\video"
rem diskspace to keep free in MB
set free=25

rem create transcode queue
c:
cd "\program files\devnz\gbpvr"
del oldfile.txt
for /f "tokens=3 delims=><" %%G IN ('findstr /C:.mpg recording-dump.xml') do echo %%G >> oldfile.txt

:start
rem check diskspace
for /f "tokens=3 delims=., " %%G IN ('dir %video%') do set /a a=%%G
if %a% LSS %free% (goto transcode) else (goto eof)

:transcode
rem put first line in oldfile variable
set /p oldfile=<oldfile.txt
start /low /wait transcode.bat "%oldfile%"
rem move queue up one line
findstr /V /C:"%oldfile%" oldfile.txt > oldfile2.txt
del oldfile.txt
ren oldfile2.txt oldfile.txt
goto start

:eof

The two variables set the recordings directory (actually the recordings drive is sufficient) and the amount of megabytes to keep free on the disk.

The the script takes advantage of the fact that SUB has all recordings nicely in chronological order in the recording-dump.xml to make the transcode queue

The queue will run as long as the drivespace is below the set minimum.

The script takes an external batch file to transcode the mpg. Put here whatever you like. Make sure the transcode batch file deletes the mpg otherwise there will be no disk space freed up!!

I run the script as postprocessing.bat so after every recording the disk space is checked. You can also run it as pustepgupdate.bat which will run the transcoding at night.
Regards Koen,

GBPVR 1.4.7
AMD 780G with X2 BE2350, 2gb ram, LCD-TV, Win XP
PVR500, PVR150 & PVC150 MCE MediaMVP D3A, 2 networked clients
Koenie
Offline

Senior Member

Posts: 356
Threads: 31
Joined: Aug 2005
#2
2006-09-25, 05:35 PM
Thanks for moving my post to where it belongs. I was maybe too humble to put it here.
Regards Koen,

GBPVR 1.4.7
AMD 780G with X2 BE2350, 2gb ram, LCD-TV, Win XP
PVR500, PVR150 & PVC150 MCE MediaMVP D3A, 2 networked clients
Dsmelser
Offline

Junior Member

Posts: 17
Threads: 6
Joined: Jul 2006
#3
2006-09-26, 02:18 PM
Shouldn't the line:

findstr /V /C:"%oldfile%" oldfile.txt > oldfile.txt

be:

findstr /V /C:"%oldfile%" oldfile.txt > oldfile2.txt
Koenie
Offline

Senior Member

Posts: 356
Threads: 31
Joined: Aug 2005
#4
2006-09-27, 07:39 AM
Obviously this should be oldfile2. I changed it in the original post and the attached file. Thanks for the catch.
Regards Koen,

GBPVR 1.4.7
AMD 780G with X2 BE2350, 2gb ram, LCD-TV, Win XP
PVR500, PVR150 & PVC150 MCE MediaMVP D3A, 2 networked clients
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Yet Another RenameRecordings Batch files SANGER_A2 53 27,969 2012-06-16, 06:45 AM
Last Post: SANGER_A2
  Manual RenameRecording Batch File SANGER_A2 0 2,193 2011-10-08, 11:11 AM
Last Post: SANGER_A2
  NPVR Rename Recordings Batch File raceviper13 8 8,012 2011-04-23, 11:52 PM
Last Post: raceviper13
  IRTRANS apps.cfg file crazy_gadgets 0 2,509 2010-03-05, 04:44 PM
Last Post: crazy_gadgets
  Search DB batch util pBS 4 2,513 2009-09-03, 10:01 AM
Last Post: pBS
  import single file metadata util pBS 0 1,233 2009-03-26, 07:12 AM
Last Post: pBS
  Free disk space monitor Remco 37 13,907 2009-02-11, 07:46 PM
Last Post: Remco
  disk update garymeds 1 1,703 2008-07-11, 01:42 PM
Last Post: crossnet
  Batch to surely Hibernate & Update EPG dfdario 1 1,765 2008-03-09, 02:32 PM
Last Post: cakes
  new tvxb ini file for sweden stefan 3 2,391 2008-01-16, 10:11 AM
Last Post: stefan

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

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

Linear Mode
Threaded Mode