Send Motion-user mailing list submissions to
        motion-user@lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.sourceforge.net/lists/listinfo/motion-user
or, via email, send a message with subject or body 'help' to
        motion-user-requ...@lists.sourceforge.net

You can reach the person managing the list at
        motion-user-ow...@lists.sourceforge.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Motion-user digest..."


Today's Topics:

   1. Is there a simpler way than rtmp/rtsp? (Mark Raynsford)
   2. Re: Is there a simpler way than rtmp/rtsp? (Dave Howorth)
   3. Re: Is there a simpler way than rtmp/rtsp? (Mark Raynsford)


----------------------------------------------------------------------

Message: 1
Date: Sat, 15 Aug 2020 17:02:21 +0000
From: Mark Raynsford <list+net.sourceforge.mot...@io7m.com>
To: motion-user@lists.sourceforge.net
Subject: [Motion-user] Is there a simpler way than rtmp/rtsp?
Message-ID: <20200815170202.76134...@sunflower.int.arc7.info>
Content-Type: text/plain; charset="us-ascii"

Hello!

I'm able to grab an H.264 stream over SSH and publish it as a plain tcp
gstreamer sink using the following:

$ ssh camera0 read-video 25 1296 730 2000000 | gst-launch-1.0 \
  fdsrc \
  ! h264parse \
  ! rtph264pay config-interval=1 pt=96 \
  ! gdppay \
  ! tcpserversink host=127.0.0.1 port=8554

I can then view that stream (with any number of consumers
concurrently) with:

$ gst-launch-1.0 \
  tcpclientsrc host=127.0.0.1 port=8554 \
  ! gdpdepay \
  ! rtph264depay \
  ! avdec_h264 \
  ! autovideosink

Essentially, I'm parsing a raw H.264 stream from over ssh, wrapping it
in RTP packets, wrapping those packets in GStreamer's internal data
protocol (gdppay), and publishing it over TCP. The second command does
the inverse, piping the result to an X11 window.

This works fine, latency is acceptable (~150ms or so), and security is
good (it's just SSH!). The problem: This isn't something that motion can
understand. It seems that in order to have motion observe the stream, I
have to take the output of the first command and re-publish it to an
rtmp or rtsp server and then have motion consume the stream from that.
This is a little silly; I'll be reading a stream from localhost,
republishing that stream as UDP packets to another server on localhost,
and then having motion read UDP packets from that second server on
localhost.

Is there any way I can teach motion how to consume the stream without
requiring an intermediate rtsp server?

-- 
Mark Raynsford | https://www.io7m.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature

------------------------------

Message: 2
Date: Sat, 15 Aug 2020 19:32:27 +0100
From: Dave Howorth <d...@howorth.org.uk>
To: motion-user@lists.sourceforge.net
Subject: Re: [Motion-user] Is there a simpler way than rtmp/rtsp?
Message-ID: <20200815193227.2bb9a...@acer-suse.lan>
Content-Type: text/plain; charset=US-ASCII

On Sat, 15 Aug 2020 17:02:21 +0000
Mark Raynsford via Motion-user <motion-user@lists.sourceforge.net>
wrote:

> Hello!
> 
> I'm able to grab an H.264 stream over SSH and publish it as a plain
> tcp gstreamer sink using the following:
> 
> $ ssh camera0 read-video 25 1296 730 2000000 | gst-launch-1.0 \
>   fdsrc \
>   ! h264parse \
>   ! rtph264pay config-interval=1 pt=96 \
>   ! gdppay \
>   ! tcpserversink host=127.0.0.1 port=8554

You perhaps need to explain a bit more for people like me. What is
read-video as an ssh argument? I can't find it.

> I can then view that stream (with any number of consumers
> concurrently) with:
> 
> $ gst-launch-1.0 \
>   tcpclientsrc host=127.0.0.1 port=8554 \
>   ! gdpdepay \
>   ! rtph264depay \
>   ! avdec_h264 \
>   ! autovideosink
> 
> Essentially, I'm parsing a raw H.264 stream from over ssh, wrapping it
> in RTP packets, wrapping those packets in GStreamer's internal data
> protocol (gdppay), and publishing it over TCP. The second command does
> the inverse, piping the result to an X11 window.
> 
> This works fine, latency is acceptable (~150ms or so), and security is
> good (it's just SSH!). The problem: This isn't something that motion
> can understand. It seems that in order to have motion observe the
> stream, I have to take the output of the first command and re-publish
> it to an rtmp or rtsp server and then have motion consume the stream
> from that. This is a little silly; I'll be reading a stream from
> localhost, republishing that stream as UDP packets to another server
> on localhost, and then having motion read UDP packets from that
> second server on localhost.
> 
> Is there any way I can teach motion how to consume the stream without
> requiring an intermediate rtsp server?
> 




------------------------------

Message: 3
Date: Sat, 15 Aug 2020 18:55:02 +0000
From: Mark Raynsford <list+net.sourceforge.mot...@io7m.com>
To: Dave Howorth <d...@howorth.org.uk>
Cc: Motion discussion list <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] Is there a simpler way than rtmp/rtsp?
Message-ID: <20200815185502.3034b...@sunflower.int.arc7.info>
Content-Type: text/plain; charset="us-ascii"

'Ello!

On 2020-08-15T19:32:27 +0100
Dave Howorth <d...@howorth.org.uk> wrote:

> On Sat, 15 Aug 2020 17:02:21 +0000
> Mark Raynsford via Motion-user <motion-user@lists.sourceforge.net>
> wrote:
>
> > $ ssh camera0 read-video 25 1296 730 2000000 | gst-launch-1.0 \
> 
> You perhaps need to explain a bit more for people like me. What is
> read-video as an ssh argument? I can't find it.

Sorry, "read-video" is the name of an executable that's executed on the
remote host. In this case, it pulls H.264 video from an attached
device, at 25fps 1296x730 ~2mbit/s and writes the data to stdout.
That's obviously then piped into gst-launch-1.0 on my local machine.

-- 
Mark Raynsford | https://www.io7m.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature

------------------------------



------------------------------

Subject: Digest Footer

_______________________________________________
Motion-user mailing list
Motion-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/motion-user


------------------------------

End of Motion-user Digest, Vol 170, Issue 11
********************************************

Reply via email to