Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   oggenc question (http://www.linux-archive.org/debian-user/646176-oggenc-question.html)

cletusjenkins 03-19-2012 01:40 AM

oggenc question
 
Sorry for this not truly being a debian question, but after googling and duckduckgoing I didn't find a good solution and thought I would ask here. I'm trying to embed an image in my existing sound (ogg vorbis) files.

I did find a script that makes it a little easier, but no info on how to encode the image file in the right format.

In case anyone wants the script here it is (oggart):

Thanks.

#!/bin/sh
# how to run: oggart /path/to/music_file.ogg /path/to/image_file
# add an -e to end of command line to use easytag's older way to embed

FILE1="`basename "$1"`"
EXT1=${FILE1##*.}
EXTTYPE1=`echo $EXT1 | tr '[:upper:]' '[:lower:]'`

FILE2="`basename "$2"`"
EXT2=${FILE2##*.}
EXTTYPE2=`echo $EXT2 | tr '[:upper:]' '[:lower:]'`

OGG=""
if [ "$EXTTYPE1" = ogg ]; then
OGG="$1"
elif [ "$EXTTYPE2" = ogg ]; then
OGG="$2"
fi
if [ "$OGG" = "" ]; then
echo no ogg file selected
exit 0
fi

PIC=""
array=(jpeg jpg png)
for item in ${array[*]}
do
if [ "$item" = "$EXTTYPE1" ]; then
PIC="$1"
elif [ "$item" = "$EXTTYPE2" ]; then
PIC="$2"
fi
done
if [ "$PIC" = "" ]; then
echo no jpg or png file selected
exit 0
fi

if [ "$3" = -e ]; then
EASYTAG=Y
else
EASYTAG=N
fi

DESC=`basename "$PIC"`
APIC=`base64 --wrap=0 "$PIC"`
if [ "`which exiv2`" != "" ]; then
MIME=`exiv2 "$PIC" | grep 'MIME type ' | sed 's/: /|/' | cut -f 2 -d '|' | tail -n 1`
fi
if [ "$MIME" = "" ]; then
MIME="image/jpeg"
fi

vorbiscomment -l "$OGG" | grep -v '^COVERART=' | grep -v '^COVERARTDESCRIPTION=' | grep -v '^COVERARTMIME=' | grep -v 'METADATA_BLOCK_PICTURE=' > "$OGG".tags

if [ "$EASYTAG" = N ]; then
echo METADATA_BLOCK_PICTURE="$APIC" > "$OGG".tags2
else
echo COVERART="$APIC" > "$OGG".tags2
fi
vorbiscomment -w -R -c "$OGG".tags2 "$OGG"
vorbiscomment -a -R -t COVERARTDESCRIPTION="$DESC" "$OGG"
vorbiscomment -a -R -t COVERARTMIME="$MIME" "$OGG"
vorbiscomment -a -R -c "$OGG".tags "$OGG"

rm -f "$OGG".tags
rm -f "$OGG".tags2



-- clet
debian is my main squeeze



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 13628d89f83.-7717398486233116943.7449711853116396441@zoho.com"> http://lists.debian.org/13628d89f83.-7717398486233116943.7449711853116396441@zoho.com

Camaleón 03-19-2012 01:07 PM

oggenc question
 
On Sun, 18 Mar 2012 19:40:46 -0700, cletusjenkins wrote:

> Sorry for this not truly being a debian question,

No problem, just tag the "Subject" accordingly >:-)

> but after googling and duckduckgoing I didn't find a good solution and
> thought I would ask here. I'm trying to embed an image in my existing
> sound (ogg vorbis) files.
>
> I did find a script that makes it a little easier, but no info on how to
> encode the image file in the right format.
>
> In case anyone wants the script here it is (oggart):

(...)

So is that you're basically having problems with this:

http://superuser.com/questions/169151/embed-album-art-in-ogg-through-command-line-in-linux

Okay, and how are you calling the script and what's the output error you are
getting?

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: jk7ejh$6c2$12@dough.gmane.org">http://lists.debian.org/jk7ejh$6c2$12@dough.gmane.org


All times are GMT. The time now is 08:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.