Comskip chapter skipping (1 Viewer)

bigj

Portal Pro
January 10, 2005
245
1
Started on: 2007-Feb-09
last update: 2007-Feb-09

Summary:

Support ComSkip commercial skipping using chapter forward/backward keys.

Area:

TV recording playback.

Description:

Comskip is a commercial detector that can be run on a .mpg or .dvr-ms recording and will detect commercials. It generates an output file recordingname.txt that contains a list of frame ranges that are considered commercials. The original recording is not cut or altered in any way.

This request is to have the (TV) player detect the presence of the .txt file and read this into memory as 'chapter' points.

Then if the user presses next or previous chapter, the playback should jump to the nearest chapter point in that direction.

This behaviour is new and orthogonal to existing features (i.e. should not interfere). It uses chapter next/prev keys as (AFAIK) these are unused for TV playback and seem a natural choice.

It does not require cutting of the original recording, so if ComSkip gets the detection wrong, simple step forwards/backwards can be used to adjust.

Note: I have succesfully used DirMon2 to run ComSkip on new recordings in the background. DirMon2 is a freeware utility that sees new recordings and will run any postproccessing operation on it (see SageTV forums). I use this method with existing tvplugin - not the new tvserver.
 

dareh

Portal Pro
July 7, 2006
104
9
Alcalá de Henares
Home Country
Spain Spain
Agree with you but , I think it would be better using up and down keys(big step forward/backward), because when watching livetv f7/f8 (chapter forward/backward) keys are used to change channels.

dareh.
 

bigj

Portal Pro
January 10, 2005
245
1
Yes - but how useful is that up/down channel via the chapter buttons? And aren't there dedicated channel up/down keys already?

Still, I didn't realise there was a 'large skip' option - I just had to go and try it! - so given that exists, I agree that is another candidate.

BTW, is it possible to configure the large skip step?

Cheers,
BigJ.
 

sunsetdk

Portal Pro
October 18, 2005
116
3
43
Nordborg
Home Country
Denmark Denmark
I have been playing with the source code for the video part. ANd i got a very messy copy here that when you press the up button and you are within a commertial ir skips to the end of the commertial (as desided by comskip) if there is no comskip file or you are not in a commertial nothing happens.

I don't know if this can be made in to a plugin, of if it will have to be put in the svn code. If so i don't know how to create a patch that some one from teh developer team can put in.
 

and-81

Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    This feature is already in and under ongoing development.

    But if you'd like to provide your source code I'd be interested to see how you went about implementing it.

    The current implementation uses chapter skip buttons and has context menu items as well. It activates when it detects a .txt file in the same folder as the video file.

    As I said, it is still under ongoing development but you should be able to see it working.

    Cheers,
     

    sunsetdk

    Portal Pro
    October 18, 2005
    116
    3
    43
    Nordborg
    Home Country
    Denmark Denmark
    Okay, didn't know this. What button is the chaptor skip button on a MCE remote?
    I took the comskip part from video editor. But you can have the source if you want, it is VERY crap as this is my first attempt to edit the sources and my first attempt on C#. Do you want me to upload it here?
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    It was set to the chapter buttons, but there are conditions on it. And a txt file with the same name must be present in the same folder as the recording.

    I'd like to see your source, because I'm looking at alternative ways of implementing the feature. The code that is in MediaPortal now works but it could be better.

    Cheers,
     

    sunsetdk

    Portal Pro
    October 18, 2005
    116
    3
    43
    Nordborg
    Home Country
    Denmark Denmark
    Source

    I have added the method GetCommertials. This is suppose to be run when a film is started but i couldn't find that place in the source. This sub checks if there is a comskip file and if it is valid, if it is it will load all commertials from the file and saved in a array. I have added some code that check if getcommertials is executed with the same movie twice, this can be removed if the sub is only called once when a new movie starts.

    When the user press up or down i want to check if a comskip file was found.

    Again as i couldn't find the right place to put the getcommertials this is done a bit different, as i run this method each time the user press up or down.

    But if commertials is found and the movie is in a block of commertials when the up button is pressed i skip to the end of the commertial block. If the used press back up to 10 sec after a commertial block i skip to the start of the commertials block.

    Your implimentation looks good, but i see one problem with it as it always skips to the end of the next commertials block.

    If comskip only found comertial block 1 and 3 in a show with 3 blocks, when you are on block 2 and press skip, you will end up at the end of block 3 which wasn't the point.

    Don't take this a criticisms :)

    Ask if the source doesn't make sence.
     

    Users who are viewing this thread

    Top Bottom