Register
It is currently Mon Oct 20, 2014 11:58 am

ffmpeg ogg to mp3 tags


All times are UTC - 6 hours


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 PostPosted: Sun Sep 12, 2010 8:49 pm   

Joined: Sun Sep 12, 2010 8:25 pm
Posts: 3
Conversion ogg to mp3 and attaching tags.
Quotation is driving me crazy :B
Any help more than welcome
Code:
d="1 - Requiem & Kyrie  Introitus.ogg"
e="1 - Requiem & Kyrie  Introitus.mp3"
tag='-metadata    TITLE="Requiem & Kyrie"   -metadata    ARTIST="Hector Berlioz"   -metadata    TRACKTOTAL="8"   -metadata    ALBUM="Grande Messe des Morts"'


FIRST OPTION
Code:
ffmpeg -i "$d" -threads 4 -acodec libmp3lame  "$tag"  -ab 192k  "$e"

Error
Unrecognized option 'metadata TITLE="Requiem & Kyrie" -metadata ARTIST="Hector Berlioz" -metadata TRACKTOTAL="8" -metadata ALBUM="Grande Messe des Morts"'

bash -x
ffmpeg -i '1 - Requiem & Kyrie: Introitus.ogg' -threads 4 -acodec libmp3lame '"-metadata' 'TITLE="Requiem' '&' 'Kyrie"' -metadata 'ARTIST="Hector' 'Berlioz"' -metadata 'TRACKTOTAL="8"' -metadata 'ALBUM="Grande' Messe des 'Morts""' -ab 192k ' ' '1 - Requiem & Kyrie: Introitus.mp3'

SECOND OPTION
No quotes in $tag
Code:
ffmpeg -i "$d" -threads 4 -acodec libmp3lame  $tag  -ab 192k  "$e"

Error
Unable to find a suitable output format for '&'

bash -x
ffmpeg -i '1 - Requiem & Kyrie: Introitus.ogg' -threads 4 -acodec libmp3lame -metadata 'TITLE="Requiem' '&' 'Kyrie"' -metadata 'ARTIST="Hector' 'Berlioz"' -metadata 'TRACKTOTAL="8"' -metadata 'ALBUM="Grande' Messe des 'Morts"' -ab 192k ' ' '1 - Requiem & Kyrie: Introitus.mp3'


Top
 Profile  
 PostPosted: Sun Sep 12, 2010 10:31 pm   
User avatar

Joined: Sun Jun 27, 2010 12:57 am
Posts: 192
Please try this:
Code:
tag="-metadata    TITLE='Requiem & Kyrie'   -metadata    ARTIST='Hector Berlioz'   -metadata    TRACKTOTAL='8'   -metadata    ALBUM='Grande Messe des Morts'"

And no quotes when you pass it to ffmpeg.


Top
 Profile  
 PostPosted: Sun Sep 12, 2010 10:57 pm   

Joined: Sun Sep 12, 2010 8:25 pm
Posts: 3
Thanks for the replay.
Unfortunately, I cannot change manually from the imbedded single quote to the double quotation on $tag (this is the output of other function). Is there any way to change from single to double quotation without affect the rest of the string?
Thanks


Top
 Profile  
 PostPosted: Thu Sep 16, 2010 9:34 am   

Joined: Sun Sep 12, 2010 8:25 pm
Posts: 3
this work for me
Code:
d="1 - Requiem & Kyrie  Introitus.ogg"
e="1 - Requiem & Kyrie  Introitus.mp3"
tag='-metadata    TITLE="Requiem & Kyrie"   -metadata    ARTIST="Hector Berlioz"   -metadata    TRACKTOTAL="8"   -metadata    ALBUM="Grande Messe des Morts"
echo "  -i \"$d\" -threads 4 -acodec libmp3lame "$tag"  -ab 192k  \"$e\" " | xarg ffmpeg
'


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: uhelp and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP