FlacInfo

FlacInfo is a pure Ruby library for reading/writing low level information from Flac (Free Lossless Audio Codec) files.

flacinfo can extract the following information:

* Contents of the STREAMINFO block (bitrate, number of samples, md5 signature etc)
* Contents of the VORBIS_COMMENT block, ie: the tags...
* Contents of the SEEKTABLE block
* Size of PADDING block if present
* Size of CUESHEET block if present. The cuesheet itself is not parsed yet.
* Contents of the APPLICATION block if present.
* Contents of the PICTURE block if present, and write it to an external file (version 0.2).

flacinfo can write the following information back to the file:

* The Vorbis comments (version 0.3).

As an added bonus, if there is data present in a FlacFile APPLICATION block it can parse it, and dump the raw data to the console or a file.

FlacInfo has been tested on Linux and OS X. It should work on any Unix with Ruby, and on Windows as well. If you try the library on another OS/System please do let me know how it works for you. Please report all bugs and issues using FlacInfo's Rubyforge bug tracker.
documentation

Here is FlacInfo's Rdoc documentation.

Here is a brief example irb session:

irb(main):001:0> require 'flacinfo'
=> true
irb(main):002:0> song = FlacInfo.new("manuChao-denia.flac")
=> # (VORBIS_COMMENT size=208 offset=536) (PADDING size=4096 offset=748)>
irb(main):003:0> song.print_tags
artist: Manu Chao
tracknumber: 07/17
title: Denia
date: 2001
vendor_tag: reference libFLAC 1.1.2 20050205
genre: Latin Reggae
album: Prxima Estacin Esperanza
offset: 536
block_size: 208
comment: Starbellied using sneetchalizer
=> nil
irb(main):004:0> song.comment_del("album")
=> true
irb(main):005:0> song.comment_add("album=Próxima Estación: Esperanza")
=> true
irb(main):006:0> song.update
=> true
irb(main):007:0> song.print_tags
artist: Manu Chao
tracknumber: 07/17
title: Denia
date: 2001
vendor_tag: reference libFLAC 1.1.2 20050205
genre: Latin Reggae
album: Próxima Estación: Esperanza
offset: 536
block_size: 211
comment: Starbellied using sneetchalizer
=> nil
irb(main):008:0> exit

このブログ記事について

このページは、ossanが2011年2月14日 18:56に書いたブログ記事です。

ひとつ前のブログ記事は「Screenshot」です。

次のブログ記事は「dir2ogg」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。