|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
On 9/13/07, Konrad Meyer <konrad@tylerc.org> wrote:
> > Any chance this could be expanded to add FLAC and OGG support? > > Thanks! > -- > Konrad Meyer <konrad@tylerc.org> http://konrad.sobertillnoon.com/ > Done! Along with a preliminary list of supported formats and some cleanup. Thanks for the request! tarball: http://dark.fhtr.org/repos/metadata/metadata-0.2.tar.gz git: http://dark.fhtr.org/repos/metadata/ Changelog: README: * added flacinfo, wmainfo, mp4info and ogginfo to the list of dependencies * prelim list of supported formats lib/metadata/extract.rb: * .ps.gz support * list archive contents * remove null fields from output * support for flac and ogg * untested support for wma and m4a * Audio.Bitrate now in kbps to match shared-filemetadata-spec Description ----------- This package `Metadata' comes with a library called `metadata' and a small program called `mdh'. The library probes files for their metadata (e.g. jpeg dimensions and camera make, mp3 artist, pdf word count) and returns the metadata as a Hash. Mdh can print out file metadata as YAML and package the metadata with the file. This package has many dependencies since there is no single universal metadata header format that all files use. Blame resource forks, filename extensions, bags of bytes and mimetypes. Usage ----- # print out metadata header mdh -p myfile.jpg # create myfile.jpg.mdh, which consists of metadata header + myfile.jpg mdh myfile.jpg # print out metadata header from mdh file mdh -e -p myfile.jpg.mdh # strip out metadata header from mdh file and save it to myfile.jpg mdh -e myfile.jpg.mdh irb> Metadata.extract('myfile.jpg') irb> Metadata.extract_text('myfile.jpg') irb> Pathname.new("myfile.jpg").metadata List of supported formats ------------------------- Audio: Successfully tested with: mp3, flac, ogg, wav Should also work: wma, m4a Video: What you manage to make mplayer play, which can be just about anything. Then again, missing title and author data, etc. (do videos even have those?) Successfully tested with: wmv, mov, divx, xvid, flv, ogm, mpg Images: Should handle pretty much anything (apart from XCF and ORF.) Successfully tested with: jpeg, png, gif, nef, dng, crw, pef, psd Documents: Successfully tested with: pdf, ppt, odp, sxi, ps, ps.gz, html, txt Should work: - OpenOffice docs work to some degree (personally, I'm using unoconv to convert OO docs to temp PDFs for the text & dimensions extraction, so those bits of data are missing.) - MS Office docs to some degree (ppt at least, doc and xls should work too, dimensions missing due to the above temp PDF -thing.) Others: Whatever extract spits out on the five or six bits of metadata I'm using from it. Archive contents at least. Requirements ------------ * Ruby 1.8 * Tons of metadata extraction programs and libs, list of gems: flacinfo-rb wmainfo-rb MP4info list of debian packages: dcraw libimlib2-ruby extract libimage-exiftool-perl poppler-utils mplayer html2text imagemagick unhtml pstotext antiword catdoc shared-mime-info vorbis-tools * You do want to install the latest versions of dcraw and shared-mime-info to be able to handle camera raw images. http://cybercom.net/~dcoffin/dcraw/ http://freedesktop.org/wiki/Software/shared-mime-info * Python + chardet library http://chardet.feedparser.org/ Install ------- De-compress archive and enter its top directory. Then type: ($ su) # ruby setup.rb These simple step installs this program under the default location of Ruby libraries. You can also install files into your favorite directory by supplying setup.rb some options. Try "ruby setup.rb --". License ------- Ruby's Ilmari Heikkinen <ilmari.heikkinen gmail com> http://fhtr.blogspot.com |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
--nextPart7632687.r44U5AEjXj
Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Quoth Ilmari Heikkinen: > On 9/13/07, Konrad Meyer <konrad@tylerc.org> wrote: > > > > Any chance this could be expanded to add FLAC and OGG support? > > > > Thanks! > > -- > > Konrad Meyer <konrad@tylerc.org> http://konrad.sobertillnoon.com/ > > >=20 > Done! Along with a preliminary list of supported formats and some cleanup. > Thanks for the request! >=20 >=20 > tarball: http://dark.fhtr.org/repos/metadata/metadata-0.2.tar.gz > git: http://dark.fhtr.org/repos/metadata/ >=20 >=20 > Changelog: >=20 > README: > * added flacinfo, wmainfo, mp4info and ogginfo to the list of > dependencies > * prelim list of supported formats > lib/metadata/extract.rb: > * .ps.gz support > * list archive contents > * remove null fields from output > * support for flac and ogg > * untested support for wma and m4a > * Audio.Bitrate now in kbps to match shared-filemetadata-spec >=20 >=20 > Description > ----------- >=20 > This package `Metadata' comes with a library called `metadata' and > a small program called `mdh'. >=20 > The library probes files for their metadata (e.g. jpeg dimensions > and camera make, mp3 artist, pdf word count) and returns the metadata > as a Hash. >=20 > Mdh can print out file metadata as YAML and package the metadata > with the file. >=20 > This package has many dependencies since there is no single universal > metadata header format that all files use. Blame resource forks, filena= me > extensions, bags of bytes and mimetypes. >=20 >=20 > Usage > ----- >=20 > # print out metadata header > mdh -p myfile.jpg >=20 > # create myfile.jpg.mdh, which consists of metadata header + myfile.jpg > mdh myfile.jpg >=20 > # print out metadata header from mdh file > mdh -e -p myfile.jpg.mdh >=20 > # strip out metadata header from mdh file and save it to myfile.jpg > mdh -e myfile.jpg.mdh >=20 > irb> Metadata.extract('myfile.jpg') > irb> Metadata.extract_text('myfile.jpg') > irb> Pathname.new("myfile.jpg").metadata >=20 >=20 > List of supported formats > ------------------------- >=20 > Audio: > Successfully tested with: > mp3, flac, ogg, wav > Should also work: > wma, m4a >=20 > Video: > What you manage to make mplayer play, which can be just about anythin= g. > Then again, missing title and author data, etc. (do videos even have= =20 those?) > Successfully tested with: > wmv, mov, divx, xvid, flv, ogm, mpg >=20 > Images: > Should handle pretty much anything (apart from XCF and ORF.) > Successfully tested with: > jpeg, png, gif, nef, dng, crw, pef, psd >=20 > Documents: > Successfully tested with: > pdf, ppt, odp, sxi, ps, ps.gz, html, txt > Should work: > - OpenOffice docs work to some degree (personally, I'm using unoconv = to > convert OO docs to temp PDFs for the text & dimensions extraction, = so > those bits of data are missing.) > - MS Office docs to some degree (ppt at least, doc and xls should wor= k=20 too, > dimensions missing due to the above temp PDF -thing.) >=20 > Others: > Whatever extract spits out on the five or six bits of metadata I'm us= ing > from it. Archive contents at least. >=20 > Requirements > ------------ >=20 > * Ruby 1.8 >=20 > * Tons of metadata extraction programs and libs, > list of gems: > flacinfo-rb > wmainfo-rb > MP4info > list of debian packages: > dcraw > libimlib2-ruby > extract > libimage-exiftool-perl > poppler-utils > mplayer > html2text > imagemagick > unhtml > pstotext > antiword > catdoc > shared-mime-info > vorbis-tools >=20 > * You do want to install the latest versions of dcraw and > shared-mime-info to be able to handle camera raw images. > http://cybercom.net/~dcoffin/dcraw/ > http://freedesktop.org/wiki/Software/shared-mime-info >=20 > * Python + chardet library > http://chardet.feedparser.org/ >=20 > Install > ------- >=20 > De-compress archive and enter its top directory. > Then type: >=20 > ($ su) > # ruby setup.rb >=20 > These simple step installs this program under the default > location of Ruby libraries. You can also install files into > your favorite directory by supplying setup.rb some options. > Try "ruby setup.rb --". >=20 >=20 > License > ------- >=20 > Ruby's >=20 >=20 > Ilmari Heikkinen <ilmari.heikkinen gmail com> > http://fhtr.blogspot.com Wow, thank you! That was fast. =2D-=20 Konrad Meyer <konrad@tylerc.org> http://konrad.sobertillnoon.com/ --nextPart7632687.r44U5AEjXj Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBG6pS3CHB0oCiR2cwRAmhkAJ9J9o2qP+FxL0H5LRnbY8 XPDC03+wCeOcg9 pvL3mRtjZ1JPn8wp12QNKhU= =AGFz -----END PGP SIGNATURE----- --nextPart7632687.r44U5AEjXj-- |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
--nextPart54087508.ELBvalPpTO
Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Quoth Ilmari Heikkinen: > On 9/13/07, Konrad Meyer <konrad@tylerc.org> wrote: > > > > Any chance this could be expanded to add FLAC and OGG support? > > > > Thanks! > > -- > > Konrad Meyer <konrad@tylerc.org> http://konrad.sobertillnoon.com/ > > >=20 > Done! Along with a preliminary list of supported formats and some cleanup. > Thanks for the request! >=20 >=20 > tarball: http://dark.fhtr.org/repos/metadata/metadata-0.2.tar.gz > git: http://dark.fhtr.org/repos/metadata/ >=20 >=20 > Changelog: >=20 > README: > * added flacinfo, wmainfo, mp4info and ogginfo to the list of > dependencies > * prelim list of supported formats > lib/metadata/extract.rb: > * .ps.gz support > * list archive contents > * remove null fields from output > * support for flac and ogg > * untested support for wma and m4a > * Audio.Bitrate now in kbps to match shared-filemetadata-spec >=20 >=20 > Description > ----------- >=20 > This package `Metadata' comes with a library called `metadata' and > a small program called `mdh'. >=20 > The library probes files for their metadata (e.g. jpeg dimensions > and camera make, mp3 artist, pdf word count) and returns the metadata > as a Hash. >=20 > Mdh can print out file metadata as YAML and package the metadata > with the file. >=20 > This package has many dependencies since there is no single universal > metadata header format that all files use. Blame resource forks, filena= me > extensions, bags of bytes and mimetypes. >=20 >=20 > Usage > ----- >=20 > # print out metadata header > mdh -p myfile.jpg >=20 > # create myfile.jpg.mdh, which consists of metadata header + myfile.jpg > mdh myfile.jpg >=20 > # print out metadata header from mdh file > mdh -e -p myfile.jpg.mdh >=20 > # strip out metadata header from mdh file and save it to myfile.jpg > mdh -e myfile.jpg.mdh >=20 > irb> Metadata.extract('myfile.jpg') > irb> Metadata.extract_text('myfile.jpg') > irb> Pathname.new("myfile.jpg").metadata >=20 >=20 > List of supported formats > ------------------------- >=20 > Audio: > Successfully tested with: > mp3, flac, ogg, wav > Should also work: > wma, m4a >=20 > Video: > What you manage to make mplayer play, which can be just about anythin= g. > Then again, missing title and author data, etc. (do videos even have= =20 those?) > Successfully tested with: > wmv, mov, divx, xvid, flv, ogm, mpg >=20 > Images: > Should handle pretty much anything (apart from XCF and ORF.) > Successfully tested with: > jpeg, png, gif, nef, dng, crw, pef, psd >=20 > Documents: > Successfully tested with: > pdf, ppt, odp, sxi, ps, ps.gz, html, txt > Should work: > - OpenOffice docs work to some degree (personally, I'm using unoconv = to > convert OO docs to temp PDFs for the text & dimensions extraction, = so > those bits of data are missing.) > - MS Office docs to some degree (ppt at least, doc and xls should wor= k=20 too, > dimensions missing due to the above temp PDF -thing.) >=20 > Others: > Whatever extract spits out on the five or six bits of metadata I'm us= ing > from it. Archive contents at least. >=20 > Requirements > ------------ >=20 > * Ruby 1.8 >=20 > * Tons of metadata extraction programs and libs, > list of gems: > flacinfo-rb > wmainfo-rb > MP4info > list of debian packages: > dcraw > libimlib2-ruby > extract > libimage-exiftool-perl > poppler-utils > mplayer > html2text > imagemagick > unhtml > pstotext > antiword > catdoc > shared-mime-info > vorbis-tools >=20 > * You do want to install the latest versions of dcraw and > shared-mime-info to be able to handle camera raw images. > http://cybercom.net/~dcoffin/dcraw/ > http://freedesktop.org/wiki/Software/shared-mime-info >=20 > * Python + chardet library > http://chardet.feedparser.org/ >=20 > Install > ------- >=20 > De-compress archive and enter its top directory. > Then type: >=20 > ($ su) > # ruby setup.rb >=20 > These simple step installs this program under the default > location of Ruby libraries. You can also install files into > your favorite directory by supplying setup.rb some options. > Try "ruby setup.rb --". >=20 >=20 > License > ------- >=20 > Ruby's >=20 >=20 > Ilmari Heikkinen <ilmari.heikkinen gmail com> > http://fhtr.blogspot.com Hmm, am I not seeing it (just using 'mdh -p') or can metadata.rb extract stuff like artist, title, album, track, and whatnot from ogg/flac? =2D-=20 Konrad Meyer <konrad@tylerc.org> http://konrad.sobertillnoon.com/ --nextPart54087508.ELBvalPpTO Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBG6tYICHB0oCiR2cwRAvfQAKDH0paIyE+d2pV5rw+Xgt BcjKW5vQCggiiV yV8vD3aAT+PlYIdnC7NzyE0= =DxwV -----END PGP SIGNATURE----- --nextPart54087508.ELBvalPpTO-- |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Hi Ilmari!
quoth the Ilmari Heikkinen: > * added flacinfo, wmainfo, mp4info and ogginfo to the list of > dependencies Cool, you were able to use a couple of my libraries (be afraid people...). > Video: > What you manage to make mplayer play, which can be just about anything. > Then again, missing title and author data, etc. (do videos even have > those?) Successfully tested with: > wmv, mov, divx, xvid, flv, ogm, mpg Just wanted to mention that despite the name, wmainfo will parse anything wrapped in an ASF audio/video container format[0], so, you could use it to parse wmv movies as well if your user didn't have mplayer installed. [0] http://en.wikipedia.org/wiki/Advanced_Systems_Format > Ilmari Heikkinen <ilmari.heikkinen gmail com> > http://fhtr.blogspot.com Thanks for the code, and have a good one, -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972 |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On 9/14/07, Konrad Meyer <konrad@tylerc.org> wrote:
> Quoth Ilmari Heikkinen: > > On 9/13/07, Konrad Meyer <konrad@tylerc.org> wrote: > > > > > > Any chance this could be expanded to add FLAC and OGG support? > > > > > > Thanks! > > > -- > > > Konrad Meyer <konrad@tylerc.org> http://konrad.sobertillnoon.com/ > > > > > > > Done! Along with a preliminary list of supported formats and some cleanup. > > Thanks for the request! > > List of supported formats > > ------------------------- > > Audio: > > Successfully tested with: > > mp3, flac, ogg, wav > Hmm, am I not seeing it (just using 'mdh -p') or can metadata.rb extract > stuff like artist, title, album, track, and whatnot from ogg/flac? It should at least. If you're having trouble, lemme know kig@manifold:~$ mdh -p downloads/Mists_of_Time-4T.ogg --- Audio.Album: Favorite Things Audio.TrackNo: 10 Audio.Samplerate: 44100 Audio.Bitrate: 128.0 Audio.Title: Mists of Time - 4T Audio.Duration: 400.0 Audio.Comment: http://www.kahvi.org Audio.ReleaseDate: 2002-01-01T00:00:00Z File.Size: 5816848 Audio.Channels: 2 File.Modified: !timestamp 2007-09-14T13:56:51+0300 File.Format: audio/x-vorbis+ogg Audio.Artist: 4T Thieves kig@manifold:~$ mdh -p 05-Self-Saboteur\ \[feat.\ Kristy\ Thirsk\].flac --- Audio.Album: Nuages du Monde Audio.TrackNo: 5 Audio.Samplerate: 44100 Audio.Bitrate: 990331.947108105 Audio.Genre: Ambient Pop Audio.Title: Self-Saboteur [feat. Kristy Thirsk] Audio.Duration: 264.186666666667 Audio.ReleaseDate: 2006-01-01T00:00:00Z Audio.VariableBitrate: true File.Size: 32704062 Audio.Channels: 2 File.Modified: !timestamp 2006-11-17T10:46:28+0200 File.Format: audio/x-flac Audio.Artist: Delerium -- Ilmari Heikkinen <ilmari.heikkinen gmail com> http://fhtr.blogspot.com |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
--nextPart4412710.9iqTD9Azbt
Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Quoth Ilmari Heikkinen: > On 9/14/07, Konrad Meyer <konrad@tylerc.org> wrote: > > Quoth Ilmari Heikkinen: > > > On 9/13/07, Konrad Meyer <konrad@tylerc.org> wrote: > > > > > > > > Any chance this could be expanded to add FLAC and OGG support? > > > > > > > > Thanks! > > > > -- > > > > Konrad Meyer <konrad@tylerc.org> http://konrad.sobertillnoon.com/ > > > > > > > > > > Done! Along with a preliminary list of supported formats and some=20 cleanup. > > > Thanks for the request! > > > List of supported formats > > > ------------------------- > > > Audio: > > > Successfully tested with: > > > mp3, flac, ogg, wav >=20 > > Hmm, am I not seeing it (just using 'mdh -p') or can metadata.rb extract > > stuff like artist, title, album, track, and whatnot from ogg/flac? >=20 > It should at least. If you're having trouble, lemme know >=20 > kig@manifold:~$ mdh -p downloads/Mists_of_Time-4T.ogg > --- > Audio.Album: Favorite Things > Audio.TrackNo: 10 > Audio.Samplerate: 44100 > Audio.Bitrate: 128.0 > Audio.Title: Mists of Time - 4T > Audio.Duration: 400.0 > Audio.Comment: http://www.kahvi.org > Audio.ReleaseDate: 2002-01-01T00:00:00Z > File.Size: 5816848 > Audio.Channels: 2 > File.Modified: !timestamp 2007-09-14T13:56:51+0300 > File.Format: audio/x-vorbis+ogg > Audio.Artist: 4T Thieves >=20 > kig@manifold:~$ mdh -p 05-Self-Saboteur\ \[feat.\ Kristy\ Thirsk\].flac > --- > Audio.Album: Nuages du Monde > Audio.TrackNo: 5 > Audio.Samplerate: 44100 > Audio.Bitrate: 990331.947108105 > Audio.Genre: Ambient Pop > Audio.Title: Self-Saboteur [feat. Kristy Thirsk] > Audio.Duration: 264.186666666667 > Audio.ReleaseDate: 2006-01-01T00:00:00Z > Audio.VariableBitrate: true > File.Size: 32704062 > Audio.Channels: 2 > File.Modified: !timestamp 2006-11-17T10:46:28+0200 > File.Format: audio/x-flac > Audio.Artist: Delerium >=20 > -- > Ilmari Heikkinen <ilmari.heikkinen gmail com> > http://fhtr.blogspot.com Yeah, I'm having some trouble. I have latest metadata (0.2). $ mdh -p music/Wolfmother\ -\ Joker\ \&\ The\ Thief.flac=20 ---=20 Doc.Created:=20 Doc.Subject:=20 Doc.Author:=20 Doc.Modified:=20 Doc.Title:=20 Doc.Language:=20 Doc.WordCount: 0 Doc.Description:=20 File.Content: "" File.Software:=20 File.Size: 37505677 File.Modified: 2007-01-03T22:09:31-08:00 File.Format: audio/x-flac When mplayer shows me that it is tagged: $ mplayer music/Wolfmother\ -\ Joker\ \&\ The\ Thief.flac ... Clip info: Title: Joker & The Thief Artist: Wolfmother Album: Wolfmother Genre: Rock $ gem list --local | grep flacinfo flacinfo-rb (0.4) I have flacinfo-rb 0.4. Any ideas? =2D-=20 Konrad Meyer <konrad@tylerc.org> http://konrad.sobertillnoon.com/ --nextPart4412710.9iqTD9Azbt Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBG632ACHB0oCiR2cwRAtNgAJ4oJxACJFBemPS6IH4IOs CA21p7SgCgzym2 EnqahNyV/PCyc4X/vADAscg= =jR4c -----END PGP SIGNATURE----- --nextPart4412710.9iqTD9Azbt-- |
|
![]() |
| Outils de la discussion | |
|
|