Re: [gstreamer-java] Help to create pipeline with gst1-java-core

345 views
Skip to first unread message

Neil C Smith

unread,
Jan 8, 2016, 12:32:20 PM1/8/16
to gstream...@googlegroups.com
Hi Guillaume,

On 8 January 2016 at 12:04, Guillaume Navel <gna...@sstinformatique.fr> wrote:
> I tray to transpose a pipeline gstreamer to show the stream with a java application. The pipeline is :
> gst-launch-1.0 -v rtspsrc location=rtsp://192.168.1.8:8554/sst name=demux latency=0 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)101" ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink \
> demux. ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)102" ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink
>
> Do you think that it's possible to use this pipeline with your project gst1-java-core ? Can you help me with this ?

Thanks for forwarding this question to the list - I'll update the
readme on the project to point people here.

What happens if you pass that launch string into Pipeline.launch(...)?
You may have to escape some elements of it.

Or do you want to display the output within Java-based sinks instead
of xvimagesink?

Best wishes,

Neil



--
Neil C Smith
Artist : Technologist : Adviser
http://neilcsmith.net

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org
Digital Prisoners - interactive spaces and projections -
www.digitalprisoners.co.uk

Guillaume Navel

unread,
Jan 11, 2016, 3:36:53 AM1/11/16
to gstreamer-java
Hi Neil,

Thank you for your reply.

Yes I want to show each video channel in Java instead of xvimagesink.

I found a way to do it. It's not optimized but it works.
First I execute a demux pipeline :
Bin.launch("rtspsrc location=" + adresse + " name=demux latency=0 ! application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)100 ! rtph264depay ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=224.1.1.2 port=5000 "
+ " demux. ! application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)101 ! rtph264depay ! h264parse ! rtph264pay config-interval=10 pt=96 ! udpsink host=224.1.1.2 port=5002", false);

And then I creates pipelines to show each stream in a separate video component :
Bin.launch("udpsrc address=224.1.1.2 port=" + port + " ! application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96 ! rtph264depay ! avdec_h264 ! videoconvert", true);

Do you think there is a better way to do it ?

Regards
Guillaume

Neil C Smith

unread,
Jan 11, 2016, 5:01:55 AM1/11/16
to gstream...@googlegroups.com
Better way to do what? Not the easiest thing to work out what you're
trying to do from the pipelines you've posted!

I'm assuming you don't necessarily want to do the udpsink -> udpsrc
loopback? Or is that testing something?

If not, I'd try going back to the pipeline from your original email,
possibly using Pipeline.launch( .. ). Try removing the two
xvimagesinks and naming the two videoconverts. Then you should be
able to call getElementByName() on both the videoconverts and link
them to your Java sinks. Hopefully that'll work. Ignore anything
that returns a list of elements - those methods are currently broken.
Reply all
Reply to author
Forward
0 new messages