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 … 17 18 19 20 21 … 125 Next »
Semi-Automatic commercial removal with VideoRedo

 
  • 0 Vote(s) - 0 Average
Semi-Automatic commercial removal with VideoRedo
dgeezer
Offline

Senior Member

Posts: 324
Threads: 9
Joined: Feb 2005
#1
2007-12-14, 03:33 PM
I had been using a script originally posted here by reboot using videoredo to automatically edit my recordings to cut the commercials. I could not get the cscript part to run on my Vista machine, when called from postprocessing.bat, no matter what I tried. Probably something to do with users or permissions. :confused:

I finally gave up and came up with another method which I am actually liking better. It isn't automatic, in that it requires some action from me on each recording, but it is very simple to do and since all the recordings are made by my regular desktop pc it fits into my normal morning work routine.

After each recording finishes postprocessing.bat runs comskip and then creates a shortcut to the recording in a designated folder on my desktop. Clicking on the shortcut opens videoredo showing the proposed cuts. I can either accept the cuts as they are or edit any of the cuts easily at this point. I do this with all the files in the folder. Next I click on another shortcut on the desktop which calls the batch files needed to process the recording. This whole process takes only a couple minutes and requires no interaction from me once the recordings are edited.

I use a little utility called shortcut.exe from here to create the link on my desktop. I downloaded this and unzipped it to a folder called shortcut in the third party folder of gbpvr.

My postprocessing.bat now looks like this:

REM If you use Showanalyzer, unREM the next line
REM "C:\Program Files\Dragon Global\ShowAnalyzer\ShowAnalyzer.exe" %1
REM If you use comskip, unREM the next line
"C:\Program Files\devnz\gbpvr\comskip.exe" %1
"C:\Program Files\devnz\gbpvr\Third Party\Shortcut\shortcut.exe" /F:"C:\Users\Doug\Desktop\New.Videos\%~n1.lnk" /A:C /T:"%~dpn1.vprj"

I also have 2 batch files in a folder called SemiAutoBat in the third party folder of gbpvr.

do_post_proc.bat

REM This will recursively step through the Videos directory and find each vprj file created by postprocessing.bat.
REM Then call a script to process those files.
FOR /R C:\Users\Public\Videos\ %%f IN (*.vprj) DO postpostprocessing.bat "%%f"

Note: My default recordings directory in GBpvr is C:\Users\Public\Videos\

postpostprocessing.bat

Rem This script runs Videoredo to edit the recording using the .vprj project file.
cscript //nologo "C:\Program Files\VideoReDoTVSuite\vp.vbs" "%~dpn1.VPrj" "%~dpn1_cleaned.mpg" /t1 /q
Rem RENAME the old .mpg file to name_original.mpg
move "%~dpn1.mpg" "%~dpn1_original.mpg"
REM Rename the cleaned file to the name of the original recording.
move "%~dpn1_cleaned.mpg" "%~dpn1.mpg"
REM These previous two lines don't do anything if the original file is in dvr-ms format.
REM The following lines cleanup the directory.
move "%~dpn1.dvr-ms" "C:\Users\Public\Recorded TV\ORIGINALS"
move "%~dpn1_original.mpg" "C:\Users\Public\Recorded TV\ORIGINALS"
REM Delete Comskip's working files.
del "%~dpn1.txt"
del "%~dpn1.log"
del "%~dpn1.logo.txt"
REM Save the VideoReDo file with the original to make a re-edit easier
move "%~dpn1.VPrj" "C:\Users\Public\Recorded TV\ORIGINALS"
REM Delete the shortcut in the New.Videos folder.
del "C:\Users\Doug\Desktop\New.Videos\%~n1.lnk"
REM Rename the recording using zrename.
"C:\Program Files\devnz\gbpvr\Third Party\ZRename.exe" "%~dpn1.mpg"

I created a folder on my desktop called New.Videos where the shortcuts are stored and a shortcut to the file “do_post_proc.bat” which I renamed to Cut Commercials. I changed my desktop properties to display “Medium Icons”. This changes the folder's image to show me when it contains a new recording shortcut. Also be sure to set the line in comskip.ini to: output_videoredo=1

Newly recorded video ready for editing.
Server: Windows 10 - ASrock N3150DC -ITX Fanless Celeron
Clients: Shield TV with X-newa on Kodi, Asus chromebox - openelec - X-newa on Kodi
linfor
Offline

Member

Posts: 157
Threads: 42
Joined: Jun 2005
#2
2007-12-20, 05:19 AM
This sounds like it automating a lot of what I do manually now. I will test it out and let you know how it works for me.
linfor
Offline

Member

Posts: 157
Threads: 42
Joined: Jun 2005
#3
2007-12-20, 07:10 AM
I cannot get this to work.
After the recording the PostProcessing runs. Nothing shows up in the New.Videos. So I go and click on the "Cut Commercials" icon. The files process but no new videos are created and it then deletes the file created by SHowanalyzer.
dgeezer
Offline

Senior Member

Posts: 324
Threads: 9
Joined: Feb 2005
#4
2007-12-20, 10:38 AM
Does showanalyzer produce the .vprj files needed by the videoredo script?

If you create a one line batch file containing this:
"C:\Program Files\devnz\gbpvr\Third Party\Shortcut\shortcut.exe" /F:"C:\Users\Doug\Desktop\New.Videos\%~n1.lnk" /A:C /T:"%~dpn1.vprj"

with the proper path to your desktop, will dropping an mpeg file on this batch file create the shortcut?

I probably should have added several lines of definitions of the working folders since everyones recording directories etc. are probably different.
Server: Windows 10 - ASrock N3150DC -ITX Fanless Celeron
Clients: Shield TV with X-newa on Kodi, Asus chromebox - openelec - X-newa on Kodi
dgeezer
Offline

Senior Member

Posts: 324
Threads: 9
Joined: Feb 2005
#5
2007-12-20, 10:43 AM
Oh, one more thing. I recently upgraded to the new videoredo TV Suite which installs in a different path than the regular videoredo. You may have to change the 2nd line in postpostprocessing.bat.
Server: Windows 10 - ASrock N3150DC -ITX Fanless Celeron
Clients: Shield TV with X-newa on Kodi, Asus chromebox - openelec - X-newa on Kodi
linfor
Offline

Member

Posts: 157
Threads: 42
Joined: Jun 2005
#6
2007-12-21, 03:08 AM
I know absolutely nothing about the coding I might be messing it up.

When I run the postprocessing file the only thing to take place is the shortcut.
What I want to do - run quicksream fix and create the cutlist via postprocessing, manually verify the cuts and then run cut commercials when I am ready.
I would like to eventually use the Videoredo adscan instead of showanalyzer.
Here is the postprocessing file and the postpostprocessing file
dgeezer
Offline

Senior Member

Posts: 324
Threads: 9
Joined: Feb 2005
#7
2007-12-21, 12:10 PM
linfor Wrote:I know absolutely nothing about the coding I might be messing it up.
May be a case of the blind leading the blind, since everything I know about batch files I learned here and by trial and error.Big Grin

Are you running Vista? The reason I started doing this manually was that I could never get the cscript part to run when called via postprocessing from GBpvr. The cscript line in the postpostprocessing is what does the cuts based on the .vprj file created by showanalyzer. You shouldn't need to run this in the postprocesing file. Also, I don't want it to make any cuts until I have reviewed them, since I never took the time to really tune comskip.

Is showanalyzer producing the .vprj file?. I use comskip and you have to set a line in the comskip.ini file to produce the cut files. I think that it is output_videoredo=1.
Server: Windows 10 - ASrock N3150DC -ITX Fanless Celeron
Clients: Shield TV with X-newa on Kodi, Asus chromebox - openelec - X-newa on Kodi
linfor
Offline

Member

Posts: 157
Threads: 42
Joined: Jun 2005
#8
2007-12-21, 01:27 PM
SHowanalyzer was producing the file but I want to use adscan in videoredo.
I am on an xp but I only want it semi-automated as I want to double check the vprj files before the ads are removed.
I got the adscan working fine but it is using videoredo syntax. If you can help me clear that up I would appreciate it. From there the shortcut is not created because the coding is different and I have not be able to get them to coincide. Also, I want to do the renaming int he postprocessing file.
Here is the code to run quickstream - and it works
REM Runs quickstream fix
for %%i in (*.mpg) do if not exist "%%~dpi%%~ni.qsf.mpg" cscript //nologo "C:\Program Files\VideoReDoPlus\vp.vbs" "%%~dpi%%i" "%%~dpi%%~ni.qsf.mpg" /t1 /q

I would like to move the original file to a folder called scan and have it appended with _orig.mpg but I have only ben able to get the move done and not the renaming part
REM move original
for %%i in (*.mpg) do if exist "%%~dpi%%~ni.qsf.mpg" move "%%~dpi%%i" "F:\Recordings\scanned\"

Here is the code for the adscan
REM runs adscan
for %%i in (*.qsf.mpg) do if not exist "%%~dpi%%~ni.VPrj" cscript //nologo "C:\Program Files\VideoReDoPlus\AdScan.vbs" "%%~dpi%%i" "%%~dpi%%~ni.VPrj" /q /d
dgeezer
Offline

Senior Member

Posts: 324
Threads: 9
Joined: Feb 2005
#9
2007-12-21, 03:16 PM
Something similar to this line from the original batch file should do the renaming trick.

Rem RENAME the old .mpg file to name_original.mpg
move "%~dpn1.mpg" "%~dpn1_original.mpg"

I can see the reason for doing the renaming first since then the saved originals etc would all have the same name, however, I'm not sure how this would affect the rest of the script. That's why I have always done the renaming last. I also delete all my originals after a couple days.

I'm afraid I won't be much help with the adscan part. I have always used comskip for my ad detection.
Server: Windows 10 - ASrock N3150DC -ITX Fanless Celeron
Clients: Shield TV with X-newa on Kodi, Asus chromebox - openelec - X-newa on Kodi
dgeezer
Offline

Senior Member

Posts: 324
Threads: 9
Joined: Feb 2005
#10
2007-12-21, 03:19 PM
This is the only time I have ever used this shortcut.exe utility. Did you create the F:\Recordings\New.Videos\ folder. I'm not sure if shortcut.exe will create folders on the fly.
Server: Windows 10 - ASrock N3150DC -ITX Fanless Celeron
Clients: Shield TV with X-newa on Kodi, Asus chromebox - openelec - X-newa on Kodi
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  How to use VideoReDo to AUTOMATICALLY remove commercials reboot 60 48,481 2009-02-02, 04:59 PM
Last Post: InvisibleGeek
  Comskip & Comclean...but logo removal? Questor 1 2,174 2008-03-29, 06:31 AM
Last Post: erik
  Auto Commercial Removal and Transcode Help (newbie) slacker190 18 5,630 2007-02-19, 01:28 AM
Last Post: homerjr43
  Found a bug with commercial detection? lonegeek 10 3,550 2007-02-11, 10:56 PM
Last Post: sub
  Automatic- convert to xvid while removing commercials AcidSun 2 2,613 2006-02-26, 02:08 AM
Last Post: jam_zhou
  Fixing VideoReDo project files after RenameRecording! Jim_ 3 2,248 2006-02-17, 06:32 AM
Last Post: Jim_
  Comskip - Videoredo .Vprj file problem ATHiker 1 2,071 2006-02-16, 06:43 AM
Last Post: erik
  How to use VideoRedo with DVD Burning ydekmekji 0 1,493 2006-02-06, 05:22 PM
Last Post: ydekmekji
  Automatic EPG Update hohums 3 1,815 2006-01-27, 12:22 AM
Last Post: KingArgyle
  Automatic 3gp? reboot 1 1,476 2006-01-21, 03:11 AM
Last Post: blizard

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

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

Linear Mode
Threaded Mode