I would like to access my security camera that communicates through rtsp feed with an API that only supports a character video kind of entry (I'm new on linux, and I'm not sure if it's called "character video" the '/dev/video1' sort). I followed this post and I get the output below for the following command:

gst-launch-1.0 -v rtspsrc location=rtsp://admin:admin@ ! v4l2sink device=/dev/video1

...Progress: (request) Sending PLAY request...

ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc3: Internal data flow error.
Additional debug info:
gstbasesrc.c(2943): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc3:
streaming task paused, reason not-linked (-1)

How do i solve this error? Do you know any way other than gstream for this task?

PS: there are more on the message, I've just resumed to be more readable.

  • How sure are you that your URL is correct? Anyways, my first attempt would be to use ffmpeg. ffmpeg.org/ffmpeg-protocols.html#Examples – Cestarian Jan 29 '16 at 18:03
  • I posted the wrong command by mistake sorry I'm correcting now but with the right one I get the same output. I verified opening the url with VLC, and it's streaming. – Rinaldi Segecin Jan 29 '16 at 18:20
  • Allright, my first guess then would be that the v4l2sink command is what's tripping this process up (has to be either that, or gst itself). (if the gst command is what's wrong, then you can try replacing it with ffmpeg as I suggested) maybe this will work. ffmpeg -rtsp_flags listen -i rtsp://admin:admin@ -f v4l2 /dev/video1 (just make sure you have both v4l2loopback and ffmpeg installed) – Cestarian Jan 29 '16 at 18:26
  • ffmpeg gives gives me the output: <br /> [[rtsp @ 0x2252660] Unable to open RTSP for listening rtsp://admin:admin@ Cannot assign requested address <br /> but I can still see on VLC entering the same network url. – Rinaldi Segecin Jan 29 '16 at 18:38
  • This is the nmap output: Starting Nmap 6.47 ( http://nmap.org ) at 2016-01-29 16:48 BRST Nmap scan report for Host is up (0.0025s latency). PORT STATE SERVICE 554/tcp open rtsp | rtsp-url-brute: | Discovered URLs | rtsp:// | rtsp:// | rtsp:// | rtsp:// | rtsp:// Nmap done: 1 IP address (1 host up) scanned in 10.16 seconds – Rinaldi Segecin Jan 29 '16 at 18:51

I've got the rtsp streaming on '/dev/video1' working with the following command:

ffmpeg -i rtsp://admin:admin@ -f v4l2 -pix_fmt yuv420p /dev/video1.

Thank you guys for the great support.


You can also use gstreamer, since ffmpeg and avconv may have problems with the v4l2 format. Please note the use of decodebin in the pipeline.

gst-launch rtspsrc location=rtsp:// ! decodebin ! v4l2sink device=/dev/video1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.