IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Ogg and Cover Art
AliceWonder
post Sep 3 2012, 07:25
Post #1





Group: Members
Posts: 119
Joined: 13-July 12
From: California
Member No.: 101393



This is what I tried, from command shell:

echo "METADATA_BLOCK_PICTURE=`base64 --wrap=0 cover.jpg`" > picture.meta
vorbiscomment -c picture.meta song.ogg

When I look at song.ogg I can see it is in the vorbis comments, but when I add the song to my rhythmbox library - no album art.

Am I do something wrong or does rhythmbox just not support album art with ogg?

It does with both flac and mp3 but both metaflac and lame have switches for adding album art, vorbiscomment does not appear to.
Go to the top of the page
+Quote Post
AliceWonder
post Sep 3 2012, 08:04
Post #2





Group: Members
Posts: 119
Joined: 13-July 12
From: California
Member No.: 101393



Gawd - I'm reading osdir mailing list archives trying to find how to do this from command line tools and suddenly audio adverts start blasting.
Why osdir ?? why? You use to be one of the good guys. *ah well*.
Go to the top of the page
+Quote Post
skamp
post Sep 3 2012, 08:51
Post #3





Group: Developer
Posts: 1453
Joined: 4-May 04
From: France
Member No.: 13875



The official way is to use a FLAC METADATA_BLOCK_PICTURE structure. Base64 data of the picture itself is not enough. I haven't tested embedded artwork in Ogg files though, I don't know what playback software supports it.


--------------------
See my profile for measurements, tools and recommendations.
Go to the top of the page
+Quote Post
AliceWonder
post Sep 3 2012, 11:02
Post #4





Group: Members
Posts: 119
Joined: 13-July 12
From: California
Member No.: 101393



If it is suppose to end up looking the way an embedded image within a flac file looks, looks like I'm out of luck with the reference encoder and vorbiscomment then, I guess I'll have to wait for them to come up with a command switch similar to what is in metaflac for adding artwork. I believe I'm running the latest vorbis-tools, I don't want to mess with a third party tool to embed them.
Go to the top of the page
+Quote Post
digital_
post Jan 4 2013, 15:38
Post #5





Group: Members
Posts: 1
Joined: 4-January 13
Member No.: 105581



Does Vorbis tag support BMP pictures?
I've tried to insert BMP file in Vorbis, but Foobar2000 reported an error.
Go to the top of the page
+Quote Post
lvqcl
post Jan 4 2013, 16:12
Post #6





Group: Developer
Posts: 3439
Joined: 2-December 07
Member No.: 49183



from http://wiki.xiph.org/index.php/VorbisComment#Cover_art :

"Picture data should be stored in PNG or JPEG formats..."
Go to the top of the page
+Quote Post
Nekit1234007
post Jan 4 2013, 16:20
Post #7





Group: Members
Posts: 12
Joined: 26-February 12
Member No.: 97404



QUOTE (digital_ @ Jan 4 2013, 18:38) *
Does Vorbis tag support BMP pictures?
I've tried to insert BMP file in Vorbis, but Foobar2000 reported an error.

This is a bad idea to store BMP pictures as an album art inside audio files, especially if they’re big. You can convert those to png without any loss of quality and they are supported pretty much by all of the media containers.
Go to the top of the page
+Quote Post
Walen
post Aug 18 2013, 10:53
Post #8





Group: Members
Posts: 1
Joined: 18-August 13
Member No.: 109672



Can anyone recommend a good player that supports METADATA_BLOCK_PICTURE? (windows/linux/android)

This post has been edited by Walen: Aug 18 2013, 10:56
Go to the top of the page
+Quote Post
AliceWonder
post Mar 21 2014, 18:19
Post #9





Group: Members
Posts: 119
Joined: 13-July 12
From: California
Member No.: 101393



QUOTE (Walen @ Aug 18 2013, 02:53) *
Can anyone recommend a good player that supports METADATA_BLOCK_PICTURE? (windows/linux/android)


It's working for me in any of the GStreamer based audio players.

Flac, ogg vorbis. ogg opus - all display art added with that tag.

This post has been edited by AliceWonder: Mar 21 2014, 18:19
Go to the top of the page
+Quote Post
lothario15
post Nov 12 2014, 16:59
Post #10





Group: Members
Posts: 7
Joined: 3-November 14
Member No.: 117719



I thought I'd resurrect an old thread to share my solution for adding cover art to Ogg files.

Formerly, I encoded from FLAC to Vorbis with simple bash/batch scripts and added a jpeg to the output folder as cover art. For a while, this was great; my FLAC to Vorbis scripts use metaflac-extracted values to create an output folder structure and the encoders automatically transfer metadata. Minimal user input = perfect.

However, new devices have since necessitated that I move from the cover.jpg-in-music-folder approach to embedding a jpeg in the file's metadata. Initially, I relied on a GUI tool to ensure cover art was written and could be read correctly; in Linux I used Puddletag and when using Windows I used MP3Tag.

Being lazy, I soon tired of the monotony of manually adding cover art using a GUI so sought commands that I could add to scripts to automate the process. I tried the base64-encoding method described by the OP but also found the results unsatisfactory. Fortunately, a little digging uncovered kid3-cli.

kid3-cli ticked all my boxes; it's a cross-platform, it's a command-line utility and it can be called in scripts. I appended the following to my scripts to automatically add cover art:

CODE
kid3-cli -c "select all" -c 'set picture:"/path/to/Cover.jpg" "back cover"' "/path/to/*.ogg"


In this example, the command selects all .ogg files in a directory and adds the image at /path/to/Cover.jpg as the back cover. Like Puddletag, it uses the mutagen library to write the METADATA_BLOCK_PICTURE and handles Vorbis files without issues (the only problem I've had is its failure to add cover art to Opus files in Linux with opus-tools 0.1.8). The kid3-cli.exe Windows executable works identically (and works perfectly with Opus files too).

Apologies for the long post but hope it helps somebody.
Go to the top of the page
+Quote Post
marc2003
post Nov 12 2014, 23:16
Post #11





Group: Members
Posts: 4761
Joined: 27-January 05
From: England
Member No.: 19379



^it's cool that you've posted a cross-platform solution but seeing as you mentioned mp3tag, it is worth noting it has options to batch embed art for a whole collection at once. another windows option is to use foobar2000. if embedded art exists in the source file, it can be transferred during conversion into any of the formats that it can tag.

This post has been edited by marc2003: Nov 12 2014, 23:17
Go to the top of the page
+Quote Post
lothario15
post Nov 17 2014, 00:35
Post #12





Group: Members
Posts: 7
Joined: 3-November 14
Member No.: 117719



QUOTE (marc2003 @ Nov 12 2014, 23:16) *
^it's cool that you've posted a cross-platform solution but seeing as you mentioned mp3tag, it is worth noting it has options to batch embed art for a whole collection at once. another windows option is to use foobar2000. if embedded art exists in the source file, it can be transferred during conversion into any of the formats that it can tag.


Yeah, I used the Puddletag/MP3Tag 'Import cover' action to batch import cover art to my existing files but my problem was with new additions to my music library.

I'm regularly discovering new music but I'm old-school - I need to own it rather than merely stream it. It quickly becomes tiresome ripping to FLAC, then manually clicking around in GUI to transcode using two different Ogg settings, then resizing the transferred cover art (I use high quality jpeg/png images in my archival FLAC library which can sometimes be 5MB or more; I resize them to 600px to save space on my mobile device), then clicking around to batch import the resized images, then finally deleting those images. That's why it had to be a command-line solution.

I now have a transcode script which uses metaflac to extract the high-quality cover art from the FLAC files,
CODE
metaflac  --export-picture-to=COVERFILE.jpg

resizes the extracted art to a 600px jpeg at 85% quality with imagemagick's mogrify command,
CODE
mogrify -resize 600x600 -quality 85 "$COVERFILE.jpg"

transcodes the FLAC files to two Ogg settings with oggenc,
CODE
oggenc -q5.5 --ignorelength -o "${FLACFILE%.flac}.ogg" "$FLACFILE"

imports the resized cover art with kid3,
CODE
kid3-cli -c "select all" -c 'set picture:"/path/to/COVERFILE.jpg" ""' "/path/to/*.ogg"

and deletes the jpegs.
CODE
rm -f *.jpg


This workflow saves me time; hope it helps someone.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th November 2014 - 01:16