struggling with shmsink/src and mpeg-4

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

struggling with shmsink/src and mpeg-4

Hoel Vasseur
Hi everybody,

I am trying to redirect the sink of a pipeline to another one. I saw that intervideosink/src can be used to do that, but I am using videos with different encoding (RAW, J2K, MEPG-4). So now I am struggling with using shmsik/src. It works fine with RAW and J2K but not with MPEG-4 videos.  I think the problem is on caps transmission. In the first pipeline I am receiving the stream from updsrc, and write the data into a socket. In the second pipeline I am reading into the same socket, but it seems that gstreamer isn't able to payload the stream read from the socket to rtp packet.

After several days of struggling, I am still failing to use shmsink/src with MPEG-4 videos. Does any one have an idea about how to do that?

Sincerly,

Hoël
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: struggling with shmsink/src and mpeg-4

Tim Müller
On Mon, 2016-04-04 at 11:09 +0200, Hoel Vasseur wrote:

Hi Hoel,

> I am trying to redirect the sink of a pipeline to another one. I saw
> that intervideosink/src can be used to do that, but I am using videos
> with different encoding (RAW, J2K, MEPG-4). So now I am struggling
> with using shmsik/src. It works fine with RAW and J2K but not with
> MPEG-4 videos.  I think the problem is on caps transmission. In the
> first pipeline I am receiving the stream from updsrc, and write the
> data into a socket. In the second pipeline I am reading into the same
> socket, but it seems that gstreamer isn't able to payload the stream
> read from the socket to rtp packet.

Not sure what your setup/pipeline looks like exactly, could you
elaborate?

> After several days of struggling, I am still failing to use
> shmsink/src with MPEG-4 videos. Does any one have an idea about how
> to do that?

For MPEG-4 video, you may need to copy over the caps somehow from the
sink to the src, the decoder may need the 'codec_data' field from the
caps to initialise itself.

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com


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

Re: struggling with shmsink/src and mpeg-4

Mailing List SVR
In reply to this post by Hoel Vasseur
Hi,

if both the pipelines are in the same process you can also try
appsink/src, using push-sample caps are automatically managed for you:

https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-appsrc.html#gst-app-src-push-sample

Nicola

Il 04/04/2016 11:09, Hoel Vasseur ha scritto:

> Hi everybody,
>
> I am trying to redirect the sink of a pipeline to another one. I saw that intervideosink/src can be used to do that, but I am using videos with different encoding (RAW, J2K, MEPG-4). So now I am struggling with using shmsik/src. It works fine with RAW and J2K but not with MPEG-4 videos.  I think the problem is on caps transmission. In the first pipeline I am receiving the stream from updsrc, and write the data into a socket. In the second pipeline I am reading into the same socket, but it seems that gstreamer isn't able to payload the stream read from the socket to rtp packet.
>
> After several days of struggling, I am still failing to use shmsink/src with MPEG-4 videos. Does any one have an idea about how to do that?
>
> Sincerly,
>
> Hoël
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: struggling with shmsink/src and mpeg-4

Nicolas Dufresne-4
In reply to this post by Hoel Vasseur
Le lundi 04 avril 2016 à 11:09 +0200, Hoel Vasseur a écrit :
> After several days of struggling, I am still failing to use
> shmsink/src with MPEG-4 videos. Does any one have an idea about how
> to do that?

You should probably payload your data before passing it through a
shmsrc/shmsink. The CAPS are not passed through this mechanism. For
MPEG-4 data, you can use rtpmp4vpay/rtpmp4vdepay.

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
|

Re: struggling with shmsink/src and mpeg-4

Hoel Vasseur
Hi,

And thanks for your reply. Actually the whole point is to depay before passing data through shmsink, and payload after getting them from shmsrc :(
However, based on the response of "Tim Müller" <[hidden email]> I used push-sample from appsink/src and it seems to work just fine.

I finally succeed to make it work on command line with MPEG-4 encoding, by passing caps by hand, but I found the appsink/src solution way more suitable.

Anyway, thanks for your advises,

Hoël

----- Mail original -----
> De: "Nicolas Dufresne" <[hidden email]>
> À: "gstreamer-devel" <[hidden email]>
> Envoyé: Lundi 4 Avril 2016 14:50:30
> Objet: Re: struggling with shmsink/src and mpeg-4

> Le lundi 04 avril 2016 à 11:09 +0200, Hoel Vasseur a écrit :
>> After several days of struggling, I am still failing to use
>> shmsink/src with MPEG-4 videos. Does any one have an idea about how
>> to do that?
>
> You should probably payload your data before passing it through a
> shmsrc/shmsink. The CAPS are not passed through this mechanism. For
> MPEG-4 data, you can use rtpmp4vpay/rtpmp4vdepay.
>
> Nicolas
> _______________________________________________
> 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