Udpsrc gives me trouble - streaming from a GoPro

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

Udpsrc gives me trouble - streaming from a GoPro

fredrik falkman
Hej!

I'm trying to set up the following:

I have a GoPro Session 5 which streams from udp://10.5.5.9:8554
I have a raspberry pi 3 that is connected to the GoPro's wifi hotspot
I'd like to stream from the GoPro via the rpi over 4g to a Gstreamer viewer
(in this case QGroundControl) on another computer with a static ip.

I can get this working by means of this tool:
https://github.com/KonradIT/gopro-py-api

and this command:

ffmpeg -f mpegts -i udp://10.5.5.9:8554 -map 0:0 -c copy -f rtp
udp://94.234.203.109:5000

Now I'd like to se if I can get better performance using Gstreamer.

I'm trying the following:

#!/bin/bash

gst-launch-1.0 -v \
rtpbin name=rtpbin \
udpsrc uri=udp://10.5.5.9:8554 \
! queue \
! avenc_h264_omx bitrate=500000 \
! "video/x-h264,profile=high" \
! h264parse \
! queue max-size-bytes=10000000 \
! rtph264pay pt=96 config-interval=1 \
! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 \
! udpsink port=5000 host=94.234.203.109 ts-offset=0 name=vrtpsink
rtpbin.send_rtcp_src_0 \
! rtpbin.recv_rtcp_sink_0


And get this error:

Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Could not
get/set settings from/on resource.
Additional debug info:
gstudpsrc.c(1548): gst_udpsrc_open ():
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
bind failed: Error binding to address: Cannot assign requested address
Setting pipeline to NULL ...
Freeing pipeline ...


Can someone spare me som knowledge? Thanks!



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

Re: Udpsrc gives me trouble - streaming from a GoPro

Yasushi SHOJI-2
Hi,

On Wed, Nov 1, 2017 at 9:44 PM, fredrik falkman <[hidden email]> wrote:

> Hej!
>
> I'm trying to set up the following:
>
> I have a GoPro Session 5 which streams from udp://10.5.5.9:8554
> I have a raspberry pi 3 that is connected to the GoPro's wifi hotspot
> I'd like to stream from the GoPro via the rpi over 4g to a Gstreamer viewer
> (in this case QGroundControl) on another computer with a static ip.
>
> I can get this working by means of this tool:
> https://github.com/KonradIT/gopro-py-api
>
> and this command:
>
> ffmpeg -f mpegts -i udp://10.5.5.9:8554 -map 0:0 -c copy -f rtp
> udp://94.234.203.109:5000
>
> Now I'd like to se if I can get better performance using Gstreamer.
>
> I'm trying the following:
>
> #!/bin/bash
>
> gst-launch-1.0 -v \
> rtpbin name=rtpbin \
> udpsrc uri=udp://10.5.5.9:8554 \

I don't have GoPro Session 5 so it might be wrong but
isn't 10.5.5.9 GoPro's address?

you should give the port number you want to receive the
packets.

> ! queue \
> ! avenc_h264_omx bitrate=500000 \
> ! "video/x-h264,profile=high" \
> ! h264parse \
> ! queue max-size-bytes=10000000 \
> ! rtph264pay pt=96 config-interval=1 \
> ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 \
> ! udpsink port=5000 host=94.234.203.109 ts-offset=0 name=vrtpsink
> rtpbin.send_rtcp_src_0 \
> ! rtpbin.recv_rtcp_sink_0
>
>
> And get this error:
>
> Setting pipeline to PAUSED ...
> ERROR: Pipeline doesn't want to pause.
> ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Could not
> get/set settings from/on resource.
> Additional debug info:
> gstudpsrc.c(1548): gst_udpsrc_open ():
> /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
> bind failed: Error binding to address: Cannot assign requested address

That's why GStreamer is complaining: you can't bind the address
you are not using.
--
             yashi
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Udpsrc gives me trouble - streaming from a GoPro

fredrik falkman
Yes, it’s the GoPro’s adress and the way I understand how the FFmpeg pipeline works is that the

mpegts -i <a href="udp://10.5.5.9:8554" class="">udp://10.5.5.9:8554

opens a revere udp connection from the GoPro. I almost suspected that that wasn’t the way Gstreamer’s udpsrc works. But what Gstreamer command should I use to get the stream from that remote URI?

Thanks!


Fredrik Falkman       


On 7 Nov 2017, at 13:22, Yasushi SHOJI <[hidden email]> wrote:

Hi,

On Wed, Nov 1, 2017 at 9:44 PM, fredrik falkman <[hidden email]> wrote:
Hej!

I'm trying to set up the following:

I have a GoPro Session 5 which streams from <a href="udp://10.5.5.9:8554" class="">udp://10.5.5.9:8554
I have a raspberry pi 3 that is connected to the GoPro's wifi hotspot
I'd like to stream from the GoPro via the rpi over 4g to a Gstreamer viewer
(in this case QGroundControl) on another computer with a static ip.

I can get this working by means of this tool:
https://github.com/KonradIT/gopro-py-api

and this command:

ffmpeg -f mpegts -i udp://10.5.5.9:8554 -map 0:0 -c copy -f rtp
udp://94.234.203.109:5000

Now I'd like to se if I can get better performance using Gstreamer.

I'm trying the following:

#!/bin/bash

gst-launch-1.0 -v \
rtpbin name=rtpbin \
udpsrc uri=udp://10.5.5.9:8554 \

I don't have GoPro Session 5 so it might be wrong but
isn't 10.5.5.9 GoPro's address?

you should give the port number you want to receive the
packets.

! queue \
! avenc_h264_omx bitrate=500000 \
! "video/x-h264,profile=high" \
! h264parse \
! queue max-size-bytes=10000000 \
! rtph264pay pt=96 config-interval=1 \
! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 \
! udpsink port=5000 host=94.234.203.109 ts-offset=0 name=vrtpsink
rtpbin.send_rtcp_src_0 \
! rtpbin.recv_rtcp_sink_0


And get this error:

Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Could not
get/set settings from/on resource.
Additional debug info:
gstudpsrc.c(1548): gst_udpsrc_open ():
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
bind failed: Error binding to address: Cannot assign requested address

That's why GStreamer is complaining: you can't bind the address
you are not using.
--
            yashi
_______________________________________________
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: Udpsrc gives me trouble - streaming from a GoPro

Edward Hervey-4
Hi,

  A simple way to check whether you're actually receiving data is:

  gst-launch-1.0 -v udp://10.5.5.9:8554 ! fakesink silent=False

  If you see plenty of messages like this, you *are* receiving data:

  /GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message =
chain   ******* ...

  If so, try to gradually reconstruct your pipeline:
  udp://... ! fakesink
  udp://... ! rtph264depay ! fakesink
  etc...

  Also note that using GST_DEBUG=2 gst-launch-1.0 ... might provide
more insight as to why it doesn't work.

   Edward

On Tue, 2017-11-07 at 20:40 +0100, Fredrik Falkman wrote:

> Yes, it’s the GoPro’s adress and the way I understand how the FFmpeg
> pipeline works is that the
>
> > > mpegts -i udp://10.5.5.9:8554
>
> opens a revere udp connection from the GoPro. I almost suspected that
> that wasn’t the way Gstreamer’s udpsrc works. But what Gstreamer
> command should I use to get the stream from that remote URI?
>
> Thanks!
>
>
> Fredrik Falkman    
>
>
> > On 7 Nov 2017, at 13:22, Yasushi SHOJI <[hidden email]>
> > wrote:
> >
> > Hi,
> >
> > On Wed, Nov 1, 2017 at 9:44 PM, fredrik falkman <[hidden email]> wrote:
> > > Hej!
> > >
> > > I'm trying to set up the following:
> > >
> > > I have a GoPro Session 5 which streams from udp://10.5.5.9:8554
> > > I have a raspberry pi 3 that is connected to the GoPro's wifi
> > > hotspot
> > > I'd like to stream from the GoPro via the rpi over 4g to a
> > > Gstreamer viewer
> > > (in this case QGroundControl) on another computer with a static
> > > ip.
> > >
> > > I can get this working by means of this tool:
> > > https://github.com/KonradIT/gopro-py-api
> > >
> > > and this command:
> > >
> > > ffmpeg -f mpegts -i udp://10.5.5.9:8554 -map 0:0 -c copy -f rtp
> > > udp://94.234.203.109:5000
> > >
> > > Now I'd like to se if I can get better performance using
> > > Gstreamer.
> > >
> > > I'm trying the following:
> > >
> > > #!/bin/bash
> > >
> > > gst-launch-1.0 -v \
> > > rtpbin name=rtpbin \
> > > udpsrc uri=udp://10.5.5.9:8554 \
> >
> > I don't have GoPro Session 5 so it might be wrong but
> > isn't 10.5.5.9 GoPro's address?
> >
> > you should give the port number you want to receive the
> > packets.
> >
> > > ! queue \
> > > ! avenc_h264_omx bitrate=500000 \
> > > ! "video/x-h264,profile=high" \
> > > ! h264parse \
> > > ! queue max-size-bytes=10000000 \
> > > ! rtph264pay pt=96 config-interval=1 \
> > > ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 \
> > > ! udpsink port=5000 host=94.234.203.109 ts-offset=0 name=vrtpsink
> > > rtpbin.send_rtcp_src_0 \
> > > ! rtpbin.recv_rtcp_sink_0
> > >
> > >
> > > And get this error:
> > >
> > > Setting pipeline to PAUSED ...
> > > ERROR: Pipeline doesn't want to pause.
> > > ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
> > > Could not
> > > get/set settings from/on resource.
> > > Additional debug info:
> > > gstudpsrc.c(1548): gst_udpsrc_open ():
> > > /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
> > > bind failed: Error binding to address: Cannot assign requested
> > > address
> >
> > That's why GStreamer is complaining: you can't bind the address
> > you are not using.
> > --
> >             yashi
> > _______________________________________________
> > 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
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (849 bytes) Download Attachment