NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 70 71 72 73 74 … 93 Next »
Using MPEG-VCR with Comskip

 
  • 0 Vote(s) - 0 Average
Using MPEG-VCR with Comskip
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#11
2005-05-28, 10:46 AM (This post was last modified: 2005-05-28, 01:37 PM by erik.)
The script I posted above works fine except when you have a '&' in your filename.
I have a solution for this buts its rather clumsy
I first save the filenames in the .wme file including the quotes around the filenames and then use sed (search with google for "sed windows" and you can find a precompiled version for DOS, must be a command line version, put in the same dir as the postprocessing.bat)

below you can find my latest postprocessing.bat, it works for me

if you want to update all your .wme files run this command in a .bat file in the same directory as where postprocessing.bat can be found
for %%f in (*.txt) do postprocessing.bat "%%f"
where you modify *.txt to refer to the directory where the .txt files are located. You can run the command as often as you want, it simply will recreate the .wme files. If the .txt files already exist you better put a rem before comskip to speed things up Smile
Please remember to install the sed.exe. A good sed.exe can be found here
http://unxutils.sourceforge.net/

--------------------------------------------------------------------
@echo off
Rem PostProcessing.bat

rem Initialize the variables
set count=1
set start=0

rem Identify the commercials
comskip %1

rem Create the cliplist
echo # >x.tmp
rem Process all the lines from the Comskip output file
for /F "usebackq tokens=1,2,3*" %%i in ("%~dpn1.txt") do call :work %%i %%j "%%~dpn1" >>x.tmp

rem Output last clip
echo CLIPLIST: #%count% show >>x.tmp
echo CLIP: "%~dpn1.mpg" >>x.tmp
echo 6 %start% 1000000 1 192 0 1 224 0 0 0 0 0 0 >>x.tmp

rem Run sed to remove the quotes around the file names in the .wme file
sed >"%~dpn1.wme" s/\"//g x.tmp

rem Should delete the x.tmp file, but I am too lazy.....

rem Done.
goto :eof

:work
rem Skip useless lines
if "%1"=="FILE" goto :eof
if "%1"=="-------------------" goto :eof
rem Output the clip information for the show part
set /A length=%1-%start%
echo CLIPLIST: #%count% show
echo CLIP: "%~dpn3.mpg"
echo 6 %start% %length% 1 192 0 1 224 0 0 0 0 0 0
set/A count=%count%+1

rem Output the clip information for the commercial part
set /A length=%2-%1
echo CLIPLIST: #%count% commercial
echo CLIP: "%~dpn3.mpg"
echo 6 %1 %length% 1 192 0 1 224 0 0 0 0 0 0
set/A count=%count%+1

rem Remember start of next clip
set start=%2
goto :eof

:eof
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
reboot
Offline

Posting Freak

Posts: 1,426
Threads: 89
Joined: Mar 2005
#12
2005-05-29, 02:25 AM
Doesn't work Sad
Created a .wme, but nothing that Womble could use.
Here's the content of the .wme created for a test recording:
Quote:#
CLIPLIST: #1 show
CLIP: D:\Le plus grand cabaret du monde\Le plus grand cabaret du monde_20050528_17001920.mpg
6 0 1000000 1 192 0 1 224 0 0 0 0 0 0
SED didn't run, no x temp file created anywhere.
You can never have enough tuners!
Pentium Quad / 4Gb Dual Channel RAM / XPSP3 / 2 x PVR-500, PVR-250 / GB-PVR
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#13
2005-05-29, 07:06 AM (This post was last modified: 2005-05-29, 07:24 AM by erik.)
Reboot,

The output you give is the output generated when the comskip output is either missing or empty.
Therefore you only have one single clip starting at 0 and of size 1000000
Maybe I should add an error message when it can not find the output of comskip
Did comskip run? Where there commercials? Could you find the .txt file generated by comskip?
If you did use the last version of the script then sed did run because the double quotes around the filenames generated by the script are removed
The x.tmp is generated in the directory where the script runs, the home directory of gbpvr I assume.
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
reboot
Offline

Posting Freak

Posts: 1,426
Threads: 89
Joined: Mar 2005
#14
2005-05-29, 05:45 PM
The comskip created .log and .txt are there. I didn't check the contents to see if it was done right though.
It seems there's two comskip.exe processes running, one that is actually using CPU cycles and one that doesn't.
Yes, there were definitely commercials in the test clip.
There was no x.tmp created.

Even if the .bat (seems to) runs properly, and sed runs properly, the .wme created is useless to Womble (see example above), and renamerecording does not run.
You can never have enough tuners!
Pentium Quad / 4Gb Dual Channel RAM / XPSP3 / 2 x PVR-500, PVR-250 / GB-PVR
reboot
Offline

Posting Freak

Posts: 1,426
Threads: 89
Joined: Mar 2005
#15
2005-05-29, 06:14 PM
Just did another test to make sure.
Here's the content of the .wme file:
Quote:#
CLIPLIST: #1 show
CLIP: D:\Boy Meets World\Boy Meets World_20050529_10391104.mpg
6 0 19693 1 192 0 1 224 0 0 0 0 0 0
CLIPLIST: #2 commercial
CLIP: D:\Boy Meets World\Boy Meets World_20050529_10391104.mpg
6 19693 7917 1 192 0 1 224 0 0 0 0 0 0
CLIPLIST: #3 show
CLIP: D:\Boy Meets World\Boy Meets World_20050529_10391104.mpg
6 27610 1000000 1 192 0 1 224 0 0 0 0 0 0
Useless :mad:
You can never have enough tuners!
Pentium Quad / 4Gb Dual Channel RAM / XPSP3 / 2 x PVR-500, PVR-250 / GB-PVR
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#16
2005-05-29, 06:20 PM
How do you start the scipt?

I named it postprocessing.bat so it gets automatically started.
How can you have two comskips running?
Is it possible that you started in some way the script twice?
This would explain the behaviour.
The first script starts comskip, the second also but the second comskip waits till the first is finished.
When the first script starts to read the .txt file the second comskip started to write to the .txt file write effectively clearing the content.
Because the script always uses x.tmp as a temporary file it can not be executed multiple times in paralell. Must change it for those lucky that have multiple tuner cards. Sad
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
reboot
Offline

Posting Freak

Posts: 1,426
Threads: 89
Joined: Mar 2005
#17
2005-05-29, 06:39 PM
That's it exactly. The script is postprocessing.bat, and right after :eof is renamerecording.exe %1 > renamerecording.log
I have no idea how two comskips run, but I also get two cmd.exe at the same time.
I only have postprocessing.bat with the script in it (the latest one you wrote winth sed.exe) and the renamerecording line.
renamerecording never runs.
I left it overnight, and all I get is that useless .wme file, along with the log, and the txt from comskip.
So, to sum it up:
Comskip runs (twice at the same time) and creates the .log and the .txt
The script continues and creates the .wme, but it cannot be used by Womble.
The x.tmp is created in the gbpvr folder.
I cannot see that sed.exe runs. If it does, it's over in a second or less.
At the end of the comskip.log I get this: "The second run ended with an error code of 1".
The comskip.log is full of stuff like this:
Quote:395: * *** ****** * *
396: ******* ******* ***
397: ******* ***** ********
398: * * ********* ********* **** *
and is between 400 and 700k in size.
You can never have enough tuners!
Pentium Quad / 4Gb Dual Channel RAM / XPSP3 / 2 x PVR-500, PVR-250 / GB-PVR
erik
Offline

Posting Freak

Posts: 1,138
Threads: 123
Joined: Apr 2005
#18
2005-05-29, 06:55 PM
The comskip.log has a lot of lines containg logging of the search for a logo.
That's what you see.
YOu can reduce the side of the log file when you set verbose=0 in the comskip.ini file.


The renamerecording should NOT be after the eof: !!!!!!
Then it will move the .txt file to a different location while postprocessing.bat is still reading it.

You should put it before the line
rem Done.

The autoexec.bat is calling itself recursively starting at :work and when reaching the end of the file it returns to line where :work is called.

I am not sure what renamerecording does. Make sure it does NOT run comskip Smile
P4 3GHz 1GB, 250GB, nVidia dualTV, GBPVR 1.3.11, XP
Support Comskip, visit the forum and donate at http://www.comskip.org/
reboot
Offline

Posting Freak

Posts: 1,426
Threads: 89
Joined: Mar 2005
#19
2005-05-29, 09:15 PM
RenameRecording does just that.
Takes the title, and episode name, and renames the recording to that.
I'll try it with renamerecording before rem Done.

Even if rename recording works, the script does not.
I have tried all 3 (or is it 4) versions, and still cannot get a .wme file that Womble can use.
You can never have enough tuners!
Pentium Quad / 4Gb Dual Channel RAM / XPSP3 / 2 x PVR-500, PVR-250 / GB-PVR
reboot
Offline

Posting Freak

Posts: 1,426
Threads: 89
Joined: Mar 2005
#20
2005-05-29, 09:37 PM (This post was last modified: 2005-05-29, 10:09 PM by reboot.)
No matter which version of the file I try to use in postprocessing.bat, it doesn't create a .wme I can use.
Renamerecording now works (thanks for the hint about where to put it in the .bat), and I'm trying your mencoder avi converter (which seems to be working perfectly so far). Smile

Here's my postprocessing.bat. Maybe YOU can figure out why it doesn't create a .wme that Womble can use.
Quote:@echo off
Rem PostProcessing.bat

rem Initialize the variables
set count=1
set start=0

rem Identify the commercials
comskip.exe %1

rem Create the cliplist
echo # >"%~dpn1.wme"
rem Process all the lines from the Comskip output file
for /F "usebackq tokens=1,2,3*" %%i in ("%~dpn1.txt") do call :work %%i %%j "%%~dpn1" >>"%~dpn1.wme"

rem Output last clip
echo CLIPLIST: #%count% show >>"%~dpn1.wme"
echo CLIP: %~dpn1.mpg >>"%~dpn1.wme"
echo 6 %start% 200000 1 192 0 1 224 0 0 0 0 0 0 >>"%~dpn1.wme"

RenameRecording.exe %1 > RenameRecording.log

REM Remove rem from the beginning of the next line to Enable this to create an avi
REM mencoder.exe "%~dpn1.MPG" -oac mp3lame -lameopts mode=2:cbr:br=128 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=4000 -ffourcc DIVX -o "%~dpn1.avi"
Rem Remove the rem at the start of the next line to delete the mpg file after converting it to avi
rem del /q "%~dpn1.MPG"

rem Done.
goto :eof

:work
rem Skip useless lines
if "%1"=="FILE" goto :eof
if "%1"=="-------------------" goto :eof
rem Output the clip information for the show part
set /A length=%1-%start%
echo CLIPLIST: #%count% show
echo CLIP: %~dpn3.mpg
echo 6 %start% %length% 1 192 0 1 224 0 0 0 0 0 0
set/A count=%count%+1

rem Output the clip information for the commercial part
set /A length=%2-%1
echo CLIPLIST: #%count% commercial
echo CLIP: %~dpn3.mpg
echo 6 %1 %length% 1 192 0 1 224 0 0 0 0 0 0
set/A count=%count%+1

rem Remember start of next clip
set start=%2
goto :eof

:eof
You can never have enough tuners!
Pentium Quad / 4Gb Dual Channel RAM / XPSP3 / 2 x PVR-500, PVR-250 / GB-PVR
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Mpeg-dash bgowland 2 2,297 2013-09-26, 05:43 PM
Last Post: bgowland
  Any interrest for a Comskip version that can decode VBI/CC from TS or DVR-MS? erik 10 4,136 2008-05-17, 08:10 PM
Last Post: erik
  Determining the comskip rate. pastro 2 1,597 2007-10-07, 08:05 PM
Last Post: pastro
  DVD to MPEG - target drive other than C:? MarkD 2 1,467 2006-11-12, 10:29 PM
Last Post: MarkD
  vb6, get WxH of Avi and Mpeg zehd 2 1,828 2006-06-13, 11:39 PM
Last Post: zehd
  Comskip: Can some upload short DVR-MS exmaples to test the DVR-MS input of Comskip erik 1 1,408 2006-03-25, 06:21 PM
Last Post: -stattik-
  Comskip: What next? erik 0 1,523 2006-03-15, 09:51 PM
Last Post: erik
  Looking for Comskip tester for DVB or ATSC TS input erik 3 1,903 2006-01-30, 08:32 PM
Last Post: hazydave
  Looking for a logo for Comskip erik 3 1,985 2006-01-05, 12:23 AM
Last Post: jbyram2
  Connect MPEG-2 demux filter in Directshow graph? bgowland 3 6,166 2006-01-01, 04:16 PM
Last Post: funkybro_uk

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

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

Linear Mode
Threaded Mode