I now have success playing an mp3 file using sox:
Code:
[root@kindle sox]# LD_LIBRARY_PATH=./lib ./sox /mnt/us/music/01-Diamond_Star.mp3 -t raw - | /usr/bin/gst-launch -v filesrc location=
/dev/stdin ! 'audio/x-raw-int,endianness=(int)1234,signed=(boolean)true,width=(int)16,depth=(int)16,rate=(int)44100,channels=(int)2'
! queue ! mixersink
Setting pipeline to PAUSED ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/MixerSink:mixersink0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)44100, channels=(int)2
./sox WARN sox: `-' output clipped 144 samples; decrease volume?
Got EOS from element "pipeline0".
Execution ended after 207323062025 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
/GstPipeline:pipeline0/MixerSink:mixersink0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = NULL
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = NULL
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL
Setting pipeline to NULL ...
Freeing pipeline ...
[root@kindle sox]#
So it is now possible to play mp3 files with a manually constructed command line. It should be possible to construct it programatically from the output of the soxi command:
Code:
root@kindle sox]# LD_LIBRARY_PATH=./lib ./soxi /mnt/us/music/01-Diamond_Star.mp3
Input File : '/mnt/us/music/01-Diamond_Star.mp3'
Channels : 2
Sample Rate : 44100
Precision : 16-bit
Duration : 00:03:26.92 = 9125172 samples = 15519 CDDA sectors
File Size : 4.98M
Bit Rate : 192k
Sample Encoding: MPEG audio (layer I, II or III)
Comments :
Title=Diamond Star
Artist=Point Valid with Catherine Asaro
Album=Diamond Star
Tracknumber=01/13
Year=2009
Genre=Alt. Rock
[root@kindle sox]#
My next task is to add a compatible wget and add streaming support to sox here. Once that is working it is time to automate it and then build a KUAL menu.
Dave