PDA

View Full Version : Comskip on live TV?


Xiadix
07-07-2006, 11:16 PM
I have comskip working well on recorded shows using post processing. Now I see mention of using it with live tv. How do I set that up?

KevG

Rich A
07-08-2006, 09:30 PM
I have comskip working well on recorded shows using post processing. Now I see mention of using it with live tv. How do I set that up?

KevG

This has got to be a joke right? I mean even if you could "skip" a live commercial, what would you do while waiting for the show to return? Unless it has some sort of ability to time travel to 3 minutes into the future .. how could it work? :lol:

Fonceur
07-09-2006, 01:44 AM
If you were to start watching a show, pause it for 10 minutes, then keep playing it, it might be usefull to have the SmartChapters generated at the same time... Or in a more general way, you could have the SmartChapters pretty much done by the end of the recording. Under such condition and assuming enough processing power, comskip might be done by the end of the recording too... I know that VideoRedo can start processing files as they are recorded.

On the other hand, for comskip to work on LiveTV, besides the problems that Rich mentionned, there's the fact that you would need to edit the same locked file that BTV is writing to, that doesn't sound like a good idea... ;) Using the "Recorded shows" to play the comskip'ed file would be a possibility, but then that would not really be LiveTV... ;)

erik
07-09-2006, 01:49 AM
Its not a joke, but the word "live" may be misleading.
Its actually comskip on "timeshifted" TV.
Many people use comskip that way.
In the comskip.ini you have to set
live_tv=1
and then comskip will generate, while the recording is ongoing, the list of commercials found till where the recording is at that moment.
Keep in mind that the live_tv algorithm is MUCH simpler but should work OK for the rather straightforward USA broadcast conditions. When the recording is finished the preliminary live_tv .txt file is replaced with the definitive high quality .txt file so no harm is done when always set live_tv=1
There is however one known problem. For very long recordings (over 3 hours) comskip can crash because of memory problems when live_tv=1 is set.

I don't know how to tell the Snapstream timeshifted viewer to use the .txt file generated.

The CPU load is much receduce in this scenario because comskip is able to run at 10 to 30 times realtime so in live_tv mode it will be suspended most of the time. Comskip will finish a couple of seconds after the recording is finished. Many people prefer running comskip this way because you eliminate the continuesly high CPU load during the postprocessing.

Rich A
07-09-2006, 01:39 PM
Exactly. Delaying the recording for 10 minutes is not "Live". To be more precise I guess we could say it's doing the Skip real time, but watching delayed.

I have been doing this "manually" for years. I often start watching one recording after it's been recording for 15 minutes or so. I hit the jump forward button a few times when commercials start to skip them. The result is that by the time the show is over, I've actually watch only the "meat" of the show and spent 42 minutes watching instead of 60 minutes. It's where "time shifting" gets it's name.

I didn't know that utility could do "real time" marking. I wonder how accurate it ends up being? Using the "manual" method is certainly not as elegant, but I don't have to worry about loosing a chunk of the movie, or seeing misread commercials pop up. I have my jump button programmed for 30 seconds and my back button 15 seconds. Generally it takes only two seconds for me to jump past the commercial even if I have to back up one time. I've found for most breaks, pushing the button 5 times quickly will skip most breaks, and if need the one back button can be used.

This is the same as the application you are talking about, but is being done by a human. Obviously requires some button pushing, but at least I don't miss anything. :lol: I've found that auto chapter markings are almost never 100 percent accurate. BTV's chapter cut is one of the most accurate however.

I have myi BTV configured to do everything except Show Squeeze immediately and I would worry about over taxing the CPU trying to do real time chapter marking. Have you tried it? What kind of CPU use did you see while watching a delayed show that had real time chapter marking being generated. It IS interesting to say the least.

By the way, the BTV Chapter listing is in an HTML format. I wonder how close the Comskip *.txt file is to the BTV in format. Don't know how the format would be affected, but you might try loading the *.txt file into something like WORD, and then save it in HTML format. just to be able to compare it with the BTV chapter list.

erik
07-09-2006, 02:31 PM
Rich A,

Some questions.

Did you ever try one of the more recent Comskip versions?
If it was inaccurate, on what kind of recordings was it inaccurate?


Could someone post an example of the html file snapstream uses for skipping?
I maybe can learn comskip to generate it directly if that would make life easier.

Realtime marking generates a average load of (much) less then 20% on the CPU and it is a load on idle level so everything else gets priority anyway

Xiadix
07-09-2006, 03:01 PM
erik - that is exactly what I was talking about. I saw in your updates that you improved combatibality with BTV for live tv, and I assumed you ment timeshifted TV. I get the change in the ini, and the new ini option you set up.

I guess my more specific question is do I just start comskip pointing to my directory on windows startup? Or is there something I have to change in BTV to have it call comskip when I watch a live show? The only way I use comskip now is to have it call via the postprocessing.xml file.

KevG

PS. I didn't know it properly finished it after with a better xml...that is real nice.

erik
07-09-2006, 03:28 PM
Can't help you here because I don't know BTV.

Rich A
07-09-2006, 05:23 PM
I've attached one of the SS smart chapter files to this post. It's from a BTV High Def capture, but should be the same format as an analog. Can't say as I have ever used "Comskip". I did ask in the prior post that I wondered how accurate it was running in real time. I figured one would guess from that statement that I've never used it.

I tend to not add things to my PVR as I do a lot of beta testing and such and want to keep it as little affected by other programs as well. I'm just curious on how this Comskip works.

I know there are several shows here that drive these applications crazy. One network is often doing a "fade" directly from the commerical to the show. No black points. So there is a transition from one to the other and for a half dozen frames or so you are actually seeing both the commercial and the movie at the same time.

Then there are some who do fade to blacks but between scenes instead of commercial breaks. That also drives smart chapter generation crazy.

I do a lot of archiving of favorite shows and have been editing out commercials for many years. So I've seen all the odd stuff.

Would you say that the real time Comskip is as accurate as the BTV post capture smart chapter generation ??

I never watch "live" TV much any more so the BTV skip feature works well enough by just hitting a button on the remote. Most of the time.


Rich A,

Some questions.

Did you ever try one of the more recent Comskip versions?
If it was inaccurate, on what kind of recordings was it inaccurate?


Could someone post an example of the html file snapstream uses for skipping?
I maybe can learn comskip to generate it directly if that would make life easier.

Real time marking generates a average load of (much) less then 20% on the CPU and it is a load on idle level so everything else gets priority anyway

erik
07-10-2006, 01:01 AM
Comskip in live_tv mode uses during the recording blackframes as cutpoints. I assume its about as good as smartskip.
When the total recording is finished Comskip uses at least 6 other ways to define cutpoints. It is effectively used on recordings without blackframes at all.

However, because of the "power" there is some need for manual tuning for the more complex situations to hint Comskip in which direction to search for how to cut.
The USA conditions should match the default global settings included in the distribution zip file.

kklarson
07-10-2006, 06:03 AM
Comskip can already generate a BTV chapter file (XML, not HTML). It's the "output_btv=1" parameter in the Comskip *.ini file.

In my experience, Comskip is much faster and more accurate than the SmartChapter generator. This was particularly true for HDTV programs which take forever in BTV. I don't know if 4.3 has improved enough to make it competitive or not.

I've been using the "live" version of Comskip for months because the chapter file is ready very soon after the recording is done. However, Snapstream changed something in 4.3 that screwed up Comskip. Comskip would quit before the program was finished. Erik fixed that, but there's another problem. Comskip is now very inaccurate with live 4.3 recordings. I've had to roll back to 4.2 until this is fixed. See http://mk.kaashoek.com/comskip/viewtopic.php?t=147.

Xiadix
07-10-2006, 09:16 AM
...I've been using the "live" version of Comskip for months ...

Ok, how did you tell BTV to lauch ComSkip for "Live" TV? Do you just start Comskip with the live_tv=1 ini pointed at the shows directory or ??? That is the piece I am missing.

KevG

kklarson
07-10-2006, 10:21 PM
Ok, how did you tell BTV to lauch ComSkip for "Live" TV? Do you just start Comskip with the live_tv=1 ini pointed at the shows directory or ??? That is the piece I am missing.

KevG

Yes, that is the "trick" but what BTV taketh away, it also provides. BTV marks the file it is recording as hidden. However, it also creates a *.inprogress.xml file while recording. So if the program being recorded is Boring.mpg, the .xml file will be Boring.mpg.inprogress.xml. You need to use something to kick off a DOS batch file like Scheduled Tasks in Windows or Dirmon2 that watches for a 'inprogress' file.

Here's a simplified version of one of the scripts I've written:

REM Activate Comskip for programs that are currently recording in BeyondTV.
REM The Comskip *.ini file specified must contain these lines (without the REM):
REM live_tv=1
RME output_btv=1
REM The script will scan through for all *.%EXT%.inprogress.xml files.
setlocal enabledelayedexpansion enableextensions
REM Change these parameters to match your situation.
set WORKINGDIR=v:\video\btv
set COMSKIPDIR=v:\comskip
set EXT=mpg
set COMSKIPINI=v:\comskip\live.ini
set DETECTMETHOD=77
set PID=-1
REM PID to use: -1=Non-transport stream file 0=Auto PID
if %PID% LSS 0 set BASEPARAMS=--ini=%COMSKIPINI% --detectmethod=%DETECTMETHOD%
if %PID% EQU 0 set BASEPARAMS=--ini=%COMSKIPINI% --detectmethod=%DETECTMETHOD% --ts
if %PID% GTR 0 set BASEPARAMS=--ini=%COMSKIPINI% --detectmethod=%DETECTMETHOD% --pid=%PID%

set filename=
set root=
cd /D %WORKINGDIR%
for %%i in (*.%ext%.inprogress.xml) do (
set filename=%%i
set root=!filename:.%ext%.inprogress.xml=!
if NOT exist "!root!.log" (
start /BELOWNORMAL "!root!" /D%WORKINGDIR% %COMSKIPDIR%\comskip.exe "!root!.%ext%" %BASEPARAMS%
))
endlocal

Xiadix
07-12-2006, 05:20 PM
kklarson, I started to try your approach then I realized that either they changed something in 4.3 or there is some reason my system isn't creating the *.inprogress.xml files on live tv.

KevG

bits
07-12-2006, 06:09 PM
kklarson, I started to try your approach then I realized that either they changed something in 4.3 or there is some reason my system isn't creating the *.inprogress.xml files on live tv.

KevG
I bet it has something to do with the 'New disk allocation method'!

kklarson
07-21-2006, 04:53 AM
kklarson, I started to try your approach then I realized that either they changed something in 4.3 or there is some reason my system isn't creating the *.inprogress.xml files on live tv.

KevG

Are you sure? I just double-checked and the *.inprogress.xml file is created on my system. It goes away when you stop the recording, so any script based on this has to be run during the recording. Once the recording is completed, the *.inprogress.xml file is removed and the recording (.mpg, .tp, .ts) is unhidden.

Xiadix
07-21-2006, 02:28 PM
I will double check again. If that is the case, I will start looking into this again. I hope so.

Still, it feels kinda odd not seeing the commercials. It is suprising how much info is there along with them. News Blurbs, info on upcoming shows and specials.

KevG

Xiadix
07-23-2006, 01:57 AM
I am now sure. I get *.inprogress.xml for recordings, but not for live tv. Weird.

KevG

kklarson
07-23-2006, 04:53 PM
I am now sure. I get *.inprogress.xml for recordings, but not for live tv. Weird.

KevG

"Live TV" IS the period of time when a show is recording.

kklarson
12-10-2006, 03:50 PM
I just re-read this thread and think I realize why there is confusion. BTV only generates the *.inprogress.xml while recording a program. It doesn't exist when just watching live TV. The "Comskip live" phrase may be slightly confusing. It simply means that Comskip is watching for commercials while the program is recording rather than processing the file after the program is complete. However, even in the "live" mode, it doesn't finish until the program is complete. The advantage of this method is that the commercial skip file is ready very shortly after the recording ends.

BTW, Comskip build 62 has been updated to work in the "live" mode with BTV 4.3-4.5.

erik
02-25-2007, 03:25 PM
Can BTV skip commercials during timeshifting?

HomeyFour
02-25-2007, 08:40 PM
Can BTV skip commercials during timeshifting?

Nyet. An addon can cut them out, (think IGCutter) but not during live TV.