<div dir="ltr"><div>Hi, </div><div><br></div><div>Thanks for all of your time.</div><div><br></div>I still don't find a way to make gstreamer read rtsp into v4l2loopback device, at least with the verison on my distribution.<div>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.</div><div>So following is what I did to accomplish what I want.</div><div><br></div><div>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:</div><div>gst-launch-1.0 -vet souphttpsrc location=http://username:password@ip/Streaming/channels/ID/httppreview ! jpegdec ! v4l2sink<br></div><div><br></div><div>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:</div><div>ffmpeg -re -i rtspurl -f v4l2 /dev/video1<br></div><div>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.</div><div><br></div><div><br></div><div>If there are anybody try to do similar things and want details, I might provide some help.<br></div><div><br></div><div><br></div><div>Sincerely,</div><div>Russell</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 26, 2015 at 5:13 AM, Nicolas Dufresne <span dir="ltr"><<a href="mailto:nicolas.dufresne@collabora.com" target="_blank">nicolas.dufresne@collabora.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Le 2015-02-25 05:48, Russell a écrit :<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So here is the entire output of the gst-launch command I run, including messages output after I interrupt the program by CTRL-C:<br>
<a href="http://paste.ubuntu.com/10405963/" target="_blank">http://paste.ubuntu.com/<u></u>10405963/</a><br>
<br>
And the one with GST_STATES:5<br>
<a href="http://paste.ubuntu.com/10405939/" target="_blank">http://paste.ubuntu.com/<u></u>10405939/</a><br>
</blockquote></span>
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.<span class="HOEnZb"><font color="#888888"><br>
<br>
Nicolas</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<u></u>freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/gstreamer-<u></u>devel</a><br>
</div></div></blockquote></div><br></div>