..and this script in /home/james/.mediatomb/flac2mp3 (but it can go anywhere so long as the "agent" tag above refers to the correct location).
To save anyone else the hassle I've find-and-replaced all the html characters back to how they should be.
This is untested. I'll post again if it works.
<transcodingenabled="yes"><mimetype-profile-mappings><transcodemimetype="audio/x-flac"using="hqmp3"/></mimetype-profile-mappings><profiles><profilename="hqmp3"enabled="yes"type="external"><mimetype>audio/mpeg</mimetype><accept-url>no</accept-url><use-chunked-encoding>no</use-chunked-encoding><first-resource>yes</first-resource><accept-ogg-theora>no</accept-ogg-theora><agentcommand="/home/james/.mediatomb/flac2mp3"arguments="%in %out"/><buffersize="800000"chunk-size="100000"fill-size="100000"/></profile></transcoding>
..and this script in /home/james/.mediatomb/flac2mp3 (but it can go anywhere so long as the "agent" tag above refers to the correct location).
#!/bin/bash
flac -d -c "$1" | lame --id3v1-only -t --preset fast extreme - - > "$2"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Transcoding from flac to mp3 on a sheevaplug was a terrible idea.
The first reply to this post is awesome - plays flac files on my android phone (that struggles with flac) as pcm with Bubble Upnp. Now I can listen at full quality via fubar 2000 and on my phone, which is why I've just spent about twelve hours trawling through different dodgy transcoding setups.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can anybody tell me how to setup the config.xml to transcode flac to mp3?
I have the following in the transcoding section of my config.xml
<transcoding enabled="yes">
<mimetype-profile-mappings>
<transcode mimetype="audio/x-flac" using="hqmp3"/>
</mimetype-profile-mappings>
<profiles>
<profile name="hqmp3" enabled="yes" type="external">
<mimetype>audio/mpeg</mimetype>
<accept-url>no</accept-url>
<use-chunked-encoding>no</use-chunked-encoding>
<first-resource>yes</first-resource>
<accept-ogg-theora>no</accept-ogg-theora>
<agent command="/home/james/.mediatomb/flac2mp3" arguments="%in %out"/>
<buffer size="800000" chunk-size="100000" fill-size="100000"/>
</profile>
</transcoding>
..and this script in /home/james/.mediatomb/flac2mp3 (but it can go anywhere so long as the "agent" tag above refers to the correct location).
#!/bin/bash
flac -d -c "$1" | lame -id3v1-only -t -preset fast extreme - - > "$2"
You'll need flac and lame installed on your system.
Hope this helps
James.
To save anyone else the hassle I've find-and-replaced all the html characters back to how they should be.
This is untested. I'll post again if it works.
It works for me, but apparently the buffer, chunk and fill need tweeking for my sheevaplug so that it can keep up.
Or swap to a less extreme encoding preset >.<
Oh, and ONE MORE THING. There is a tag missing: </profiles>
Transcoding from flac to mp3 on a sheevaplug was a terrible idea.
The first reply to this post is awesome - plays flac files on my android phone (that struggles with flac) as pcm with Bubble Upnp. Now I can listen at full quality via fubar 2000 and on my phone, which is why I've just spent about twelve hours trawling through different dodgy transcoding setups.