Hello,
I'm trying to use gst_buffer_get_video_caption_meta () and/or gst_buffer_set_video_caption_meta (...) on a buffer in python, but I get error "AttributeError: 'Buffer' object has no attribute 'get_video_caption_meta' " info/context: -Ubuntu 18.04 -Gstreamer 1.16.0 (from source) with base, good, ugly, bad, gst-python plugins -pipeline is: videotestsrc is-live=1 ! identity ! x264enc ! mp4mux ! filesink location="file.mp4" In identity 'handoff' handler i'm trying to get_video_caption_meta () for example but get an error. Is it still not supported in python or do I have some python binding issue? Any help would be appreciated. Thanks. -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hello,
gst_buffer_get_video_caption_meta() is implemented as a function macro, and as such is not introspectable. You should be able to use the standard GstMeta API to access the caption meta however. There is no gst_buffer_set_video_caption_meta() API, you should however be able to use GstVideo.buffer_add_video_caption_meta(). On 5/2/19 5:40 PM, KPAXIT wrote: > Hello, > > I'm trying to use gst_buffer_get_video_caption_meta () and/or > gst_buffer_set_video_caption_meta (...) on a buffer in python, but I get > error "AttributeError: 'Buffer' object has no attribute > 'get_video_caption_meta' > " > info/context: > -Ubuntu 18.04 > -Gstreamer 1.16.0 (from source) with base, good, ugly, bad, gst-python > plugins > -pipeline is: videotestsrc is-live=1 ! identity ! x264enc ! mp4mux ! > filesink location="file.mp4" > > In identity 'handoff' handler i'm trying to get_video_caption_meta () for > example but get an error. > > Is it still not supported in python or do I have some python binding issue? > > Any help would be appreciated. > Thanks. > > > > -- > Sent from: http://gstreamer-devel.966125.n4.nabble.com/ > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel -- Mathieu Duponchelle ยท https://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by KPAXIT
Thank you for your answer.
I'm able to put VideoCaptionMeta on copied buffer, like this word = ("example text ") data = word.encode('utf-8') meta = GstVideo.buffer_add_video_caption_meta(buff_copy,GstVideo.VideoCaptionType.CEA708_RAW, data) but I'm still having hard time to get/read GstVideo.VideoCaptionMeta from a buffer later on, eg buff_copy.get_meta(GObject.GType('GstVideoCaptionMetaAPI')) returns Gst.Meta which contains no data!? Sorry for my newbie question :/ A main goal is to experiment and see if its possible to inject closed captions in h264 encoded stream somehow (currently we injecting CC's at streaming server side and we would like to inject CC's directly when original stream gets encoded) PS I'm also tried sending buffers with cc to appsrc and connect it to ccextractor cccombiner etc but I also don't see any 'caption' pad get linked and/or used meanwhile recorded file in VLC showing that there are cc tracks available but none of text is visible. Can appsrc be used with CC meta on buffers somehow? Thanks. -- 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 |