Hello,
I'm working on linux (ubuntu 14.04).I need to do video streaming from ip-camera by using Gstreamer.I tried to launch some commands to access my ipcamera in ubuntu pc.But its not able to access and getting error as GstPipeline.I tried some other command with ipaddress and port details mentioned in the command,its not working. Getting an error while executing the command which is mentioned below.And not able to access ip of ipcamera by using gstreamer.
1.gst-launch-1.0 rtspsrc location=rtsp://192.168.1.249/live1.sdp ! autovideosink
After launching the above command in linux(ubuntu 14.04) getting error as mentioned below.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.1.249/live1.sdp
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not open resource for reading and writing.
Additional debug info:
gstrtspsrc.c(6183): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Failed to connect. (Generic error)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
2.gst-launch-1.0 rtsp://192.168.1.249:80/user=admin&pass ... ream=0.sdp?
After launching above command in a terminal its getting below error
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ERROR: pipeline could not be constructed: Unrecoverable syntax error while parsing pipeline rtsp://192.168.1.249:80/user=admin.
If any one faced same issue in past than please help me how to come out of this issue.Please reply me as soon as possible.
Solved! Go to Solution.
bhargavi k wrote:
I’m using yocto (dizzy) bsp version for building image as followed by this Getting started with Yocto on Wandboard - Wandboard Wiki . And i successfully builded image on wandboard-quad. ... But on Target machine those elements are not found.
The packages that end up on the target machine are determined by the image used.
If you followed the guide and built core-image-minimal, you will not have most gstreamer packages.
I think the image fsl-image-multimedia or fsl-image-multimedia-full will include gstreamer and all plugins.
https://github.com/Freescale/meta-freescale-distro/tree/dizzy/recipes-fsl/images
It's also possible to add only the udp and v4l2 support package to your CORE_IMAGE_EXTRA_INSTALL.
gst-plugins-good-udp \ gst-plugins-good-video4linux2 \
There is more information in the link at the bottom of that wiki page, Building Qt5 using yocto on Wandboard - Wandboard Wiki, although some of that is specific to QT.
could you try to use udp? refer to the user guide:
The following command line is an example of how to record and transfer web camera input.
$GSTL imxv4l2src device=/dev/video1 ! vpuenc_h264 ! rtph264pay ! udpsink host=$HOST_IP
HOST_IP is the IP/multicast group to send the packets to.
This command line is an example of how to receive and display web camera input.
$GSTL udpsrc ! application/x-rtp ! rtph264depay ! vpudec ! imxv4l2sink
Thanks for Reply,
As per u suggestion i tried the udp commands on ubuntu(14.04) and my target machine(wandboard-quad),but also not able to get any display.I'm getting as pipeline error as mentioned below.
-->$GSTL imxv4l2src device=/dev/video1 ! vpuenc_h264 ! rtph264pay ! udpsink host=192.168.1.249
ERROR:Pipeline could not be construted:no element "imxv4l2src".
-->$GSTL udpsrc ! application/x-rtp ! rtph264depay ! vpudec ! imxv4l2sink
(gst-launch-1.0:488):GStreamer-CRITICAL**:gst_element_make_from_uri:assertion'gst_uri_is_valid(uri)'failed
ERROR:Pipeline could not be construted:no element "udpsrc".
how to add this pipelines on wandboard-quad. And how to resolve this issue?
what bsp version do you use. try to use the command "gst-inspect-1.0 | grep v4l2src "and ""gst-inspect-1.0 | grep udpsrc", what do you get?
Thanks Joan Xie,
I’m using yocto (dizzy) bsp version for building image as followed by this Getting started with Yocto on Wandboard - Wandboard Wiki . And i successfully builded image on wandboard-quad. I tried the above commands in ubuntu ,it displayed as mentioned below. But on Target machine those elements are not found. -->gst-inspect-1.0 | grep v4l2src video4linux2: v4l2src: Video (video4linux2) Source -->gst-inspect-1.0 | grep udpsrc udp: udpsrc: UDP packet receiver
bhargavi k wrote:
I’m using yocto (dizzy) bsp version for building image as followed by this Getting started with Yocto on Wandboard - Wandboard Wiki . And i successfully builded image on wandboard-quad. ... But on Target machine those elements are not found.
The packages that end up on the target machine are determined by the image used.
If you followed the guide and built core-image-minimal, you will not have most gstreamer packages.
I think the image fsl-image-multimedia or fsl-image-multimedia-full will include gstreamer and all plugins.
https://github.com/Freescale/meta-freescale-distro/tree/dizzy/recipes-fsl/images
It's also possible to add only the udp and v4l2 support package to your CORE_IMAGE_EXTRA_INSTALL.
gst-plugins-good-udp \ gst-plugins-good-video4linux2 \
There is more information in the link at the bottom of that wiki page, Building Qt5 using yocto on Wandboard - Wandboard Wiki, although some of that is specific to QT.
Thanks Arthur,
Now i builded fsl-image-multimedia-full and i 'm able to see gstreamer plugins on my target machine(wand board-quad). I tried the gstreamer commands on my wand board-quad .I'm getting error and not able to access media from ip camera.Can you suggest me how to access ip camera by using gstreamer commands? Those commands has to work on my target machine .
After executing below command on my target machine i got error as mentioned below.
-->$GSTL imxv4l2src device=/dev/video1 ! avenc_mjpeg ! rtph264pay ! udpsink host=192.168.1.249
Setting Pipeline to PAUSED. . .
ERROR:Pipeline doesn't want to pause.
Setting Pipeline to NULL. . .
Freeing Pipeline. . .
In the above command i have missed any plugin?
Unfortunately, my implementation of IP cameras isn't until the next phase of my project, so I am not familiar with what is necessary for gstreamer to view IP cameras.
My only suggestion would be to confirm with a different host that you're able to view the IP camera stream with gstreamer [sounds like your build host has all the right stuff]. That would eliminate the possibility that something is wrong with your command line options, network or camera configuration.
You can also use the verbose flag [-v] with gstreamer to get more logging information that might lead somewhere useful.