Comskip chapter skipping

Discussion in 'Improvement Suggestions' started by bigj, February 9, 2007.

  1. bigj

    bigj Portal Pro

    Joined:
    January 10, 2005
    Messages:
    245
    Likes Received:
    1
    Ratings:
    +1 / 0
    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.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. dareh

    dareh Portal Pro

    Joined:
    July 7, 2006
    Messages:
    104
    Likes Received:
    9
    Location:
    Alcalá de Henares
    Ratings:
    +9 / 0
    Home Country:
    Spain Spain
    Show System Specs
    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.
     
  4. bigj

    bigj Portal Pro

    Joined:
    January 10, 2005
    Messages:
    245
    Likes Received:
    1
    Ratings:
    +1 / 0
    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.
     
  5. dareh

    dareh Portal Pro

    Joined:
    July 7, 2006
    Messages:
    104
    Likes Received:
    9
    Location:
    Alcalá de Henares
    Ratings:
    +9 / 0
    Home Country:
    Spain Spain
    Show System Specs
    Comskip can be used in livetv so channel keys would be needed for zapping.
    I think large skip step are percentage steps, don't know if they can be configured.

    dareh.
     
  6. sunsetdk

    sunsetdk Portal Pro

    Joined:
    October 18, 2005
    Messages:
    116
    Likes Received:
    3
    Occupation:
    IT technichan
    Location:
    Nordborg
    Ratings:
    +3 / 0
    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.
     
  7. and-81
    • Premium Supporter

    and-81 Retired Team Member

    Joined:
    March 7, 2005
    Messages:
    2,257
    Likes Received:
    183
    Gender:
    Male
    Occupation:
    IT Consultant/Developer
    Location:
    Melbourne
    Ratings:
    +183 / 0
    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,
     
  8. sunsetdk

    sunsetdk Portal Pro

    Joined:
    October 18, 2005
    Messages:
    116
    Likes Received:
    3
    Occupation:
    IT technichan
    Location:
    Nordborg
    Ratings:
    +3 / 0
    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?
     
  9. and-81
    • Premium Supporter

    and-81 Retired Team Member

    Joined:
    March 7, 2005
    Messages:
    2,257
    Likes Received:
    183
    Gender:
    Male
    Occupation:
    IT Consultant/Developer
    Location:
    Melbourne
    Ratings:
    +183 / 0
    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,
     
  10. sunsetdk

    sunsetdk Portal Pro

    Joined:
    October 18, 2005
    Messages:
    116
    Likes Received:
    3
    Occupation:
    IT technichan
    Location:
    Nordborg
    Ratings:
    +3 / 0
    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.
     
  11. dareh

    dareh Portal Pro

    Joined:
    July 7, 2006
    Messages:
    104
    Likes Received:
    9
    Location:
    Alcalá de Henares
    Ratings:
    +9 / 0
    Home Country:
    Spain Spain
    Show System Specs
    It sounds very good.
    I like using up and down keys, I think is the way to go.

    Please add it to svn.

    Thanks.
    Dareh.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!