tags:

views:

372

answers:

2

I have been doing some research on ID3V2 tags and Video Formats such as MP4 and WMV. The two top libraries for editing ID3V2 tags seem to be:

Entagged and Jaudiotagger

Both of these support only audio formats. ( They support M4A and WMA but not MP4 and WMV ) I guess first off why is this? Then are they any alternatives.

A: 

It appears JID3 will do the trick. It doesn't have any restrictions on extension.

http://jid3.blinkenlights.org/

Now hopefully someone finds this open-source project a designer!

Here is an example of using it with several different file formats:

public class JITExample {
  private static MediaFile audioFile;

  public static void main(String... megaThrustersAreGo) {

    //File file = new File("/home/rhigdon/Desktop/project-voltron/test-files/video.mp4");
    //File file = new File("/home/rhigdon/Desktop/project-voltron/test-files/movGetOutTheWay_iPhone_Cellular_1.3gp");
    File file = new File("/home/rhigdon/Desktop/project-voltron/test-files/movGetOutTheWay_HD_WMV_720p_1.wmv");
    //Entagged Soltuion

    audioFile = new MP3File(file);


    try {
      ID3V2_3_0Tag tag = new ID3V2_3_0Tag();
      tag.setArtist("Ryan Higdon");
      tag.setAlbum("Ryan's Funky Beats");
      audioFile.setID3Tag(tag);
      audioFile.sync();
      for (ID3Tag eachTag : audioFile.getTags()) {
        System.out.println(eachTag.toString());
      }

    } catch (ID3Exception e) {
      e.printStackTrace();
      System.out.println("something bad happened");
    }


  }
}
rhigdon
A: 

According to the introduction page here http://www.id3.org/Introduction, ogg, wma and aac uses their own formats separated from ID3v2.
Another library for editing ID3v2 and playing mp3:s is JLayer. It doesn't need JMF and it is available for both J2SE and J2ME.

Skadlig