Hello,
I would like to mix different audio sources coming from internet (from different Icecast server). But, I would like the mix continue even if a stream doesn't exist anymore (so the pipeline doesn't return an error and exit). What is the best practice to achieve that ? Thanx. ++ Jack _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le jeu. 11 avr. 2019 05 h 10, Jack <[hidden email]> a écrit : Hello, The audiomixer element can do that. You have to configure a latency (see property of the same name, in nanosecond). This latency will allow a bit of delay between streams. If a stream goes missing, the timeout will be reached, and only available streams will be mixed. If they are all gone, silent buffers will be produced. If you have a mean to detect idle stream, be aware that performance is slightly improved if you remove the requested pad, as it may no longer have to wait for the timeout to mix. Thanx. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thanks Nicolas for the different hints with audiomixer, but what will
happen (for the pipeline) if the source of the stream doesn't exist or the URI is wrong. For exemple if I open the URI with URIdecodebin ? Will Gtreamer return an error and exit ? I need your enlightment here. ++ Jack Le 11/04/2019 à 14:57, Nicolas Dufresne a écrit : > > > Le jeu. 11 avr. 2019 05 h 10, Jack <[hidden email] > <mailto:[hidden email]>> a écrit : > > Hello, > > I would like to mix different audio sources coming from internet (from > different Icecast server). But, I would like the mix continue even if a > stream doesn't exist anymore (so the pipeline doesn't return an error > and exit). > What is the best practice to achieve that ? > > > The audiomixer element can do that. You have to configure a latency (see > property of the same name, in nanosecond). This latency will allow a bit > of delay between streams. If a stream goes missing, the timeout will be > reached, and only available streams will be mixed. If they are all gone, > silent buffers will be produced. If you have a mean to detect idle > stream, be aware that performance is slightly improved if you remove the > requested pad, as it may no longer have to wait for the timeout to mix. > > Thanx. > ++ > > Jack > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > <mailto:[hidden email]> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > > _______________________________________________ > 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 |
Le jeudi 11 avril 2019 à 16:46 +0200, Jack a écrit :
> Thanks Nicolas for the different hints with audiomixer, but what will > happen (for the pipeline) if the source of the stream doesn't exist or > the URI is wrong. For exemple if I open the URI with URIdecodebin ? Will > Gtreamer return an error and exit ? > I need your enlightment here. URIDecodebin (or internal elements) will post an error message to the application and no pad will be added. Your app would have to handle that and cleanup the broken element from the pipeline, even though your pipeline will keep working (unless you kill the pipeline on error like gst-launch do). The audiomixer will only start producing when first pad is activated and have data though. The timeout base feature will only be activated if one of the source is actually detected to be live. So be careful if you wanted to use an URI to some HTTP files, as it might not be live and might not do what you want. You need at least one live source to trigger the timeout based feature. > ++ > > Jack > > > > Le 11/04/2019 à 14:57, Nicolas Dufresne a écrit : > > > > Le jeu. 11 avr. 2019 05 h 10, Jack <[hidden email] > > <mailto:[hidden email]>> a écrit : > > > > Hello, > > > > I would like to mix different audio sources coming from internet (from > > different Icecast server). But, I would like the mix continue even if a > > stream doesn't exist anymore (so the pipeline doesn't return an error > > and exit). > > What is the best practice to achieve that ? > > > > > > The audiomixer element can do that. You have to configure a latency (see > > property of the same name, in nanosecond). This latency will allow a bit > > of delay between streams. If a stream goes missing, the timeout will be > > reached, and only available streams will be mixed. If they are all gone, > > silent buffers will be produced. If you have a mean to detect idle > > stream, be aware that performance is slightly improved if you remove the > > requested pad, as it may no longer have to wait for the timeout to mix. > > > > Thanx. > > ++ > > > > Jack > > > > _______________________________________________ > > gstreamer-devel mailing list > > [hidden email] > > <mailto:[hidden email]> > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > > > > > _______________________________________________ > > 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 _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (201 bytes) Download Attachment |
Ok, thank you Nicolas for your enlightment and your warning about the
timeout and the live source. ++ Jack Le 11/04/2019 à 17:40, Nicolas Dufresne a écrit : > Le jeudi 11 avril 2019 à 16:46 +0200, Jack a écrit : >> Thanks Nicolas for the different hints with audiomixer, but what will >> happen (for the pipeline) if the source of the stream doesn't exist or >> the URI is wrong. For exemple if I open the URI with URIdecodebin ? Will >> Gtreamer return an error and exit ? >> I need your enlightment here. > > URIDecodebin (or internal elements) will post an error message to the > application and no pad will be added. Your app would have to handle > that and cleanup the broken element from the pipeline, even though your > pipeline will keep working (unless you kill the pipeline on error like > gst-launch do). The audiomixer will only start producing when first pad > is activated and have data though. The timeout base feature will only > be activated if one of the source is actually detected to be live. So > be careful if you wanted to use an URI to some HTTP files, as it might > not be live and might not do what you want. You need at least one live > source to trigger the timeout based feature. > >> ++ >> >> Jack >> >> >> >> Le 11/04/2019 à 14:57, Nicolas Dufresne a écrit : >>> >>> Le jeu. 11 avr. 2019 05 h 10, Jack <[hidden email] >>> <mailto:[hidden email]>> a écrit : >>> >>> Hello, >>> >>> I would like to mix different audio sources coming from internet (from >>> different Icecast server). But, I would like the mix continue even if a >>> stream doesn't exist anymore (so the pipeline doesn't return an error >>> and exit). >>> What is the best practice to achieve that ? >>> >>> >>> The audiomixer element can do that. You have to configure a latency (see >>> property of the same name, in nanosecond). This latency will allow a bit >>> of delay between streams. If a stream goes missing, the timeout will be >>> reached, and only available streams will be mixed. If they are all gone, >>> silent buffers will be produced. If you have a mean to detect idle >>> stream, be aware that performance is slightly improved if you remove the >>> requested pad, as it may no longer have to wait for the timeout to mix. >>> >>> Thanx. >>> ++ >>> >>> Jack >>> >>> _______________________________________________ >>> gstreamer-devel mailing list >>> [hidden email] >>> <mailto:[hidden email]> >>> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel >>> >>> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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 signature.asc (499 bytes) Download Attachment |
Free forum by Nabble | Edit this page |