Can't get transcode Flac to MP3 to work
Posted: Mon Feb 22, 2010 9:49 am
Hi All.
Ubuntu 9.10, TMS 5.1.13 (and 12 and 11). Trying to on the fly transcode FLAC to MP3 to my Sony Bravia. Pounded away at this for 2 nights now. All the FLAC files show up in the Sony menu as MP3's. When i pick on them, I get "cannot play file." and occasionally reboots my TV.
I've created my own flac-mp3.desc.... it is....
# transcode audio (flac to wav)
#(c) 2010 by PacketVideo
#exec: ffmpeg -i $infile $outfile
exec: flac2mp3 $infile $outfile
# capabilities
from=audio/x-flac
to=audio/mpeg
and my own flac2mp3..... it is....
#!/bin/bash
#/usr/bin/flac --silent --decode "$1" | lame -b 192 "$2"
/usr/bin/ffmpeg -i "$1" "$2"
flac2mp3 works from the command prompt.
As you can see with the comments out I've tried a couple things. Here is the the portion of the log file when I try and play a FLAC file........
23:13:53:246 HTTP entering receive module
23:13:53:247 LOG_SYSTEM:upnp_start_thread with ID 0xF6AAAB70
23:13:53:247 LOG_SYSTEM:upnp_init_thread with name HTTP_receive
23:13:53:248 LOG_HTTP:HTTP_send_receive HEAD /cgi-bin/Xflac-mp3.desc/DLNA-PNMP3-OP00-CI1-FLAGS01700000/music/O0$1$7I4044/42.mp3 HTTP/1.1
getcontentFeatures.dlna.org: 1
transferMode.dlna.org: Streaming
X-AV-Physical-Unit-Info: pa="BRAVIA KDL-40W5100";
X-AV-Client-Info: av=5.0; cn="Sony Corporation"; mn="BRAVIA KDL-40W5100"; mv="1.7";
Host: 192.168.1.20:9000
23:13:53:248 http_cgi_handler - requested url /cgi-bin/Xflac-mp3.desc/DLNA-PNMP3-OP00-CI1-FLAGS01700000/music/O0$1$7I4044/42.mp3
23:13:53:248 IsTranscoded - file /var/twonkymedia/db/cache/0ahome2fhans2fMusic2f42.flac(0x0).mp3 will be transcoded now
23:13:53:249 LOG_PLUGIN:system_call_waiting strProg /usr/local/twonkymedia/cgi-bin/
23:13:53:249 LOG_PLUGIN:system_call_waiting strParam flac2mp3
23:13:53:249 LOG_PLUGIN:system_call_waiting waitpid 10467...
23:13:53:254 LOG_PLUGIN:system_call_waiting waitpid 10467 done
23:13:53:254 LOG_HTTP:HTTP_send_header HTTP/1.1 404 Not Found
Content-Type: text/html; charset=utf-8
Content-Length: 132
Date: Mon, 22 Feb 2010 07:13:53 GMT
Pragma: no-cache
Cache-control: no-cache
Accept-Ranges: bytes
Connection: keep-alive
contentFeatures.dlna.org: DLNA.ORG_PN=MP3;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000
transferMode.dlna.org: Streaming
EXT:
Server: Linux/2.x.x, UPnP/1.0, pvConnect UPnP SDK/1.0
I can see that it is calling my flac2mp3 script, but it's doesn't look like it's passing $infile and $outfile to the script, so it just stops.
I've added .location files for ffmpeg, lame, mplayer, and flac (I've tried many many things to get this to work), and have tried both symlinks and copying the binaries inthe cgi-bin directory.
So, what am I missing, and why isn't it working?? Thanks
H
Ubuntu 9.10, TMS 5.1.13 (and 12 and 11). Trying to on the fly transcode FLAC to MP3 to my Sony Bravia. Pounded away at this for 2 nights now. All the FLAC files show up in the Sony menu as MP3's. When i pick on them, I get "cannot play file." and occasionally reboots my TV.
I've created my own flac-mp3.desc.... it is....
# transcode audio (flac to wav)
#(c) 2010 by PacketVideo
#exec: ffmpeg -i $infile $outfile
exec: flac2mp3 $infile $outfile
# capabilities
from=audio/x-flac
to=audio/mpeg
and my own flac2mp3..... it is....
#!/bin/bash
#/usr/bin/flac --silent --decode "$1" | lame -b 192 "$2"
/usr/bin/ffmpeg -i "$1" "$2"
flac2mp3 works from the command prompt.
As you can see with the comments out I've tried a couple things. Here is the the portion of the log file when I try and play a FLAC file........
23:13:53:246 HTTP entering receive module
23:13:53:247 LOG_SYSTEM:upnp_start_thread with ID 0xF6AAAB70
23:13:53:247 LOG_SYSTEM:upnp_init_thread with name HTTP_receive
23:13:53:248 LOG_HTTP:HTTP_send_receive HEAD /cgi-bin/Xflac-mp3.desc/DLNA-PNMP3-OP00-CI1-FLAGS01700000/music/O0$1$7I4044/42.mp3 HTTP/1.1
getcontentFeatures.dlna.org: 1
transferMode.dlna.org: Streaming
X-AV-Physical-Unit-Info: pa="BRAVIA KDL-40W5100";
X-AV-Client-Info: av=5.0; cn="Sony Corporation"; mn="BRAVIA KDL-40W5100"; mv="1.7";
Host: 192.168.1.20:9000
23:13:53:248 http_cgi_handler - requested url /cgi-bin/Xflac-mp3.desc/DLNA-PNMP3-OP00-CI1-FLAGS01700000/music/O0$1$7I4044/42.mp3
23:13:53:248 IsTranscoded - file /var/twonkymedia/db/cache/0ahome2fhans2fMusic2f42.flac(0x0).mp3 will be transcoded now
23:13:53:249 LOG_PLUGIN:system_call_waiting strProg /usr/local/twonkymedia/cgi-bin/
23:13:53:249 LOG_PLUGIN:system_call_waiting strParam flac2mp3
23:13:53:249 LOG_PLUGIN:system_call_waiting waitpid 10467...
23:13:53:254 LOG_PLUGIN:system_call_waiting waitpid 10467 done
23:13:53:254 LOG_HTTP:HTTP_send_header HTTP/1.1 404 Not Found
Content-Type: text/html; charset=utf-8
Content-Length: 132
Date: Mon, 22 Feb 2010 07:13:53 GMT
Pragma: no-cache
Cache-control: no-cache
Accept-Ranges: bytes
Connection: keep-alive
contentFeatures.dlna.org: DLNA.ORG_PN=MP3;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=01700000000000000000000000000000
transferMode.dlna.org: Streaming
EXT:
Server: Linux/2.x.x, UPnP/1.0, pvConnect UPnP SDK/1.0
I can see that it is calling my flac2mp3 script, but it's doesn't look like it's passing $infile and $outfile to the script, so it just stops.
I've added .location files for ffmpeg, lame, mplayer, and flac (I've tried many many things to get this to work), and have tried both symlinks and copying the binaries inthe cgi-bin directory.
So, what am I missing, and why isn't it working?? Thanks
H