Reading RTSP streams from a Darwin server

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Reading RTSP streams from a Darwin server

yangsb
This post was updated on .
I installed a qtss server on my Ubuntu 8.04.
I tried to receive the video and audio from another machine.
I find a mp4 file named test.mp4 for testing , which contains mpeg4 video and mp3 audio.

I can receive and display the video by this pipeline :
##########################
gst-launch --gst-debug=2 \
rtspsrc latency=300 location=rtsp://192.168.1.56:554/test.mp4 ! \                                                  
! rtpmp4vdepay ! queue ! \                          
TIViddec engineName=decode codecName=mpeg4dec ! \                            
TIDmaiVideoSink displayStd=fbdev displayDevice=/dev/fb/3 \                    
videoStd=D1_NTSC videoOutput=COMPOSITE \                                      
resizer=FALSE accelFrameCopy=TRUE sync=false
#########################


Then I want to receive audio , I tried this pipeline :

##########################
gst-launch --gst-debug=2 \                                                    
rtspsrc latency=300 location=rtsp://192.168.1.56:554/test.mp4 ! \              
rtpmpadepay ! queue ! \                                                        
mad ! osssink sync=false
##########################
However , I can not get the audio , with the following errors:

###########################
Setting pipeline to PAUSED ...                                                
Pipeline is live and does not need PREROLL ...                                
Setting pipeline to PLAYING ...                                                
0:00:01.532993408  1342    0x15090 WARN                   bin gstbin.c:2083:do_
bin_latency:<pipeline0> failed to query latency                                
0:00:01.586082296  1342    0xdbef0 WARN                rtpbin gstrtpbin.c:2012:
new_ssrc_pad_found:<rtpbin0> Caps have no clock rate application/x-rtp from pad
 rtpssrcdemux1:src_705405174                                                  
0:00:01.590228408  1342    0xdbef0 WARN                rtpbin gstrtpbin.c:986:g
st_rtp_bin_associate:<rtpbin0> we have no clock-base                          
0:00:01.622647000  1342    0xc30c0 WARN                rtpbin gstrtpbin.c:2012:
new_ssrc_pad_found:<rtpbin0> Caps have no clock rate application/x-rtp from pad
 rtpssrcdemux0:src_618819072                                                  
0:00:01.626482148  1342    0xc30c0 WARN                rtpbin gstrtpbin.c:986:g
st_rtp_bin_associate:<rtpbin0> we have no clock-base                          
New clock: GstSystemClock                                                      
0:00:01.970068296  1342    0x50758 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc0> error: Internal data flow error.                  
0:00:01.971507852  1342    0x50758 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc0> error: streaming task paused, reason not-linked (-
1)                                                                            
0:00:01.974688556  1342    0xc34f0 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc2> error: Internal data flow error.                  
0:00:01.975904482  1342    0xc34f0 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc2> error: streaming task paused, reason not-linked (-
1)                                                                            
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc
2: Internal data flow error.                                                  
Additional debug info:                                                        
gstbasesrc.c(2234): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rts
psrc0/GstUDPSrc:udpsrc2:                                                      
streaming task paused, reason not-linked (-1)                                 
Execution ended after 315040185 ns.                                            
Setting pipeline to PAUSED ...                                                
Setting pipeline to READY ...                                                  
Setting pipeline to NULL ...                                                  
FREEING pipeline ...  

Does the depayloader " rtpmpadepay " can not be used in this situation ?
Should I use a depayloader specially for mp4 format ?

Hope to get some advice .

Thanks.
Best regards.
Reply | Threaded
Open this post in threaded view
|

Re: Reading RTSP streams from a Darwin server

yangsb
This post was updated on .
If I try a new.mp4 with h264 video and aac audio ,
I found that totem on my Ubuntu can recieve and play the mp4 file .
How can I get some infomation from totem to write my own pipeline ?


Thanks .
Best regards.

yangsb wrote
I installed a qtss server on my Ubuntu 8.04.
I tried to receive the video and audio from another machine.
I find a mp4 file named test.mp4 for testing , which contains mpeg4 video and mp3 audio.

I can receive and display the video by this pipeline :
##########################
gst-launch --gst-debug=2 \
rtspsrc latency=300 location=rtsp://192.168.1.56:554/test.mp4 ! \                                                  
! rtpmp4vdepay ! queue ! \                          
TIViddec engineName=decode codecName=mpeg4dec ! \                            
TIDmaiVideoSink displayStd=fbdev displayDevice=/dev/fb/3 \                    
videoStd=D1_NTSC videoOutput=COMPOSITE \                                      
resizer=FALSE accelFrameCopy=TRUE sync=false
#########################


Then I want to receive audio , I tried this pipeline :

##########################
gst-launch --gst-debug=2 \                                                    
rtspsrc latency=300 location=rtsp://192.168.1.56:554/test.mp4 ! \              
rtpmpadepay ! queue ! \                                                        
mad ! osssink sync=false
##########################
However , I can not get the audio , with the following errors:

###########################
Setting pipeline to PAUSED ...                                                
Pipeline is live and does not need PREROLL ...                                
Setting pipeline to PLAYING ...                                                
0:00:01.532993408  1342    0x15090 WARN                   bin gstbin.c:2083:do_
bin_latency:<pipeline0> failed to query latency                                
0:00:01.586082296  1342    0xdbef0 WARN                rtpbin gstrtpbin.c:2012:
new_ssrc_pad_found:<rtpbin0> Caps have no clock rate application/x-rtp from pad
 rtpssrcdemux1:src_705405174                                                  
0:00:01.590228408  1342    0xdbef0 WARN                rtpbin gstrtpbin.c:986:g
st_rtp_bin_associate:<rtpbin0> we have no clock-base                          
0:00:01.622647000  1342    0xc30c0 WARN                rtpbin gstrtpbin.c:2012:
new_ssrc_pad_found:<rtpbin0> Caps have no clock rate application/x-rtp from pad
 rtpssrcdemux0:src_618819072                                                  
0:00:01.626482148  1342    0xc30c0 WARN                rtpbin gstrtpbin.c:986:g
st_rtp_bin_associate:<rtpbin0> we have no clock-base                          
New clock: GstSystemClock                                                      
0:00:01.970068296  1342    0x50758 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc0> error: Internal data flow error.                  
0:00:01.971507852  1342    0x50758 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc0> error: streaming task paused, reason not-linked (-
1)                                                                            
0:00:01.974688556  1342    0xc34f0 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc2> error: Internal data flow error.                  
0:00:01.975904482  1342    0xc34f0 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc2> error: streaming task paused, reason not-linked (-
1)                                                                            
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc
2: Internal data flow error.                                                  
Additional debug info:                                                        
gstbasesrc.c(2234): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rts
psrc0/GstUDPSrc:udpsrc2:                                                      
streaming task paused, reason not-linked (-1)                                 
Execution ended after 315040185 ns.                                            
Setting pipeline to PAUSED ...                                                
Setting pipeline to READY ...                                                  
Setting pipeline to NULL ...                                                  
FREEING pipeline ...  

Does the depayloader " rtpmpadepay " can not be used in this situation ?
Should I use a depayloader specially for mp4 format ?

Hope to get some advice .

Thanks.
Best regards.
Reply | Threaded
Open this post in threaded view
|

Re: Reading RTSP streams from a Darwin server

yangsb
This post was updated on .
I have read this post :
http://www.nabble.com/-quicktime-flux--how-to-use-rtpxqtdepay---td16055861.html#a16055861

But I found that Wim Taymans 's pipeline :
gst-launch rtspsrc
location=rtsp://a2047.v1413b.c1413.g.vq.akamaistream.net/5/2047/1413/1_h264_110/1a1a1ae656c632970267e04ebd3196c428970e7ce857b81c4aab1677e445aedc3fae1b4a7bafe013/08770365506i_2_220.mov name=s ! rtpxqtdepay ! ffdec_h264 ! xvimagesink  s. ! rtpmp4gdepay ! faad ! alsasink

does not work on my ubuntu 8.04.
The pipeline pops several errors :
###########
0:00:00.433859872 10875 0x81f2568 WARN               basesrc gstbasesrc.c:2193:gst_base_src_loop:<udpsrc2> error: Internal data flow error.
0:00:00.433897309 10875 0x81f2568 WARN               basesrc gstbasesrc.c:2193:gst_base_src_loop:<udpsrc2> error: streaming task paused, reason not-linked (-1)
###########

However , the fact that totem on ubuntu 8.04 can play it fine
really confused me .....


Best regards.

yangsb wrote
If I try a new.mp4 with h264 video and aac audio ,
I found that totem on my Ubuntu can recieve and play the mp4 file .
How can I get some infomation from totem to write my own pipeline ?


Thanks .
Best regards.

yangsb wrote
I installed a qtss server on my Ubuntu 8.04.
I tried to receive the video and audio from another machine.
I find a mp4 file named test.mp4 for testing , which contains mpeg4 video and mp3 audio.

I can receive and display the video by this pipeline :
##########################
gst-launch --gst-debug=2 \
rtspsrc latency=300 location=rtsp://192.168.1.56:554/test.mp4 ! \                                                  
! rtpmp4vdepay ! queue ! \                          
TIViddec engineName=decode codecName=mpeg4dec ! \                            
TIDmaiVideoSink displayStd=fbdev displayDevice=/dev/fb/3 \                    
videoStd=D1_NTSC videoOutput=COMPOSITE \                                      
resizer=FALSE accelFrameCopy=TRUE sync=false
#########################


Then I want to receive audio , I tried this pipeline :

##########################
gst-launch --gst-debug=2 \                                                    
rtspsrc latency=300 location=rtsp://192.168.1.56:554/test.mp4 ! \              
rtpmpadepay ! queue ! \                                                        
mad ! osssink sync=false
##########################
However , I can not get the audio , with the following errors:

###########################
Setting pipeline to PAUSED ...                                                
Pipeline is live and does not need PREROLL ...                                
Setting pipeline to PLAYING ...                                                
0:00:01.532993408  1342    0x15090 WARN                   bin gstbin.c:2083:do_
bin_latency:<pipeline0> failed to query latency                                
0:00:01.586082296  1342    0xdbef0 WARN                rtpbin gstrtpbin.c:2012:
new_ssrc_pad_found:<rtpbin0> Caps have no clock rate application/x-rtp from pad
 rtpssrcdemux1:src_705405174                                                  
0:00:01.590228408  1342    0xdbef0 WARN                rtpbin gstrtpbin.c:986:g
st_rtp_bin_associate:<rtpbin0> we have no clock-base                          
0:00:01.622647000  1342    0xc30c0 WARN                rtpbin gstrtpbin.c:2012:
new_ssrc_pad_found:<rtpbin0> Caps have no clock rate application/x-rtp from pad
 rtpssrcdemux0:src_618819072                                                  
0:00:01.626482148  1342    0xc30c0 WARN                rtpbin gstrtpbin.c:986:g
st_rtp_bin_associate:<rtpbin0> we have no clock-base                          
New clock: GstSystemClock                                                      
0:00:01.970068296  1342    0x50758 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc0> error: Internal data flow error.                  
0:00:01.971507852  1342    0x50758 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc0> error: streaming task paused, reason not-linked (-
1)                                                                            
0:00:01.974688556  1342    0xc34f0 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc2> error: Internal data flow error.                  
0:00:01.975904482  1342    0xc34f0 WARN               basesrc gstbasesrc.c:2234
:gst_base_src_loop:<udpsrc2> error: streaming task paused, reason not-linked (-
1)                                                                            
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc
2: Internal data flow error.                                                  
Additional debug info:                                                        
gstbasesrc.c(2234): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rts
psrc0/GstUDPSrc:udpsrc2:                                                      
streaming task paused, reason not-linked (-1)                                 
Execution ended after 315040185 ns.                                            
Setting pipeline to PAUSED ...                                                
Setting pipeline to READY ...                                                  
Setting pipeline to NULL ...                                                  
FREEING pipeline ...  

Does the depayloader " rtpmpadepay " can not be used in this situation ?
Should I use a depayloader specially for mp4 format ?

Hope to get some advice .

Thanks.
Best regards.
Reply | Threaded
Open this post in threaded view
|

Re: Reading RTSP streams from a Darwin server

yangsb
Now ,I can run the decode video and audio using this pipeline :
######################################################################
gst-launch --gst-debug=2 \
rtspsrc location=rtsp://192.168.1.55:554/new4.mp4 name=s ! \
gstrtpjitterbuffer latency=9000 ! rtph264depay ! \                            
TIViddec engineName=decode codecName=h264dec ! \                              
TIDmaiVideoSink displayStd=fbdev displayDevice=/dev/fb/3 \                    
videoStd=D1_NTSC videoOutput=COMPOSITE \                                      
resizer=FALSE accelFrameCopy=TRUE sync=0 s. ! gstrtpjitterbuffer latency=9000  
!rtpmp4gdepay ! TIAuddec engineName=decode codecName=aachedec ! osssink sync=0
######################################################################
However , after a few seconds , the video seems to be freezed, and pops the following messages:

0:00:15.718148889  1352    0xcde70 WARN    gstrtpjitterbuffer gstrtpjitterbuffe
r.c:1156:gst_rtp_jitter_buffer_loop:<rtpjitterbuffer3> Sequence number GAP dete
cted: expected 64683 instead of 64684 (1 missing)                              
0:00:15.722077111  1352    0x73cd8 WARN    gstrtpjitterbuffer gstrtpjitterbuffe
r.c:1156:gst_rtp_jitter_buffer_loop:<rtpjitterbuffer0> Sequence number GAP dete
cted: expected 64682 instead of 64684 (2 missing)

I am using  a hub to buid a LAN of mysel, so, the network is fine.

But why there are so many packets lossing ?