mysoogal Posted September 7, 2009 Report Share Posted September 7, 2009 i'm having some issues with .torrent files, im using virtualdub with a batch script that watchs the utorrent download folder, when torrent completes it starts the encoding process, but my issue is, alot of .torrent have been uploaded inside a folder something like thisexample.torrent somefolder example. avi example.textnow inside my utorrent download folder, it should look like this utorrent/download/servicer.bat example.avithe service,bat picks up the avi when it isnt inside a folder and encodes it, then puts it into anywhere i want like in my web server folder to be used with some php directory script. you get the idea.this is the batch script that takes the avi from the utorrents download folder and starts encoding,----------------------------------------------------------------------------------------------------------------------------------------------------------------echo off:: change the path in the following line to where you have vdub.exeset vdub="c:\encoder\vdub.exe":: the target in the following line is where the files will be moved toset "target=c:\encoder\completed\"md "%target%" 2>nulif not exist %vdub% (echo Change the location of Vdub.exe on line 3 & pause & goto :EOF):loopif exist *.avi (for /f "delims=" %%a in ('dir *.avi /b') do (echo processing "%%a"ren "%%a" "%%~na.old%%~xa"call :routine "%%a" "%%~na.old%%~xa"rem this line runs Vdub.exe with the script%vdub% /s vdub.jobs /x >nuldel vdub.jobsmove "%%~na.old%%~xa" "%target%"move "%%a" "%target%"))echo waiting...ping -n 15 127.0.0.1 >nulgoto :loop:routinerem the following creates a script file whichrem and then opens filename.old.avirem and saves the result to filename.avirem it requires a full set of processing lines to be added>vdub.jobs echo VirtualDub.Open("%~2",0,0);>vdub.jobs echo VirtualDub.audio.SetSource(1);>vdub.jobs echo VirtualDub.audio.SetMode(1);>vdub.jobs echo VirtualDub.audio.SetInterleave(1,500,1,0,0);>vdub.jobs echo VirtualDub.audio.SetClipMode(1,1);>vdub.jobs echo VirtualDub.audio.SetConversion(0,0,0,0,0);>vdub.jobs echo VirtualDub.audio.SetVolume();>vdub.jobs echo VirtualDub.audio.SetCompressionWithHint(85,32000,2,0,16000,1,12,"AQACAAAAQAIBAAAA","LAME MP3");>vdub.jobs echo VirtualDub.audio.EnableFilterGraph(0);>vdub.jobs echo VirtualDub.video.SetInputFormat(0);>vdub.jobs echo VirtualDub.video.SetOutputFormat(7);>vdub.jobs echo VirtualDub.video.SetMode(3);>vdub.jobs echo VirtualDub.video.SetSmartRendering(0);>vdub.jobs echo VirtualDub.video.SetPreserveEmptyFrames(0);>vdub.jobs echo VirtualDub.video.SetFrameRate2(0,0,1);>vdub.jobs echo VirtualDub.video.SetIVTC(0, 0, 0, 0);>vdub.jobs echo VirtualDub.video.SetCompression(0x30377076,0,10000,0);>vdub.jobs echo VirtualDub.video.SetCompData(2056,"VlA3MAEAAADABgAAAAAAAAAAAADIAgAAOAAAAAAAAADoAwAAAAAAAAAAAAABAAAAAAAAAAAAAABoAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABAAAAAUAAAAKAAAAFAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAABfAAAAZAAAAAYAAAAAAAAARgAAAMgAAAAKAAAAAAAAAAEAAAABAAAAAAAAAAAAAAB2cDcuZnBmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==");>vdub.jobs echo VirtualDub.video.filters.Clear();>vdub.jobs echo VirtualDub.audio.filters.Clear();>>vdub.jobs echo VirtualDub.SaveAVI("%~1");>>vdub.jobs echo VirtualDub.Close();---------------------------------------------------------------------------------------------------------------------------------------------------------------------is anybody good with windows batch scripting ? any way of searching through folders ? or if utorrent can transcut the folder and only output avi video Link to comment Share on other sites More sharing options...
Ultima Posted September 7, 2009 Report Share Posted September 7, 2009 Elaborate. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.