Streaming usb camera into browser

Sérgio Agostinho sergio.r.agostinho at gmail.com
Thu Mar 19 08:33:48 PDT 2015


Hey,

To be honest I don't really know what else can you do to get a more stable
framerate.

That being said, are you sure the issue is on the server side? Your
pipeline is not pointing to localhost so I'm assuming there's some
networking in between.

I would probably ensure that the camera is able to deliver those 30 frames
first, having the encoder / decoder in the loop.
gst-launch-1.0  v4l2src device=/dev/video0  !  "video/x-raw,
format=(string)I420, width=(int)640, height=(int)480,
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1,
interlace-mode=(string)progressive" !  vp8enc
error-resilient=true,cpu-used=5,deadline=1
! *vp8dec ! videoconvert ! fpsdisplaysink sync=false*

Then I would test a receiving pipeline on also on the server, so no
networking is involved
gst-launch-1.0  v4l2src device=/dev/video0  !  "video/x-raw,
format=(string)I420, width=(int)640, height=(int)480,
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1,
interlace-mode=(string)progressive" !  vp8enc
error-resilient=true,cpu-used=5,deadline=1
  ! rtpvp8pay ! udpsink host=*localhost* port=5004

gst-launch-1.0  udpsrc port=5004 caps=<proper caps here> ! rtpvp8depay !
vp8dec ! videoconvert ! fpsdisplaysink sync=false

Then I would move the receiving pipeline to the other pc on 192.168.6.127
and see if it could also render those stable 30 fps you want. If that is
the case, then things get into the WebRTC and Gstreamer's RTP <-> WebRTC
interface domains, and that my friend, I know nothing about :)

Good luck







2015-03-19 13:58 GMT+01:00 Who AmI <get2jils at gmail.com>:

> Hi Sergio,
>
> Thanks for the input. I have installed i m trying to stream the usb camera
> by using janus-gateway now [ WebRTC] , and
> i used the below pipeline:
>
> gst-launch-1.0  v4l2src device=/dev/video0  !  "video/x-raw,
> format=(string)I420, width=(int)640, height=(int)480,
> pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1,
> interlace-mode=(string)progressive" !  vp8enc
> error-resilient=true,cpu-used=5,deadline=1   ! rtpvp8pay ! udpsink
> host=192.168.6.127 port=5004
>
>
> The pipeline works well, but it i don't see the smooth video streaming, i
> m testing in the chrome browser,
>
> With the help of developers tool in the Chrome,  I have enabled "Show FPS
> Meter", where the value is shown something between: 10 to 24, keeps on
> varying.
>
>
> Kindly let know the possibilities that i can change at the server side
>
>
>
>
>
>
> On Wed, Mar 18, 2015 at 10:36 PM, Sérgio Agostinho <
> sergio.r.agostinho at gmail.com> wrote:
>
>> You're probably chocking your USB bus. Try the lowest resolution your
>> camera supports, just to be sure the bus can handle it. Then set deadline=1
>> and cpu-used=5 on vp8enc to reduce the encoding latency.
>>
>> To work around the USB bandwidth limitation try to grab jpeg frames from
>> your camera if it supports it.
>>
>> Cheers
>>
>> 2015-03-18 16:44 GMT+01:00 Who AmI <get2jils at gmail.com>:
>>
>>> Hi ,
>>>
>>> I am trying to stream usb camera into the browser,  To achieve this,  i
>>> have used the http-launch from  https://github.com/sdroege/http-launch
>>>
>>>
>>> The pipeline is:
>>>
>>>
>>> *1)  #http-launch 8156 v4l2src !  vp8enc ! webmmux streammable=true
>>> name=stream*
>>>
>>> I see the output like this once i launch :
>>>
>>> New connection 127.0.0.1:40929
>>> New connection 127.0.0.1:40930
>>> New connection 127.0.0.1:40931
>>> Starting to stream to 127.0.0.1:40929
>>> Starting pipeline
>>> Starting to stream to 127.0.0.1:40930
>>> Removing connection 127.0.0.1:40929
>>> Timeout
>>> Removing connection 127.0.0.1:40931
>>> Removing connection 127.0.0.1:40930
>>>
>>>
>>> And in the browser
>>>
>>> *2) http://127.0.0.1:8156/ <http://127.0.0.1:8156/>*
>>>
>>> *Problem:*
>>>
>>> *The streaming is very much slow almost like slide show only. What do i
>>> have to tweak so that we get minimal latency?*
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>>
>>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150319/fcf1e6c0/attachment.html>


More information about the gstreamer-devel mailing list