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 [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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.mp3Hope 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 [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
I tired the suggestion, but it still didn't work. Same error :-(
$ gst-launch-1.0 souphttpsrc location=<livestream url> ! decodebin ! audioconvert ! tee name=t ! queue ! playsink t. ! queue ! 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 ... -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |