Modifying playbin pipeline

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Modifying playbin pipeline

psiva87
Hi,
I want to modify the video pipeline of playbin for my requirement say optimize Video decoder -> Video sink path instead of having multiple video processing elements in between. In that case, is there any way I can do it? I know we can modify the playbin to use specific video/audio sinks, but that doesn't solve this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Modifying playbin pipeline

Arun Raghavan-4
On Wed, 24 May 2017, at 08:25 PM, psiva87 wrote:
> Hi,
> I want to modify the video pipeline of playbin for my requirement say
> optimize Video decoder -> Video sink path instead of having multiple
> video
> processing elements in between. In that case, is there any way I can do
> it?
> I know we can modify the playbin to use specific video/audio sinks, but
> that
> doesn't solve this?

Do you have a specific case where you see a suboptimal pipeline setup?

-- Arun
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Modifying playbin pipeline

psiva87
Yes, we have dmabuf enabled only for this path. Otherwise there will
be more buffer copies as playbin involves many elements in video
pipeline like videoconvert, videoscale etc.,

On Wed, May 31, 2017 at 7:46 AM, Arun Raghavan-4 [via GStreamer-devel]
<[hidden email]> wrote:

> On Wed, 24 May 2017, at 08:25 PM, psiva87 wrote:
>> Hi,
>> I want to modify the video pipeline of playbin for my requirement say
>> optimize Video decoder -> Video sink path instead of having multiple
>> video
>> processing elements in between. In that case, is there any way I can do
>> it?
>> I know we can modify the playbin to use specific video/audio sinks, but
>> that
>> doesn't solve this?
>
> Do you have a specific case where you see a suboptimal pipeline setup?
>
> -- Arun
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://gstreamer-devel.966125.n4.nabble.com/Modifying-playbin-pipeline-tp4683089p4683158.html
> To unsubscribe from Modifying playbin pipeline, click here.
> NAML
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Modifying playbin pipeline

psiva87
In reply to this post by Arun Raghavan-4
Yes, we have dmabuf enabled only for this path. Otherwise there will
be more buffer copies as playbin involves many elements in video
pipeline like videoconvert, videoscale etc.,

On Wed, May 31, 2017 at 7:51 AM, Arun Raghavan <[hidden email]> wrote:

> On Wed, 24 May 2017, at 08:25 PM, psiva87 wrote:
>> Hi,
>> I want to modify the video pipeline of playbin for my requirement say
>> optimize Video decoder -> Video sink path instead of having multiple
>> video
>> processing elements in between. In that case, is there any way I can do
>> it?
>> I know we can modify the playbin to use specific video/audio sinks, but
>> that
>> doesn't solve this?
>
> Do you have a specific case where you see a suboptimal pipeline setup?
>
> -- Arun
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Modifying playbin pipeline

Nicolas Dufresne-5
In reply to this post by psiva87
Le jeudi 01 juin 2017 à 06:57 -0700, psiva87 a écrit :

> Yes, we have dmabuf enabled only for this path. Otherwise there will 
> be more buffer copies as playbin involves many elements in video 
> pipeline like videoconvert, videoscale etc., 
>
> On Wed, May 31, 2017 at 7:46 AM, Arun Raghavan-4 [via GStreamer-devel] 
> <[hidden email]> wrote:
>
> > On Wed, 24 May 2017, at 08:25 PM, psiva87 wrote: 
> >> Hi, 
> >> I want to modify the video pipeline of playbin for my requirement say 
> >> optimize Video decoder -> Video sink path instead of having multiple 
> >> video 
> >> processing elements in between. In that case, is there any way I can do 
> >> it? 
> >> I know we can modify the playbin to use specific video/audio sinks, but 
> >> that 
> >> doesn't solve this? 
> > 
> > Do you have a specific case where you see a suboptimal pipeline setup? 
> > 
To avoid the extra filters, you could tweak playbin flags,
"(0x00000040): native-video" is often use for that.

Now, if you need to enabled let's say dmabuf on your V4L2 decoder, as
is it right now, you'll need to watch some signals on playbin (e.g.
element-setup) and enable it. You could also setup a sink that bundle
everything (note this is not yet supported by playbin3).

This is something I have used in the past for some players on Exynos.

  playbin video-sink="v4l2video0dec capture-io-mode=dmabuf ! v4l2video5convert output-io-mode=dmabuf-import capture-io-mode=dmabuf ! waylandsink"

In the longer term, dmabuf export/import should just work, but this is
not as trivial as it looks like. Also, playbin should be able to auto-
plug hardware scaler/converters (often combined). If you do have the
time, improving GStreamer toward this goal would be more then welcome.

Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Modifying playbin pipeline

psiva87
I set the playbin flags property to "native-video" and extra filters are removed now. But still video decoder and video sink are not directly connected, the pipeline is

vdec -> input-selector -> tee -> streamsychronizer -> queue -> vsink

Does these elements between vdec and vsink involve buffer copies? I don't see much difference in %CPU load when compared with vdec -> vsink dmabuf path pipeline.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Modifying playbin pipeline

psiva87
As another approach, implemented videosinkbin which decode & display using DMAbuf path and set it to playbin video-sink so that optimised path is used by playbin. videosinkbin is bin of vdec and vsink elements using DMAbuf path. Now getting the below error though h264parse and videosinkbin capabilities match.

$ gst-launch-1.0 playbin uri=<URL> flags=video+audio+native-video video-sink=videosinkbin
..
0:00:01.265970412 30077 0xf61a36f0 DEBUG                playbin gstplaybin2.c:4603:autoplug_select_cb:<playbin0> checking factory v4l2video1dec
0:00:01.270736932 30077 0xf61a36f0 DEBUG                playbin gstplaybin2.c:4743:autoplug_select_cb:<playbin0> v4l2video1dec not compatible with the fixed sink
0:00:01.271121203 30077 0xf61a36f0 DEBUG                playbin gstplaybin2.c:4601:autoplug_select_cb:<playbin0> select group 0x20425f8 for '':decodepad1, video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)3, profile=(string)main, width=(int)640, height=(int)480, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true
0:00:01.271392922 30077 0xf61a36f0 DEBUG                playbin gstplaybin2.c:4603:autoplug_select_cb:<playbin0> checking factory avdec_h264
0:00:01.276036993 30077 0xf61a36f0 DEBUG                playbin gstplaybin2.c:4743:autoplug_select_cb:<playbin0> avdec_h264 not compatible with the fixed sink
Missing element: H.264 (Main Profile) decoder
WARNING: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0: No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)main, codec_data=(buffer)014d401effe10014274d401ea9181407b600d418041adb0ad7bdf01001000428de09c8, width=(int)640, height=(int)480, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true'.
Additional debug info:
../../../gst-plugins-base-1.10.4/gst/playback/gsturidecodebin.c(938): unknown_type_cb (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Modifying playbin pipeline

psiva87
Above issue is because gst_caps_is_subset returns false for the below compatibility check between capsfilter:src and video sink. Is this caps
"video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, level=(string)3, profile=(string)main, width=(int)640, height=(int)480, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, parsed=(boolean)true"

not a subset of
"video/x-h264, width=(int)[ 64, 1920 ], height=(int)[ 64, 1088 ], framerate=(fraction)[ 0/1, 2147483647/1 ], stream-format=(string)byte-stream, alignment=(string)au, colorimetry=(string){ bt601, smpte240m, bt709, 2:4:5:2, 2:4:5:3, 1:4:7:1, 2:4:7:1, 2:4:12:8, 2:6:5:7, 2:0:0:0 }, parsed=(boolean)true, level=(string)3, profile=(string)main, pixel-aspect-ratio=(fraction)1/1" ? If yes, then why?
Loading...