Unable to play and record Internet stream at the same time

Michael MacIntosh mmacintosh at linear-systems.com
Thu Sep 27 23:11:52 UTC 2018


You could try adding a queue to each of your branches, since the 
lamemp3enc might have a very small buffer, (or playbin), you will need 
to have a small amount so it can play and record at the same time.  By 
default gstreamer will try to synchronize all sinks such that they 
"play" the same sample at the same time.

So you could try something like this (bolded the added queues for clarity):

$ gst-launch-1.0 souphttpsrc location=<livestream url> ! decodebin !
audioconvert ! tee name=t*! queue*  ! playsink t.*! queue*  ! lamemp3enc ! id3v2mux ! filesink
location=test.mp3

Hope that helps!


On 9/26/2018 8:15 AM, ben_whiteus wrote:
> I was able to play and record Internet stream using gstreamer when I was
> using Ubuntu 16.04. However, after upgrading to 18.04, I can no longer do
> that. The command I used and the corresponding error message are as follows:
>
> $ gst-launch-1.0 souphttpsrc location=<livestream url> ! decodebin !
> audioconvert ! tee name=t ! playsink t. ! lamemp3enc ! id3v2mux ! filesink
> location=test.mp3
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> Got context from element 'souphttpsrc0': gst.soup.session=context,
> session=(SoupSession)NULL, force=(boolean)false;
> Redistribute latency...
> Redistribute latency...
> ^Chandling interrupt.
> Interrupt: Stopping pipeline ...
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
> I did try playing alone:
>
> $ gst-launch-1.0 souphttpsrc location=<livestream url> ! decodebin !
> audioconvert !  playsink
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> Got context from element 'souphttpsrc0': gst.soup.session=context,
> session=(SoupSession)NULL, force=(boolean)false;
> Redistribute latency...
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstPulseSinkClock
> ^Chandling interrupt.
> Interrupt: Stopping pipeline ...
> Execution ended after 0:00:17.987984164
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
> and recording alone:
>
> $ gst-launch-1.0 souphttpsrc location=<livestream url> ! decodebin !
> audioconvert ! lamemp3enc ! id3v2mux ! filesink location=test.mp3
> Pipeline is PREROLLING ...
> Got context from element 'souphttpsrc0': gst.soup.session=context,
> session=(SoupSession)NULL, force=(boolean)false;
> Redistribute latency...
> Pipeline is PREROLLED ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> ^Chandling interrupt.
> Interrupt: Stopping pipeline ...
> Execution ended after 0:00:16.354333158
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
> and both works fine.
>
> Any idea how I can resolve the issue?
>
> Thanks
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180927/83ed2497/attachment.html>


More information about the gstreamer-devel mailing list