Video sent with RTP only when closing a pipeline

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

Video sent with RTP only when closing a pipeline

Monyz Wacon
Hello,
I'm trying to send video data from Raspberry Pi 2 to PC. This method works ok:

PC:

gst-launch-1.0 udpsrc port=7000 ! application/x-rtp,payload=96 ! rtph264depay ! decodebin ! xvimagesink

Raspberry Pi:

gst-launch-1.0 videotestsrc ! x264enc ! rtph264pay ! udpsink host=192.168.0.5 port=7000

A window appears on PC with a test stream.

Then I am trying to send video from the camera connected to RPi (this should work, because it works with raspivid tool and I loaded the module bcm2835-v4l2):

gst-launch-1.0 -e -v v4l2src device=/dev/video0 ! 'video/x-h264,width=320,height=200,framerate=30/1' ! h264parse ! rtph264pay ! udpsink host=192.168.0.5 port=7000

The thing is that something seems to be stuck. I can see that the camera turns on, this is printed on RPi's console:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ width\=\(int\)320\,\ height\=\(int\)200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ width\=\(int\)320\,\ height\=\(int\)200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ width\=\(int\)320\,\ height\=\(int\)200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ width\=\(int\)320\,\ height\=\(int\)200\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"

But there is no video on the PC side, nothing seems to be received. However when I close the pipeline by ctrl-c on RPi's side, then new caps are negotiated, some data is sent to PC and a single image from the camera is displayed.

How to make the pipeline on RPi to stream video right after it is created, not just send some data right before it is being closed?

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

Re: Video sent with RTP only when closing a pipeline

Sebastian Dröge-3
On Mo, 2016-02-29 at 21:37 +0000, Monyz Wacon wrote:

> Hello,
> I'm trying to send video data from Raspberry Pi 2 to PC.
> [...]
> Then I am trying to send video from the camera connected to RPi (this
> should work, because it works with raspivid tool and I loaded the
> module bcm2835-v4l2):
>
> gst-launch-1.0 -e -v v4l2src device=/dev/video0 ! 'video/x-
> h264,width=320,height=200,framerate=30/1' ! h264parse ! rtph264pay !
> udpsink host=192.168.0.5 port=7000
>
> The thing is that something seems to be stuck. I can see that the
> camera turns on, this is printed on RPi's console:
> [...]
> But there is no video on the PC side, nothing seems to be received.
> However when I close the pipeline by ctrl-c on RPi's side, then new
> caps are negotiated, some data is sent to PC and a single image from
> the camera is displayed.
>
> How to make the pipeline on RPi to stream video right after it is
> created, not just send some data right before it is being closed?
Can you file a bug about this at

  https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer

and include a debug log with GST_DEBUG=6 from the sender there? This
shouldn't happen and the pipeline itself looks correct.

Does it work better if you don't specify a width/height/framerate in
the caps?

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


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

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Video sent with RTP only when closing a pipeline

Monyz Wacon
Hello,
today I built gstreamer + plugins from the source, version 1.7.90 and everything started to work (the same pipeline, no changes).

Previously I installed gstreamer on Raspbian using apt-get and official repositories, it seems that there is version 1.4.4-2 of gstreamer:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 8.0 (jessie)
Release:        8.0
Codename:       jessie

$ sudo apt-get -s install "gstreamer1.0*"
[...]
Inst libgstreamer1.0-0 (1.4.4-2 Raspbian:stable [armhf])
[...]

Well, problem solved.

On Tue, Mar 1, 2016 at 7:23 AM, Sebastian Dröge <[hidden email]> wrote:
On Mo, 2016-02-29 at 21:37 +0000, Monyz Wacon wrote:
> Hello,
> I'm trying to send video data from Raspberry Pi 2 to PC.
> [...]
> Then I am trying to send video from the camera connected to RPi (this
> should work, because it works with raspivid tool and I loaded the
> module bcm2835-v4l2):
>
> gst-launch-1.0 -e -v v4l2src device=/dev/video0 ! 'video/x-
> h264,width=320,height=200,framerate=30/1' ! h264parse ! rtph264pay !
> udpsink host=192.168.0.5 port=7000
>
> The thing is that something seems to be stuck. I can see that the
> camera turns on, this is printed on RPi's console:
> [...]
> But there is no video on the PC side, nothing seems to be received.
> However when I close the pipeline by ctrl-c on RPi's side, then new
> caps are negotiated, some data is sent to PC and a single image from
> the camera is displayed.
>
> How to make the pipeline on RPi to stream video right after it is
> created, not just send some data right before it is being closed?

Can you file a bug about this at

  https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer

and include a debug log with GST_DEBUG=6 from the sender there? This
shouldn't happen and the pipeline itself looks correct.

Does it work better if you don't specify a width/height/framerate in
the caps?

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
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