Comskip Support Forum

Comskip is a free commercial detector, browse the forum for more information
It is currently Sat Nov 17, 2018 1:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: .ts live-tv processing?
PostPosted: Sun Jul 22, 2012 5:09 pm 
Offline

Joined: Wed Dec 07, 2011 12:37 am
Posts: 130
Hi!

I'm somewhat confused cuz there's some contradictory messages. I saw in the announcements thread the newest build some words that may imply live-tv processing for .ts files now is working.
Quote:
For all those that use .dvrms or .ts with mpeg video, give it a try.
Live-tv procesing for dvrms has not been tested as nobody volunteered to help


I'm not sure though, cuz the readme.txt (included with 81_039_donators) says something different:
Quote:
WARNING!!!!!!!!!!!!!!!!!
the current comskip version can ONLY process .wtv files while recording. If used on other container types comskip will end premature and not find commercials.


I suppose I got it wrong and .ts live-tv processing is not working, yes?


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 22, 2012 6:05 pm 
Offline
Site Admin

Joined: Sun Aug 21, 2005 3:49 pm
Posts: 3211
Forgot to remove the WTV warning.
Build 0.81.040 is supposed to do live tv processing on .ts
But I have limited posibilities to test so maybe you can test?


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 22, 2012 7:42 pm 
Offline

Joined: Wed Dec 07, 2011 12:37 am
Posts: 130
Oh YES, I would be more than happy testing it :D


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 23, 2012 4:25 pm 
Offline

Joined: Wed Dec 07, 2011 12:37 am
Posts: 130
Yes, as fz1 mentions in this thread: http://www.kaashoek.com/comskip/viewtopic.php?f=5&t=1263
.ts live detection also ends too early. I find it hard to see when it actually ends. The overall pattern is it goes completely wrong after the last in-show commercial block. From here and on comskip applies cutmarks for the actual show. In between show trailer and post roll over into next show don't get detected at all cuz comskip already seem to have finished the commercial detection.

I'm new to Dirmon2 and haven't grasped all features yet. It's hard to see if comskip crashes or not. I though some signs comskip working alright would be visible in Dirmon2 GUI "Current Status" "Active jobs" pane as long as the trigger files are present in the recording directory, but it seems comskip live detection gets triggered merely some seconds every once in a while and then disappears from "Active jobs". During the idle periods there is no sign of any processing going on anywhere in Dirmon2 GUI. Wondering if it should be like that? Unfortunately I have no earlier live processing experience to compare with, so it's hard to know how it should work.

@erik, which files do you need for further analyzing?

Live processing VPrj
Quote:
<Version>2
<Filename>D:\TV\Recording Service\20120723_02-54-02_Kanal 9_The listener - S02E09 13.ts
<VideoStreamPID>4100
<AudioStreamPID>4356
<SubtitlePID1>0
<Cut>0:734400000
<Cut>7215200000:8244400000
<Cut>13303200000:13732000000
<Cut>21285600000:27631600000
<SceneMarker 0>363200000
<SceneMarker 1>623200000
<SceneMarker 2>734000000
<SceneMarker 3>7214400000
<SceneMarker 4>7278000000
<SceneMarker 5>7880400000
<SceneMarker 6>7895200000
<SceneMarker 7>8126800000
<SceneMarker 8>8181600000
<SceneMarker 9>8244000000
<SceneMarker 10>13302400000
<SceneMarker 11>13368000000
<SceneMarker 12>13670000000
<SceneMarker 13>13731600000
<SceneMarker 14>21284800000
<SceneMarker 15>21349600000
<SceneMarker 16>21364000000
<SceneMarker 17>21596000000
<SceneMarker 18>21650800000
<SceneMarker 19>21713200000
<SceneMarker 20>27631600000


After recordings done processing VPrj
Quote:
<Version>2
<Filename>D:\TV\Recording Service\20120723_02-54-02_Kanal 9_The listener - S02E09 13.ts
<VideoStreamPID>4100
<AudioStreamPID>4356
<SubtitlePID1>0
<Cut>0:734400000
<Cut>7215200000:8244400000
<Cut>13303200000:13732000000
<Cut>21285600000:21713600000
<Cut>27724400000:28757200000
<SceneMarker 0>363200000
<SceneMarker 1>623200000
<SceneMarker 2>734000000
<SceneMarker 3>7214400000
<SceneMarker 4>7278000000
<SceneMarker 5>7880400000
<SceneMarker 6>7895200000
<SceneMarker 7>8126800000
<SceneMarker 8>8181600000
<SceneMarker 9>8244000000
<SceneMarker 10>13302400000
<SceneMarker 11>13368000000
<SceneMarker 12>13670000000
<SceneMarker 13>13731600000
<SceneMarker 14>21284800000
<SceneMarker 15>21349600000
<SceneMarker 16>21364000000
<SceneMarker 17>21596000000
<SceneMarker 18>21650800000
<SceneMarker 19>21713200000
<SceneMarker 20>27723600000
<SceneMarker 21>27835200000
<SceneMarker 22>28757400000


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 23, 2012 5:04 pm 
Offline
Site Admin

Joined: Sun Aug 21, 2005 3:49 pm
Posts: 3211
I found the problem and I'm currently trying to solve


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 23, 2012 10:55 pm 
Offline

Joined: Wed Dec 07, 2011 12:37 am
Posts: 130
Argh, there is always something that will jump up and bite you...turns out Dirmon2 does not handle unicode filenames and comskip .ts live processing fails accordingly. Well well...not much to do! Perhaps someone knows about some unicoded alternative to Dirmon2? If not it is time to make my own filewatcher script solving this :)


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 26, 2012 6:31 pm 
Offline

Joined: Wed Dec 07, 2011 12:37 am
Posts: 130
erik wrote:
Can you try build 0.81.041?

Ok, I can confirm .ts live detection works alright. Reason for it ended early for me before, was due to lack of understanding how Comskip performs live detection. Comskip seem to use a static interval schedule. I don't know if it's Comskip or Dirmon2 who makes it static. The pattern for live processing are as follows if using Dirmon2 filewatcher.
- First processing interval occurs about 5 minutes after recording starts
- Second processing interval occurs about 10 minutes after the first interval.
- Third to what ever processing interval needed for the actual show occurs every 10 minutes.

Lets say if having a show with 30 minutes of duration:
Live processing Step 1 - 5 minutes into the show
Live processing Step 2 - 15 minutes into the show
Live processing Step 3 - 25 minutes into the show
Live processing Step 4 - should occur after 35 minutes, but by then the recording has ended.

Now, in my case I have a script launched by an after recording task which automatically moves the .txt and .log file for the recording into a subfolder. In Dirmon2 I was using the .txt and .log files as triggers only. So if moving the only triggers, Step 4 will not get executed. Hence the Comskip output never gets finalized. If not moving the trigger files Comskip output gets finalized alright 5 minutes after recording finishes.

All along I did expect Comskip was abled to sense when the recording finishes, but it's obviously not so. Comskip sticks persistently with the static interval schedule. When thinking of it, it was kind of naive believing Comskip could be that smart. That would require some interaction with the PVR system extracting duration parameters for recordings, which is nothing other than wishful thinking if you wanna have a tool working for 50 different PVR systems.

Well, as a defence speech this is the first time using a filewatcher and live detection also for that matter ;) Takes some time to grasp everything :) Thankfully it will get easier when my PVR system recording timers supports file/script launching when recording starts. In that way one can retrieve placeholders/paramaters instantly and use them when calling Comskip, making filewatchers obsolete entirely.

All in all thanks for a work well done erik :)

Best regards
Jagad


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 27, 2012 1:13 pm 
Offline

Joined: Wed Dec 07, 2011 12:37 am
Posts: 130
Better to forge the iron while it's hot so to say...so I would like to take the opportunity to ask some questions on things I haven't understood yet about LiveTV detection.

1. I would like to find a way to stop using these crappy filewatchers and use comskip alone for LiveTV detection.
The optimal solution would be to launch comskip once when the recording starts and have it continuously running until the recording finishes (console window never closes until last LiveTV detection step is done). I haven't found any info on this in the forum and are wondering if that is possible? As is now you need these infernal filewatchers to launch comskip according to a interval schedule, cuz if not comskip processes just as much the recording has progressed and then shuts down and never restarts.

2. Isn't much of a question, but more of a suggestion/request. As a continuation of question 1 that implies Comskip working according to a static LiveTV detection interval schedule. For example it idles for the first 5 minutes, then performs LiveTV detection and idles out 10 minutes, LiveTV processing again and idles out again. Now, the cool part would be having comskip detect when the recording finishes and run the finalizing LiveTV detection step there and then. It should be very easy to accomplish coding wise. Since Comskip already knows the path and location for the file in process it should be easy to monitor the properties of this file. If mediafile is still in recording the modification time equals (=) the startime/creationtime. When recording stops modification time changes to a_now (time right now).
If modification time - creation time >= 1 that's when comskip launches the finalizing LiveTV processing step and overrules the interval schedule.
Summarizing it, the LiveTV detection interval schedule (that could be tweaked) and the file property monitoring should be possible to turn off by a proper switch "live_tv=0" and that really means LiveTV detection is not possible if the parameter is disabled. Hopefully that could be something to implement in the future?

Regards
Jagad


Last edited by Jagad on Fri Jul 27, 2012 1:22 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 27, 2012 1:21 pm 
Offline
Site Admin

Joined: Sun Aug 21, 2005 3:49 pm
Posts: 3211
1: That is how I use comskip. It gets started seconds after the recording starts (directly from my PVR application), no additional file watcher. And comskip finishes seconds after the recording finishes.

The problem to get this correctly implemented is that the container handler (ffmpeg TS file reader) software I use now in this new version is so complex and never designed to read TS files while being recorded I have to find my way around.


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 27, 2012 1:29 pm 
Offline

Joined: Wed Dec 07, 2011 12:37 am
Posts: 130
Aha, I didn't know! Thanks for explaining it :)
Keeping my fingers crossed you'll find some time to straighten out the question marks regarding the ffmpeg TS file reader :D

Best regards
Jagad


Top
 Profile  
Reply with quote  
PostPosted: Fri Jul 27, 2012 4:57 pm 
Offline

Joined: Wed Dec 07, 2011 12:37 am
Posts: 130
erik wrote:
1: That is how I use comskip. It gets started seconds after the recording starts (directly from my PVR application), no additional file watcher. And comskip finishes seconds after the recording finishes.

The problem to get this correctly implemented is that the container handler (ffmpeg TS file reader) software I use now in this new version is so complex and never designed to read TS files while being recorded I have to find my way around.
Sorry for being a bit slow, starting to understand it better now and contemplating what you said and testing earlier versions I've came to the conclusion LiveTV .ts detection does not work at all. Comskip just performs normal finished recording processing repeatedly if using Dirmon2 on live recordings. Each run takes about 30 sec and then comskip closes. It works the same way if using older builds. If .ts livetv detection had worked comskip would have been running as long as the file was in recording.

Based on what you say in the last sentence I suppose the goal was to find a workaround for the ffmpeg TS file reader deficiency and make it work as you descibe in the first and second sentence.

Sorry for the missunderstanding, my newbieness on how LiveTV detection is supposed to work generally confused everything for me. So, we are actually back to square one regarding .ts livetv detection :oops:


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group