View Single Post
Old 04-17-2020, 01:17 PM   #45
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 911
Karma: 3000002
Join Date: Jun 2010
Device: K3W, PW4
SUCCESS!

Thinking further I realized that the mixer would need to support a range of options for input or they would not have specified one in the caps for it. What was preventing operation was the lack of several other options. So tried again with the appropriate options for the track I was testing with and it worked. Here is the log of the run:

Code:
[root@kindle mplayer]# /usr/bin/gst-launch -v filesrc location=./audiodump.pcm ! 'audio/x-raw-int,endianness=(int)1234,signed=(boole
an)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 ...
/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
New clock: GstSystemClock
/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
Got EOS from element "pipeline0".
Execution ended after 207406500025 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 mplayer]#
So using mplayer with -vc null -vo null -ao pcm:nowaveheader -format s16le produces a compatible output in "audiodump.pcm" in the current directory. This can be played providing the rate and number of channels are known to fill out the gst-launch command line.

I would like to figure out a way to pipe this to the gst-launch command and have the rate and number of channels deduced from the source. On my k3 I was playing both local mp3 files and internet radio streams, but that won't work without manual intervention at this point.

What would probably be workable is to pipe the mplayer output, with the WAVE header, to a program that would use the header to construct the gst pipeline and pipe the rest of the stream to it for playback. This is beyond my current experience level.

Can someone take this further?

Dave

Last edited by dhdurgee; 04-17-2020 at 01:19 PM. Reason: typo
dhdurgee is offline   Reply With Quote