RTSP from IP camera using Apalis TK1

I am using Apalis TK1 on Ixora V1.0A, and I want to stream real time video from an IP camera. I used to perform same task on my Jetson TK1 with following gstreamer pipeline.

gst-launch rtspsrc location=rtsp://IPaddressOfMyCamera/stream1 latency=500 ! gstrtpjitterbuffer ! rtphdepay ! nv_omx_h264dec ! 'video/x-nv-yuv' ! nvvidconv ! 'video/x-raw-gray, width=640, width=360' ! 'video/x-raw-yuv' ! plugin ! nvvidconv ! 'video/x-nv-yuv' ! nv_omx_hdmi_videosink

Since the pipelines with nvs are customized for nvidia, I could not use them on my Apalis. I tried to use following pipelines.

 gst-launch-0.10 playbin2 uri=rtsp://${CAMIP}/stream1

I got the following lines(but no video)

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Missing element: H.264 decoder
WARNING: from element /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0: No decoder available for type 'video/x-h264, stream-format=(string)byte-stream, alignme.
Additional debug info:
../../../gst-plugins-base-0.10.36/gst/playback/gsturidecodebin.c(874): unknown_type_cb (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0
ERROR: from element /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2:decodebin20: Your GStreamer installation is missing a plug-in.
Additional debug info:
../../../gst-plugins-base-0.10.36/gst/playback/gstdecodebin2.c(3576): gst_decode_bin_expose (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstDecodeBin2::
no suitable plugins found
Execution ended after 2983308120 ns.
Setting pipeline to PAUSED ...                                                                                                                                      
Setting pipeline to READY ...                                                                                                                                       
Setting pipeline to NULL ...                                                                                                                                        
Freeing pipeline ... 

Then I tried the following pipeline.

gst-launch -v rtspsrc location=rtsp://IPaddressOfMyCamera/stream1 ! "application/x-rtp, media=video" ! decodebin2 ! ffmpegcolorspace ! xvimagesink

I got the following lines (but no video)

Setting pipeline to PAUSED ...                                                                                                                                      
    Pipeline is live and does not need PREROLL ...                                                                                                                      
    Setting pipeline to PLAYING ...                                                                                                                                     
    New clock: GstSystemClock                                                                                                                                           
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: latency = 2000                                                                                        
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: buffer-mode = slave (1)                                                                               
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1: timeout = 5000000                                                                                     
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1: timeout = 0                                                                                           
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0: caps = application/x-rtcp                                                 
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:send_rtcp_src: caps = application/x-rtcp                              
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink1.GstPad:sink: caps = application/x-rtcp                                                               
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0.GstProxyPad:proxypad3: caps = application/x-rtcp                           
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1: caps = application/x-rtp, media=(string)video                                                                     
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=1
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_759901269_96: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int1
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_759901269_96.GstProxyPad:proxypad5: caps = application/x-rtp, media=(string)video, payload=(i1
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_759901269_96.GstProxyPad:proxypad4: caps = application/x-rtp, media=(string1
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:src: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate1
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rat1
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20.GstGhostPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-1
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20.GstGhostPad:sink.GstProxyPad:proxypad0: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate1
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(strinl
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-r1
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal,e
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nal 
    Missing element: H.264 decoder                                                                                                                                      
    ERROR: from element /GstPipeline:pipeline0/GstDecodeBin2:decodebin20: Your GStreamer installation is missing a plug-in.                                             
    Additional debug info:                                                                                                                                              
    ../../../gst-plugins-base-0.10.36/gst/playback/gstdecodebin2.c(3576): gst_decode_bin_expose (): /GstPipeline:pipeline0/GstDecodeBin2:decodebin20:                   
    no suitable plugins found                                                                                                                                           
    Execution ended after 2919324649 ns.                                                                                                                                
    Setting pipeline to PAUSED ...                                                                                                                                      
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstCapsFilter:capsfilter2.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)nae
    Setting pipeline to READY ...                                                                                                                                       
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstCapsFilter:capsfilter2.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)ne
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstCapsFilter:capsfilter2.GstPad:src: caps = NULL                                                                  
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstCapsFilter:capsfilter2.GstPad:sink: caps = NULL                                                                 
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstH264Parse:h264parse0.GstPad:src: caps = NULL                                                                    
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstH264Parse:h264parse0.GstPad:sink: caps = NULL                                                                   
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = NULL                                                              
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = NULL                                                             
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:src: caps = NULL                                                                
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:sink: caps = NULL                                                               
    /GstPipeline:pipeline0/GstDecodeBin2:decodebin20.GstGhostPad:sink: caps = NULL                                                                                      
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = NULL                                                                                            
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = NULL                                                                                           
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_759901269_96: caps = NULL                                                                     
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_759901269_96: caps = NULL                                                   
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:send_rtcp_src_0: caps = NULL                                                               
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpPtDemux:rtpptdemux0.GstPad:src_96: caps = NULL                                                   
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0/GstRtpSession:rtpsession0.GstPad:send_rtcp_src: caps = NULL                                            
    Setting pipeline to NULL ...                                                                                                                                        
    /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSink:udpsink1.GstPad:sink: caps = NULL                                                                             
    Freeing pipeline ... 

Furthermore, I tried the following pipeline.

gst-launch rtspsrc location=rtsp://IPaddressOfMyCamera/stream1 latency=500 ! decodebin ! autovideosink 

I got the following lines (but no video)

Setting pipeline to PAUSED ...                                                                                                                                                                                                                
    Pipeline is live and does not need PREROLL ...                                                                                                                                                                                                
    Setting pipeline to PLAYING ...                                                                                                                                                                                                               
    New clock: GstSystemClock                                                                                                                                                                                                                     
    Missing element: H.264 decoder                                                                                                                                                                                                                
    ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: Internal data flow error.                                                                                                                                   
    Additional debug info:                                                                                                                                                                                                                        
    ../../../../gstreamer-0.10.36/libs/gst/base/gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0:                                                                                           
    streaming task paused, reason not-linked (-1)                                                                                                                                                                                                 
    Execution ended after 1211622416 ns.                                                                                                                                                                                                          
    Setting pipeline to PAUSED ...                                                                                                                                                                                                                
    Setting pipeline to READY ...                                                                                                                                                                                                                 
    Setting pipeline to NULL ...                                                                                                                                                                                                                  
    Freeing pipeline ...            

Can someone help me or advise me a solid gstream pipeline to perform rtsp from an IP camera using Apalis TK1?

Best,
Kemal.

Hi,

I’ve successfully created a gstreamer pipeline using an RTSP source.

This is what I used:

gst-launch-0.10 rtspsrc location=rtsp://<ip>:<port>/0 latency=0 ! rtph264depay ! nv_omx_h264dec ! nv_omx_videosink

We had two camera feeds available, which is why there is a “/0” at the end of the port address. This may not be applicable to you.

As a side-note, I found gst-launch-0.10 to be much less latent than gst-launch-1.0

Thank you kwebster83,

When I use your gstreamer pipeline, I got the following error

WARNING: errorneous pipeline: no element “nv_omx_h264dec”, How can I add this element?

Probably I will obtain an error with nv_omx_videosink after I deal with nv_omx_h264dec problem.

Thanks for your help.

Hi @kesahin,

I referred to this document:

http://developer.download.nvidia.com/embedded/L4T/r21_Release_v3.0/L4T_Jetson_TK1_Multimedia_User_Guide_V2.1.pdf

And installed the relevant gstreamer0.10-plugins-xxx packages as specified on page 2 of the above PDF document (after the index).

Let me know if this helps.

P.S. Also, can you check what plugins you have available by running gst-inspect-0.10 and post the output on here?

Hi @kwebster83,

You can find my available plugins in the following link.

link text

I will check the pdf that you shared, and I will inform you if it helps or not.

Thanks,

Kemal.

Hi @kesahin,

It could be that my set up is slightly different from yours. I’m running the NVIDIA JetPack L4T Ubuntu image as per the following article:

http://developer.toradex.com/knowledge-base/installing-nvidia-jetpack-with-l4t-on-apalis-tk1

This may have additional plugins already installed.

Hi @kwebster83,

I checked the pdf you shared with me, but it does not work for me due to the difference between our setups. Then I try to perform rtsp with gst-launch-1.0 rtspsrc location= rtsp://192.170.0.168/stream1 latency=0 ! … but I get the following error

WARNING: erroneous pipeline: no element “rtspsrc”

I do not understand why I encounter with this error since I install plugins for gst-1.0, but I miss something I guess. Can you share commands for installing plugins for gst-1.0 ?

Thanks.

@kesahin,

Are you running Angstrom or Ubuntu on your TK1?

Initially, I was running Angstrom and managed to get gstreamer working via MIPI CSI but all my RTSP work latterly has been done on Ubuntu.

@kwebster83

Now, I am using Angstrom. Probably, I will move my works to Ubuntu. However, I want to implement a working pipeline for Angstrom.

Thanks.

Unfortunately our current Angstrom/OpenEmbedded/Yocto BSP exclusively uses gstreamer 1.0 which we learned from multiple sources is not really production ready for TK1. We may consider switching to or at least including gstreamer 0.10 in the future as well.