Hi Developers,
I have developed own text overlay element to match my embedded system. And also due to some reason (S/W and H/W architecture), I can not insert the ffmpegcolorspace (pre-colorspace) after my video decoder element. And I found that the gstreamer native subtitleoverlay bin is hard coded to use gstreamer native text overlay element and insert pre-colorspace converter. And playsink bin in playbin2 is also hard coded to use gstreamer native subtitleoverlay bin. So I WANT TO KNOW whether it is possible to override the gstreamer native subtitleoverlay bin in playbin2 with my own developed subtitleoverlay bin which can use my own textoverlay element. best regards BCXA _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hello,
On T, 2011-10-04 at 10:38 +0800, bcxa sz wrote: > Hi Developers, > > I have developed own text overlay element to match my embedded system. > And also due to some reason (S/W and H/W architecture), I can not > insert the ffmpegcolorspace (pre-colorspace) after my video decoder > element. > > And I found that the gstreamer native subtitleoverlay bin is hard > coded to use gstreamer native text overlay element and insert > pre-colorspace converter. And playsink bin in playbin2 is also hard > coded to use gstreamer native subtitleoverlay bin. > > So I WANT TO KNOW whether it is possible to override the gstreamer > native subtitleoverlay bin in playbin2 with my own developed > subtitleoverlay bin which can use my own textoverlay element. You could try setting the playbin2 text-sink property to your custom subtitling element. The native-video flag on playbin2 (flags property) can be used to signal it that the video is assumed to be in the native format, and therefore no colorspace converter is to be plugged after the video decoder or elsewhere. This would also prevent the builtin textoverlay to be used, as it includes colorspace converting elements. We have some vague plans to redesign subtitle handling to be more efficient and more fitting, including being more straightforward to handle for such use cases as yours. The discussions for more concrete plans are yet to take place as far as I know, but hey, maybe this is a start :) So writing down your experiences with all this with your use case and hardware requirements in mind might be quite useful here. Best, Mart Raudsepp _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by bcxa sz
BCXA,
Playbin is an autoplugger that just creates valid pipelines intelligently for you. With your requirement you have outgrown those training wheels. If you construct the pipeline yourself you will be able to replace the subtitling with your own.
One way to do this is to have a good map of your existing pipeline. I find the script below priceless in exploring Gstreamer capabilities because it will graphically what sort of fancy pipeline playbin and other smart elements like autosink do. Then you can reconstruct the 90% you like manually, and plug in your replacements.
Mike Mitchell
#!/bin/bash export GST_DEBUG_DUMP_DOT_DIR=$PWD/gstdot rm $GST_DEBUG_DUMP_DOT_DIR/*.dot $GST_DEBUG_DUMP_DOT_DIR/*.png # INSERT YOUR gst-launch HERE
# Debug Code shows result file and graphic of pipeline. echo "Press ENTER to continue ..." read WAIT for f in $GST_DEBUG_DUMP_DOT_DIR/* ;
do dot -T png $f >$f.png; done eog $GST_DEBUG_DUMP_DOT_DIR/*.png exit _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On 10/05/2011 10:58 AM, Mike Mitchell wrote:
> #!/bin/bash > export GST_DEBUG_DUMP_DOT_DIR=$PWD/gstdot > rm $GST_DEBUG_DUMP_DOT_DIR/*.dot $GST_DEBUG_DUMP_DOT_DIR/*.png > > # INSERT YOUR gst-launch HERE > > # Debug Code shows result file and graphic of pipeline. > echo "Press ENTER to continue ..." > read WAIT > > for f in $GST_DEBUG_DUMP_DOT_DIR/* ; > do > dot -T png $f >$f.png; > done > eog $GST_DEBUG_DUMP_DOT_DIR/*.png > exit This is great btw as I find myself in need of this very thing and hadn't gotten around to seeing what playbin2 did that I wasn't doing in my pipe. So thanks! -- Nathanael d. Noblet t 403.875.4613 _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Mart Raudsepp
On Wed, Oct 5, 2011 at 10:26 AM, Mart Raudsepp <[hidden email]> wrote:
> Hello, > > On T, 2011-10-04 at 10:38 +0800, bcxa sz wrote: >> Hi Developers, >> >> I have developed own text overlay element to match my embedded system. >> And also due to some reason (S/W and H/W architecture), I can not >> insert the ffmpegcolorspace (pre-colorspace) after my video decoder >> element. >> >> And I found that the gstreamer native subtitleoverlay bin is hard >> coded to use gstreamer native text overlay element and insert >> pre-colorspace converter. And playsink bin in playbin2 is also hard >> coded to use gstreamer native subtitleoverlay bin. >> >> So I WANT TO KNOW whether it is possible to override the gstreamer >> native subtitleoverlay bin in playbin2 with my own developed >> subtitleoverlay bin which can use my own textoverlay element. > > You could try setting the playbin2 text-sink property to your custom > subtitling element. > not have subtitle rendering because the text-sink will not have video width and height information since video decoder is in another video chain. Current my workaround is to force video decoder element to set 'text-sink' element property (or send event) to let overlay element know the video information. Quite ugly way but for me no other choice. > The native-video flag on playbin2 (flags property) can be used to signal > it that the video is assumed to be in the native format, and therefore > no colorspace converter is to be plugged after the video decoder or > elsewhere. This would also prevent the builtin textoverlay to be used, > as it includes colorspace converting elements. > Use native-video flag, the subtitle will not work as you said. This is not what I expected. > > We have some vague plans to redesign subtitle handling to be more > efficient and more fitting, including being more straightforward to > handle for such use cases as yours. The discussions for more concrete > plans are yet to take place as far as I know, but hey, maybe this is a > start :) > So writing down your experiences with all this with your use case and > hardware requirements in mind might be quite useful here. > > > Best, > Mart Raudsepp > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Mike Mitchell
On Thu, Oct 6, 2011 at 12:58 AM, Mike Mitchell
<[hidden email]> wrote: > BCXA, > Playbin is an autoplugger that just creates valid pipelines intelligently > for you. With your requirement you have outgrown those training wheels. If > you construct the pipeline yourself you will be able to replace the > subtitling with your own. > One way to do this is to have a good map of your existing pipeline. I find > the script below priceless in exploring Gstreamer capabilities because it > will graphically what sort of fancy pipeline playbin and other smart > elements like autosink do. Then you can reconstruct the 90% you like > manually, and plug in your replacements. > Yes. But playbin2 is so popular and avoid customer to study how to construct the pipeline and just use standard gstreamer component to achieve the target. That's why we preferred to use playbin2. > Mike Mitchell > > #!/bin/bash > export GST_DEBUG_DUMP_DOT_DIR=$PWD/gstdot > rm $GST_DEBUG_DUMP_DOT_DIR/*.dot $GST_DEBUG_DUMP_DOT_DIR/*.png > # INSERT YOUR gst-launch HERE > # Debug Code shows result file and graphic of pipeline. > echo "Press ENTER to continue ..." > read WAIT > for f in $GST_DEBUG_DUMP_DOT_DIR/* ; > do > dot -T png $f >$f.png; > done > eog $GST_DEBUG_DUMP_DOT_DIR/*.png > exit > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Reply with new progress.
Finanally, I select to use playbin2 'text-sink' property to override the gstreamer suboverlay bin. And I let my video decoder element to send video width&height information to my own textoverlay element through customerized event (or set property) since video decoder element and textoverlay is not in the same chain now. On Fri, Oct 7, 2011 at 6:28 PM, bcxa sz <[hidden email]> wrote: > On Thu, Oct 6, 2011 at 12:58 AM, Mike Mitchell > <[hidden email]> wrote: >> BCXA, >> Playbin is an autoplugger that just creates valid pipelines intelligently >> for you. With your requirement you have outgrown those training wheels. If >> you construct the pipeline yourself you will be able to replace the >> subtitling with your own. >> One way to do this is to have a good map of your existing pipeline. I find >> the script below priceless in exploring Gstreamer capabilities because it >> will graphically what sort of fancy pipeline playbin and other smart >> elements like autosink do. Then you can reconstruct the 90% you like >> manually, and plug in your replacements. >> > > Yes. But playbin2 is so popular and avoid customer to study how to > construct the pipeline and just use standard gstreamer component to > achieve the target. That's why we preferred to use playbin2. > >> Mike Mitchell >> >> #!/bin/bash >> export GST_DEBUG_DUMP_DOT_DIR=$PWD/gstdot >> rm $GST_DEBUG_DUMP_DOT_DIR/*.dot $GST_DEBUG_DUMP_DOT_DIR/*.png >> # INSERT YOUR gst-launch HERE >> # Debug Code shows result file and graphic of pipeline. >> echo "Press ENTER to continue ..." >> read WAIT >> for f in $GST_DEBUG_DUMP_DOT_DIR/* ; >> do >> dot -T png $f >$f.png; >> done >> eog $GST_DEBUG_DUMP_DOT_DIR/*.png >> exit >> >> _______________________________________________ >> gstreamer-devel mailing list >> [hidden email] >> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel >> >> > gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |