This is an old revision of the document!


Matroska

archives: Making a file with chapters

Unlike OGM, MKV can import an MPEG2 vob, if you don't want to rip/re-encode.

mkvmerge --chapters <file> -o movie.mkv dvd.vob

archives: Metadata in mplayer

Notes: Now I *know* some of this is outdated because there have been patches sent in to MPlayer after I wrote this, that I've used. It's helpful as a point of reference though.

Metadata in mplayer

get_meta_album
    Print out the 'Album' metadata of the current file.

get_meta_artist
    Print out the 'Artist' metadata of the current file.

get_meta_comment
    Print out the 'Comment' metadata of the current file.

get_meta_genre *
    Print out the 'Genre' metadata of the current file.

get_meta_title
    Print out the 'Title' metadata of the current file.

get_meta_track
    Print out the 'Track Number' metadata of the current file.

get_meta_year
    Print out the 'Year' metadata of the current file.
osd_show_property_text "${metadata/title}"

meta_artist: ARTIST
meta_comment: COMMENT
meta_genre: GENRE
meta_track: PART_NUMBER
meta_year: DATE_RELEASE

libavformat/matroskadec.c (1156)

av_metadata_set(&s->metadata, "title", matroska->title);

av_metadata_set is in metadata.c

libmpdemux/demux_lavf.c

    if(avfc->title    [0]) demux_info_add(demuxer, "title"    , avfc->title    );
    if(avfc->author   [0]) demux_info_add(demuxer, "author"   , avfc->author   );
    if(avfc->copyright[0]) demux_info_add(demuxer, "copyright", avfc->copyright);
    if(avfc->comment  [0]) demux_info_add(demuxer, "comments" , avfc->comment  );
    if(avfc->album    [0]) demux_info_add(demuxer, "album"    , avfc->album    );
//    if(avfc->year        ) demux_info_add(demuxer, "year"     , avfc->year     );
//    if(avfc->track       ) demux_info_add(demuxer, "track"    , avfc->track    );
    if(avfc->genre    [0]) demux_info_add(demuxer, "genre"    , avfc->genre    );

libavformat/metadata_compat.c

 compat_tab[] = {
    { "title",           SIZE_OFFSET(title)     },
    { "author",          SIZE_OFFSET(author)    },
    { "copyright",       SIZE_OFFSET(copyright) },
    { "comment",         SIZE_OFFSET(comment)   },
    { "album",           SIZE_OFFSET(album)     },
    { "year",            SIZE_OFFSET(year)      },
    { "track",           SIZE_OFFSET(track)     },
    { "genre",           SIZE_OFFSET(genre)     },
 
    { "artist",          SIZE_OFFSET(author)    },
    { "creator",         SIZE_OFFSET(author)    },
    { "written_by",      SIZE_OFFSET(author)    },
    { "lead_performer",  SIZE_OFFSET(author)    },
    { "description",     SIZE_OFFSET(comment)   },
    { "albumtitle",      SIZE_OFFSET(album)     },
    { "date_written",    SIZE_OFFSET(year)      },
    { "date_released",   SIZE_OFFSET(year)      },
    { "tracknumber",     SIZE_OFFSET(track)     },
    { "part_number",     SIZE_OFFSET(track)     },
};

Looks like these are the only ones actually supported:

    FILL_METADATA_STR(ctx, title);
    FILL_METADATA_STR(ctx, author);
    FILL_METADATA_STR(ctx, copyright);
    FILL_METADATA_STR(ctx, comment);
    FILL_METADATA_STR(ctx, album);
    FILL_METADATA_INT(ctx, year);
    FILL_METADATA_INT(ctx, track);
    FILL_METADATA_STR(ctx, genre);

Navigation