Streaming Picture in Picture H264 video from Raspberry Pi

Shantanu Gore gore.shantanu at gmail.com
Fri Mar 20 13:17:52 PDT 2015


Hi JM,

Thanks a lot for your response! I indeed did not realize what videomixer
was actually doing, and it makes sense now why it wasn't working. My end
goal is to display video from all the cameras in a single window (either
through gstreamer or VLC). Would mpegts be able to do something like that?

I have actually experimented before with mpegtsmux and VLC, but I found
that it is _extremely_ laggy (about 1 minute latency), and sometimes just
stops working altogether. Here is the command I am using - I wasn't able to
figure out how to completely remove videomixer from the equation:

gst-launch-1.0 videomixer sink_0::ypos=300 sink_2::xpos=300  name=mixer !
videoconvert ! x264enc tune=zerolatency ! mpegtsmux ! chopmydata
max-size=9000 ! udpsink host=192.168.2.7 port=1234 v4l2src
device=/dev/video0 ! video/x-h264,width=640,height=480,framerate=30/1 !
h264parse ! decodebin ! mixer. v4l2src device=/dev/video1 !
video/x-h264,width=800,height=600,framerate=30/1 ! h264parse ! decodebin !
mixer.

Shantanu

On Fri, Mar 20, 2015 at 3:50 PM, Jean-Michel Hautbois <jhautbois at gmail.com>
wrote:

> Hi Shantanu,
>
> 2015-03-20 19:18 GMT+01:00 Shantanu Gore <gore.shantanu at gmail.com>:
>
>> Hi guys,
>>
>> I would like to stream multiple H264 (from Logitech C920s) streams from a
>> Raspberry Pi to a Windows computer using GStreamer. So far, I have been
>> able to stream a single video stream, using the following commands:
>>
>> Raspberry Pi Side:
>> gst-launch-1.0 v4l2src device=/dev/video0 !
>> video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! rtph264pay
>> pt=127 config-interval=4 ! udpsink host=192.168.2.7
>>
>> Windows Side:
>> C:\gstreamer\1.0\x86_64\bin>gst-launch-1.0 udpsrc ! application/x-rtp,
>> payload=1
>> 27 ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false
>> text-overlay=false
>>
>> However, when I try to stream using a videomixer, it seems that the
>> Raspberry Pi is processing the video somehow (perhaps due to my use of the
>> videoconvert command), and thus I get extremely slow video and gstreamer
>> complains that my computer (the Pi) isn't fast enough.
>>
>
> If I understand correctly what you want to achieve, I think you are
> misunderstanding what videomixer is doing.
> It will mix uncompressed streams. So, from the pipeline you showed, you
> will have v4l2src -> decoding -> videomixer -> encoding -> stream.
> And the RPi is clearly not able to do that.
>
> You want to have multiple streams in one so, mpegts is one of your answers.
> And you will have one channel per h264 stream. I think it is doable with
> the RPi.
>
> Regards,
> JM
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>


-- 
Thanks,

Shantanu Gore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150320/a9a62973/attachment.html>


More information about the gstreamer-devel mailing list