wmainfo

wmainfo is a library for reading low level information from files encapsulated in an Advanced Systems Format header. Files of this type typically have a .wma extension for audio only files, and .wmv for video files. wmainfo is available for both Ruby and Python, and both of these libraries are ports of Dan Sully's Audio-WMA Perl module. All credit for the hard work is owed to Dan.

wmainfo can extract the following information:

download

wmainfo-rb Ruby library

Download the Ruby library from the wmainfo-rb rubyforge project page.
You can also install via remote gems:

# gem install -r wmainfo-rb

And you can also use this ebuild file if you run Gentoo:

  • wmainfo-rb-0.5.ebuild
  • wmainfo-py Python library

    Newest:

    Older:

    usage examples

    wmainfo-rb Ruby library

    irb(main):001:0> require 'wmainfo'
    => true
    irb(main):002:0> file = WmaInfo.new("heartOfStone.wma")
        ...irb output omitted...
    irb(main):003:0> file.tags
    => {"rating"=>"", "title"=>"Heart Of Stone", "author"=>"The Rolling Stones", 
    "description"=>"", "copyright"=>""}
    irb(main):004:0> file.info
    => {"seekable"=>2, "preroll"=>1578, "send_duration"=>1697700000, "broadcast"=>0, 
    "playtime_seconds"=>170, "play_duration"=>1712940000, "creation_date"=>127340750804910000, 
    "min_packet_size"=>4490, "data_packets"=>457, "bitrate"=>96, "max_bitrate"=>96647, 
    "max_packet_size"=>4490, "creation_date_unix"=>1089601480, "filesize"=>2054339, 
    "creation_string"=>Sun Jul 11 20:04:40 PDT 2004, "fileid_guid"=>
    "2A354329-09B6-473A-B449-610E2116509D"}
    irb(main):005:0> file.print_objects
    ASF_Codec_List_Object: 86D15240-311D-11D0-A3A4-00A0C90348F6 170 1941
    ASF_Stream_Properties_Object: B7DC0791-A9B7-11CF-8EE6-00C00C205365 114 2111
    ASF_Header_Object: 75B22630-668E-11CF-A6D9-00AA0062CE6C 2359 7
    ASF_Extended_Content_Description_Object: D2D0A440-E307-11D2-97F0-00A0C95EA850 314 1627
    ASF_Content_Description_Object: 75B22633-668E-11CF-A6D9-00AA0062CE6C 102 2257
    ASF_File_Properties_Object: 8CABDCA1-A947-11CF-8EE4-00C00C205365 104 30
    ASF_Stream_Bitrate_Properties_Object: 7BF875CE-468D-11D1-8D82-006097C9A2B2 32 2225
    ASF_Header_Extension_Object: 5FBF03B5-A92E-11CF-8EE3-00C00C205365 1493 134
        ...irb output omitted...
    irb(main):006:0> file.hasdrm?
    => false
    

    You can also see the rdoc documentation for wmainfo-rb.

    wmainfo-py Python library

    >>> import wmainfo
    >>> file = wmainfo.WmaInfo("heartOfStone.wma")
    >>> file.tags
    {'Rating': u'', u'AlbumTitle': u'The Rolling Stones Now', 'Description': u'',
    'Copyright': u'', 'Author': u'The Rolling Stones', 'Title': u'Heart Of Stone',
    u'Year': u'1965', u'TrackNumber': 4L}
    >>> file.info
    {'fileid_guid': '2A354329-09B6-473A-B449-610E2116509D', 'send_duration': 1697700000L, 
    'max_packet_size': 4490L, 'creation_string': 'Mon Jul 12 03:04:40 2004', 'preroll': 
    1578L, 'min_packet_size': 4490L, 'play_duration': 1712940000L, 'data_packets': 457L, 
    'creation_date': 127340750804910000L, 'broadcast': 0L, 'playtime_seconds': 170L, 
    'creation_date_unix': 1089601480, 'seekable': 2L, 'max_bitrate': 96647L, 'bitrate': 
    96L, 'filesize': 2054339L}
    >>> file.printobjects()
    ASF_Extended_Content_Description_Object: D2D0A440-E307-11D2-97F0-00A0C95EA850 314 1627
    ASF_Stream_Properties_Object: B7DC0791-A9B7-11CF-8EE6-00C00C205365 114 2111
    ASF_Content_Description_Object: 75B22633-668E-11CF-A6D9-00AA0062CE6C 102 2257
    ASF_File_Properties_Object: 8CABDCA1-A947-11CF-8EE4-00C00C205365 104 30
    ASF_Stream_Bitrate_Properties_Object: 7BF875CE-468D-11D1-8D82-006097C9A2B2 32 2225
    ASF_Codec_List_Object: 86D15240-311D-11D0-A3A4-00A0C90348F6 170 1941
    ASF_Header_Extension_Object: 5FBF03B5-A92E-11CF-8EE3-00C00C205365 1493 134
    ASF_Header_Object: 75B22630-668E-11CF-A6D9-00AA0062CE6C 2359 7
    >>> file.hasdrm()
    False
    

    stats

    It is Friday December 05, 2008 10:17 am
    This page served 7122 times
    This page last modified: April 14, 2008 11:28 am
    Your IP address is: 38.103.63.61
    You are browsing using: CCBot/1.0 (+http://www.commoncrawl.org/bot.html)
    You are browsing from: United States.
    badcomputer.org's uptime: 10:17:22 up 24 days, 14:27, 2 users, load average: 0.00, 0.00, 0.00

    local

    home | unix stuff | dir2ogg | sneetchalizer | wmainfo | q&d guide to permissions | q&d guide to tar and gzip | code | MS rant | browser shootout | linux & iAudio X5 | photos | music | programming poetry | sieve of Eratosthenes | plea | rain | suffer | archive | about | recipes | compaqr3000 | sitemap

    search

    Google

    credits

    hacker emblem

    This page, and all pages on this site were created and are maintained by Darren Kirby using valid XHTML 1.0 and CSS, and are ©copyright 2002 - 2008. The Penguin image was created by Tukka, and is used by permission. Inspiration for the look of this site was provided by Eric A. Meyer's CSS gallery. This website runs on Gentoo Linux. It is served by Apache. PHP and MySQL hold together the backend.

    advertisement