VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 45
Thread
  1. Member
    Join Date
    Aug 2011
    Location
    Holland, Europe
    Search Comp PM
    Would it be possible to write a program that adds metadata fields to MPEG2 files? (Like ID3 tags for MP3)
    As far as I know, there is no such program.

    I'd like to add metadata fields to my MPEG2's to be able to catagorize them the same way as I catagorize my MPEG4's (name, artist, album, genre, year) in iTunes:

    Click image for larger version

Name:	iTunes.png
Views:	636
Size:	153.7 KB
ID:	13006


    This
    is how I've got my MPEG-2's organized now:

    Click image for larger version

Name:	mapping structure.png
Views:	5819
Size:	89.4 KB
ID:	13007


    Apple's iTunes and QuickTime don't support MPEG2, so I won't be able to play my MPEG2's in iTunes. But I'm sure there's a player that combines MPEG2-support with a nice display like iTunes.
    Quote Quote  
  2. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    You can remux your MPEG-2 clips into MP4 files (it's a lossless process) with MP4Box.

    Someone please correct me if I am wrong, but the .MPG container (aka program stream) does not use global headers, and thus it would not support as many metadata as MP4, MKV, or ASF.
    Quote Quote  
  3. Member
    Join Date
    Aug 2011
    Location
    Holland, Europe
    Search Comp PM
    Remuxing MPEG-2 clips in MP4 files, lossless? Are you sure this can be done?
    Quote Quote  
  4. Remuxing is lossless, but I doubt itunes can parse mpeg2 in mp4 container
    Quote Quote  
  5. Originally Posted by HitTheRoad View Post
    Remuxing MPEG-2 clips in MP4 files, lossless? Are you sure this can be done?
    Yes, it can be done. I don't know about itunes.
    Quote Quote  
  6. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    I get why you want to do this, but being married to iTunes is probably not the best idea you've ever had. You're painting yourself into a corner by going this route.
    Quote Quote  
  7. I agree with Jman98, avoid getting locked into itunes.
    Quote Quote  
  8. Member
    Join Date
    Aug 2011
    Location
    Holland, Europe
    Search Comp PM
    Okay, no iTunes. Now back to the main question:

    Would it be possible to write a program that adds metadata fields to MPEG2 files? (Like ID3 tags for MP3)

    I'd like to add metadata fields to my MPEG2's to be able to catagorize them the same way as I catagorize my MPEG4's (name, artist, album, genre, year) in a media player (not iTunes!)
    Quote Quote  
  9. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Look at ReStream to see where in the UserData blocks you could add your own tags. However,...

    If you were to create YOUR OWN media metadata, using your own layout format, you would have to also create the Media/Library player to work with it, as existing players would NOT recognize data that they aren't currently designed to support, including metadata/tags.

    What metadata did you want that MPEG2 doesn't ALREADY support?

    Scott
    Quote Quote  
  10. Member
    Join Date
    Aug 2011
    Location
    Holland, Europe
    Search Comp PM
    What metadata did you want that MPEG2 doesn't ALREADY support?
    Does MPEG2 already support metadata? What kind of metadata do you mean?
    I want to add metadata like Name, Artist, Album, Genre, Year.
    Quote Quote  
  11. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Album? Artist? These kinds of tags are very Music-centric. Not all that helpful to MOVIES.

    But if you want tag data like that in a form that is easily usable & parse-able and well-supported, you have to go with General-Purpose Multimedia Containers:
    AVI, Quicktime (and, by extension MPEG4), MKV, ASF/WMV

    Like I said, there is a place to put them (User-Data packets in MPEG2-PS and Auxilliary/User/Private Data streams in MPEG2-TS), but there is NO "standard" so any method of putting info into the file(s) is useless without a good, easy method to get that info out of the files. IOW, you'd have to write both your own editor and your own player.

    Metadata I was talking about was: Framerate, DAR, etc.

    Scott
    Quote Quote  
  12. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    The .mpeg/.mpg container doesn't support metadata tags. The GOP user data might be able to store your own self-designed metadata as Cornucopia pointed out, but it is is often used for other purposes. For example, to hold N. American closed captions.

    To add metadata to the MPEG-2 GOP user data, you would have to invent a format of your own for the metadata, plus you would need to write your own programs to use the metadata. To edit the GOP user data with ReStream requires demultiplexing your .mpeg/.mpg files. manually typing the data into the GOP user data, and remultiplexing to an .mpeg

    Like the others have said, repackaging your files in a container for which formal metadata support has been implemented would be a less painful way to address your problem. You have already been given a few suggestions for containers to use.
    Quote Quote  
  13. Member
    Join Date
    Aug 2011
    Location
    Holland, Europe
    Search Comp PM
    Like I said, there is a place to put them (User-Data packets in MPEG2-PS and Auxilliary/User/Private Data streams in MPEG2-TS), but there is NO "standard" so any method of putting info into the file(s) is useless without a good, easy method to get that info out of the files. IOW, you'd have to write both your own editor and your own player.
    If there is a place in MPEG2's to put tag data, then why are we still waiting for someone to build an editor and player to tag MPEG2's? I'm sure there's a demand for this.

    As a collector of music video's I'm ripping DVD's all the time. I don't want to convert to anything else than MPEG2, because converting to MPEG4, MKV and other formats is time consuming and results in compression and loss of quality.

    I want to be able to categorize my music video's the way I categorize my music.
    Quote Quote  
  14. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by HitTheRoad View Post
    ...
    If there is a place in MPEG2's to put tag data, then why are we still waiting for someone to build an editor and player to tag MPEG2's? I'm sure there's a demand for this.

    Even if there is a numerically-significant "demand", that doesn't mean any capable developer cares about it.
    Even (or should I say "especially") in the FOSS world, often we the end-users are forced to "swallow" incomplete/useless/non-existent documentation or help screens >_<

    As a collector of music video's I'm ripping DVD's all the time. I don't want to convert to anything else than MPEG2, because converting to MPEG4, MKV and other formats is time consuming and results in compression and loss of quality.
    Remuxing does not require lossy recompression.
    Quote Quote  
  15. Originally Posted by El Heggunte View Post
    As a collector of music video's I'm ripping DVD's all the time. I don't want to convert to anything else than MPEG2, because converting to MPEG4, MKV and other formats is time consuming and results in compression and loss of quality.
    Remuxing does not require lossy recompression.
    And it's fast and can be done in batch mode.
    Quote Quote  
  16. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    Originally Posted by HitTheRoad View Post
    As a collector of music video's I'm ripping DVD's all the time. I don't want to convert to anything else than MPEG2, because converting to MPEG4, MKV and other formats is time consuming and results in compression and loss of quality.

    I want to be able to categorize my music video's the way I categorize my music.
    MPEG/MPG is a container file format that can be used for MPEG-2 video and several kinds of audio. ASF, MKV and MP4 are container file formats too. MKV is the most versatile. It can hold MPEG-2 video and all the same kinds of audio as MPEG/MPG. The MPEG-2 video and its compatible audio formats don't have to be re-encoded to be used with MKV. You are just placing them in a different wrapper, so to speak.
    Quote Quote  
  17. Member
    Join Date
    Aug 2011
    Location
    Holland, Europe
    Search Comp PM
    So I can wrap all my MPEG2's into MKV in batch mode? Using what program? A quick scan shows me that most videoconverters seem to be developed to convert MKV's to other formats (not vice versa). Especially video converters for the Mac (I'm on a Mac) seem to be totally dedicated to convert all file formats into mp4/m4v.

    Is there a videoplayer for MKV that includes an editor, so that you can do the tagging inside the videoplayer?

    How is this with VLC? VLC seems to have a editor/tagging device (At least it shows metadata fields like 'Title, Artist, Album, Genre and Date).
    Does VLC store the metadata into the file itself? And how to visualise these metadata in the VLC-display? There are only three columns in this display: Name, Author, Duration).

    Click image for larger version

Name:	metadata fields.png
Views:	6223
Size:	55.2 KB
ID:	13019Click image for larger version

Name:	display.png
Views:	4194
Size:	134.3 KB
ID:	13018
    Last edited by HitTheRoad; 7th Jul 2012 at 05:18.
    Quote Quote  
  18. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    Mkvmerge GUI from MKVToolnix will re-wrap your existing .mpeg files in an .mkv container without re-encoding. MKVInfo from MKVToolnix will let you see what metadata is present. MakeMKV can convert directly from DVD. I have only tried the windows versions of these tools (and can't use them very well yet) but they have OS X versions too.

    VLC appears to a have basic metadata editor, but it didn't save the changes when I tried to add metadata to an .mkv file that has none. As far as I can tell there is no easy, simple .mkv metadata editor GUI like mp3tag. There is a GUI for mkvnoolnix's command line mkvpropedit.exe metadata editor available, jmkvpropedit, written in JAVA, for batch editing .mkv metadata http://code.google.com/p/jmkvpropedit/

    These pages have information about adding tags with Mkvmerge GUI via an XML file http://matroska.org/technical/specs/tagging/example-audio.html
    http://matroska.org/technical/specs/tagging/example-video.html

    Here is information about adding cover art/thumbnails
    http://www.matroska.org/technical/cover_art/index.html

    [Edit] Finding a media organizer that can use metadata inside an .mkv container is the problem. I couldn't find one. All the programs I looked at use an external file to hold that information. The easiest solution for you would be to find a good media center or media organizer that is OS X compatible and just keep your .mpeg files as they are, using external files for the information you want to add as metadata.
    Last edited by usually_quiet; 7th Jul 2012 at 13:40.
    Quote Quote  
  19. Member
    Join Date
    Aug 2011
    Location
    Holland, Europe
    Search Comp PM
    @ usually_quiet:
    @ Cornucopia:
    @ jagabo:
    @ El Heggunte:

    It's very disappointing there's no good solution to this. But thank you very much for explaing this to me.

    I wish I had the skills to build a metadata editor/media player/media organizer that fully supports (wrapped into MKV) MPEG2's. But I guess that even if I had the skills, it would be a brainbreaking and timeconsuming proces?

    The easiest solution for you would be to find a good media center or media organizer that is OS X compatible and just keep your .mpeg files as they are, using external files for the information you want to add as metadata.
    You mean something like VLC? The thing I don't understand about VLC is that the metadata in the fields Title , Artist, Album, Date, Genre don't show up in the VLC interface. Check the screenshots I added earlier. Does anyone have a clue?
    Quote Quote  
  20. No, he means something like XBMC or Boxee.
    Quote Quote  
  21. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    Originally Posted by jagabo View Post
    No, he means something like XBMC or Boxee.
    Yes, something like XBMC, or Boxee. Plex Media Center is supposed to be good.
    Quote Quote  
  22. Member
    Join Date
    Aug 2011
    Location
    Holland, Europe
    Search Comp PM
    XBMC, Boxee and Plex seem to be developed for internet tv. They don't have the simplicity of VLC and iTunes.

    I wish there was a media player that supported MPEG2 and MKV (like VLC) and that had a metadata editor, searchability and display like iTunes.

    Am I just a lonely dreamer, or would there be a broad demand for a player like that?
    Quote Quote  
  23. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    Originally Posted by HitTheRoad View Post
    XBMC, Boxee and Plex seem to be developed for internet tv. They don't have the simplicity of VLC and iTunes.

    I wish there was a media player that supported MPEG2 and MKV (like VLC) and that had a metadata editor, searchability and display like iTunes.

    Am I just a lonely dreamer, or would there be a broad demand for a player like that?
    Most people with a vast media collection want something that provides more options for organizing their files than iTunes offers. XBMC, Boxee and Plex may have features you don't want, but you don't have to use them, only the media library features.
    Quote Quote  
  24. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    what you ask for is possible, but does require some programing skills.

    the pic you posted earlier (on the media info) is probably VLC specific.

    i think what you are looking for is a softwarebased media database front-end. but one that can launch the music after you scaned/selected it. it would be the same thing, really. you would use the music or video filenames as the tag, i guess. you build all the media info into the database first of course. then, when you want to review the list, you scroll through as any normal list and make your selections accordingly. the media database would launch the file. i believe that these media front-ends read each files metadata and insert into a custom db for its user so that the list is loaded instantly, rather than reading every folder and file at startup, every time. so either way you're still looking for a software based medial library/launcher.

    how do you have your current media library data ? is it exportable ? or (if you were to find such an app) do you have to type everything into it from scratch ? the MLL won't know any more than that its audio or video file, your custom criterias it may not know.

    1. add your files into the media db, initially
    2. associate any audio and video player to the media db, initially
    3. folder where all media files are kept, initially
    4. review/select/play your media files.

    i just threw this together, just to see how it would look..so its possible, maybe...
    Image Attached Thumbnails Click image for larger version

Name:	mediadb.png
Views:	578
Size:	23.5 KB
ID:	13033  

    Quote Quote  
  25. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    aha, so there is a command line utility that can report some of the items you want in your list...mediainfo. it pulls most of what you want. i just check a file on my hd and it gave me this:

    Code:
    audio:
    Commercial name : MPEG-4
    Duration        : 00:03:33.693
    Format          : AAC
    Title           : Like Humans Do (radio edit)
    Album           : Look Into The Eyeball
    Track name      : Like Humans Do (radio edit)
    Performer       : David Byrne
    Genre           : Rock
    Encoded date    : UTC 2010-11-27 18:53:57
    so, i may try it and see if i can pull all the info from all my audio/video files and build my own media library launcher just to see if i can do it...am curious to see how the list will turn out, but i'm in the middle of another front end project for work. i just took a break from it to visit the forum.
    Quote Quote  
  26. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    Originally Posted by vhelp View Post
    aha, so there is a command line utility that can report some of the items you want in your list...mediainfo. it pulls most of what you want. i just check a file on my hd and it gave me this:

    Code:
    audio:
    Commercial name : MPEG-4
    Duration        : 00:03:33.693
    Format          : AAC
    Title           : Like Humans Do (radio edit)
    Album           : Look Into The Eyeball
    Track name      : Like Humans Do (radio edit)
    Performer       : David Byrne
    Genre           : Rock
    Encoded date    : UTC 2010-11-27 18:53:57
    so, i may try it and see if i can pull all the info from all my audio/video files and build my own media library launcher just to see if i can do it...am curious to see how the list will turn out, but i'm in the middle of another front end project for work. i just took a break from it to visit the forum.
    The OP uses a Mac. If you want to find a solution for him, it will need to be OS X-compatible.
    Quote Quote  
  27. VH Wanderer Ai Haibara's Avatar
    Join Date
    Jan 2006
    Location
    Somewhere on VideoHelp...
    Search Comp PM
    MediaInfo is available for OS X. There are a number of utilities that use it - personally, I use VideoSpec, though iMediaHUD is reportedly also good. I haven't tried using MediaInfo straight from the commandline, though (on any of my systems, including Windows and Linux), so I'm afraid I wouldn't be much help in that regard.
    If cameras add ten pounds, why would people want to eat them?
    Quote Quote  
  28. Originally Posted by HitTheRoad View Post
    How is this with VLC? VLC seems to have a editor/tagging device (At least it shows metadata fields like 'Title, Artist, Album, Genre and Date).
    Does VLC store the metadata into the file itself?
    I've only seen it work for MP3 files. It wraps the MP3 file in an ID3 container.

    http://en.wikipedia.org/wiki/ID3

    It doesn't work for MPG files.
    Quote Quote  
  29. Member
    Join Date
    Aug 2011
    Location
    Holland, Europe
    Search Comp PM
    I've only seen it work for MP3 files. It wraps the MP3 file in an ID3 container.

    http://en.wikipedia.org/wiki/ID3

    It doesn't work for MPG files.
    Why doesn't VLC do the same job on MPEG2's? The Wikipedia-link you sent indicates it should be possible:

    "ID3 tags were designed with MP3 in mind, so they would work without problems with MP3 and MP3Pro files. However, the tagsets are an independent part of the MP3 file and should be usable elsewhere. In practice, the only other format which widely uses ID3v2 tags is AIFF, where the tag is stored inside an IFF chunk named "ID3". The same could be accomplished in WAV, but isn't. "

    I stumbled upon GStreamer: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/part-introduction.html
    This it what the GStreamer Writers Guide says about tagging and metadata:
    http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/chapter-advanced-tagging.html

    http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/chapter-advanced-tagging.html
    Last edited by HitTheRoad; 9th Jul 2012 at 07:50.
    Quote Quote  
  30. Member
    Join Date
    Aug 2011
    Location
    Holland, Europe
    Search Comp PM
    I think what you are looking for is a softwarebased media database front-end. but one that can launch the music after you scaned/selected it. it would be the same thing, really. You would use the music or video filenames as the tag, i guess.
    I regard a media database like you are trying to build as a second best solution. I prefer storing all metadata (Title, Artist, Album, Genre, Year) inside the files. Its' much safer. If you store the meta data of all files into an external database, you risk loosing everything in case the database gets corrupted.
    So what I'm really looking for is a media library launcher combined with a tool that wraps MPEG2's in an ID3 container.

    Aha, so there is a command line utility that can report some of the items you want in your list...mediainfo. It pulls most of what you want. so, I may try it and see if I can pull all the info from all my audio/video files and build my own media library launcher
    I don't see the point of using Mediainfo to build a media library laucher. Please explain?
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!