v4l2 element stay in READY state

Russell danrenjian at gmail.com
Mon Mar 2 18:10:58 PST 2015


Hi,

Thanks for all of your time.

I still don't find a way to make gstreamer read rtsp into v4l2loopback
device, at least with the verison on my distribution.
Newer versions might work, but it would be too complex for me to compile
gstreamer from source, especially when I want to deploy the code to
production.
So following is what I did to accomplish what I want.

My ip camera has mode DS-2CD3210D-I3, made by hikvision. Although all
documentations I found online only describes rtsp stream of it, I finally
find the mjpeg stream url (http protocal) after contacting their technical
support several times (and I need to update its firmware). So I have the
option of using following pipeline instead:
gst-launch-1.0 -vet souphttpsrc
location=http://username:password@ip/Streaming/channels/ID/httppreview
! jpegdec ! v4l2sink

Another option I researched, during the email contact with technical
support, is to use ffmpeg/libav(pyav in python),following ffmpeg command
can read rtsp stream into v4l2loopback device:
ffmpeg -re -i rtspurl -f v4l2 /dev/video1
By pyav, I read the rtsp stream as a sequence of images, then save them
into the target device. This works, just hurt performance. The process
might be improved when I become more familiar with video demuxing/decoding,
etc.


If there are anybody try to do similar things and want details, I might
provide some help.


Sincerely,
Russell

On Thu, Feb 26, 2015 at 5:13 AM, Nicolas Dufresne <
nicolas.dufresne at collabora.com> wrote:

>
> Le 2015-02-25 05:48, Russell a écrit :
>
>> So here is the entire output of the gst-launch command I run, including
>> messages output after I interrupt the program by CTRL-C:
>> http://paste.ubuntu.com/10405963/
>>
>> And the one with GST_STATES:5
>> http://paste.ubuntu.com/10405939/
>>
> There is two options, 1) there is not buffer ever decoded 2) there is a
> stall. So you have more details about the stream, B-Frames depth etc. That
> would possibly rule-out 2). For 1, try with fakesink to see if it reaches
> playing.
>
> Nicolas
>
> _______________________________________________
> 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/20150303/1f4d8e42/attachment.html>


More information about the gstreamer-devel mailing list