Chapter files for dixv and mpg videos? (1 Viewer)

ckcomm

Portal Member
August 6, 2007
14
0
I've read in a couple of places that it's possible to specify chapter stops for videos, presumably in a text file. I haven't succeeded in finding any specific info about how to do it though (the only post I've found here asking the question was unanswered).

Does anyone know if this is true, and if so how it works?

In particular, what is the naming convention for these chapter files that allows them to be associated by MediaPortal with the right video file? How are chapter stops specified - as timecodes (in what format?) or frame numbers?

Thanks in advance for any help.
 

and-81

Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    The commercial skipping support effectively gives you chapters, all you need to do is create a .txt file in the format that comskip creates. The .txt file should have the same name as the video file, eg. "movie.mpg", "movie.txt".

    The file is structured like this:

    FILE PROCESSING COMPLETE 74362 FRAMES AT 2500
    -------------------
    6121 10216
    25928 31184
    45574 47937
    58607 60378
    74361 74362

    Good luck,
     

    ckcomm

    Portal Member
    August 6, 2007
    14
    0
    Thanks for this. I haven't got it quite right though. I've created a file called "abc.txt" and placed it in the same directory as "abc.mpg".

    The file contains my desired chapter points - 2 per line, separated by a space.

    I also put in the header "FILE PROCESSING COMPLETE 75000 FRAMES AT 2500" followed by a line of dashes, cut and pasted from your example. (I made up the 75000 number for the total frame count though, because I don't know it - is this important? Must it be exact, or greater than, or less than the actual frame count of the video file? I didn't know what "AT 2500" referred to so I left it as-is.)

    I would then expect that the chapter forward/reverse keys would skip to the nearest chapter point after/before the current playback position. Is this correct? I'm using the F8 and F4 keys on my keyboard to try this - F8 has no effect, while F4 brings up a progress-bar-like thing at the top of the screen that is labeled "N/A". This is the same behavior I see for other video files for which no chapter file exists.

    Here's what my file looks like:

    FILE PROCESSING COMPLETE 52000 FRAMES AT 2500
    -------------------
    12821 24107
    36747 49780


    If you have any further suggestions, I'd be grateful. Thanks in advance.
     

    and-81

    Retired Team Member
  • Premium Supporter
  • March 7, 2005
    2,257
    183
    Melbourne
    Home Country
    Australia Australia
    Hey,

    The 2500 is the frame rate. 2500 = 25 fps, 3000 = 30 fps.

    Try playing the file back from the file view, not the database view.

    Apart from that I can't think of anything else right now...
     

    ckcomm

    Portal Member
    August 6, 2007
    14
    0
    Thanks for the tip; I downloaded Comskip and figured this out.

    A few hints for anyone else who's trying to do this:

    • The frame count in the header (where it says "FILE PROCESSING COMPLETE x FRAMES AT 2997") is not important - you can put anything there. But as far as I can tell the header itself does need to be there. I'm not sure if the frame rate is important, but I'd set it to the appropriate value for your region just in case.
    • Each line below the header should contain two frame numbers separated by a tab. You don't need an entry at the beginning for frame 0 (or frame 1), or an entry at the end for the final frame.
    • If you're just trying to implement chapter stops rather than defining parts of your video (i.e. commercials) to skip, then the two frame numbers on each line should be the same. Any frames between these two numbers will be skipped during playback.
    • IMPORTANT: As far as I can tell, the chapter stops don't work with the keyboard commands for skipping forward and backward (sometimes reported to be F8 and F4, respectively, and sometimes F8 and F7). For me, they only work with the Replay ( |< ) and Skip ( >| ) buttons on my MCE remote. This is what caused me to think they weren't working originally.
    Thanks to everyone for their help.
     

    erik1958

    Portal Pro
    January 28, 2006
    100
    7
    When MP can accept a list of commercials followed by a list of scene changes I can let Comskip generate this list.

    So the frame numbers will NOT be ordered but First the commercials and then the scene changes required for chapter skipping.
     

    Users who are viewing this thread

    Top Bottom