Quantcast

RTSP Server Examples

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RTSP Server Examples

Sean McNamara-4
Hello,

 I am using latest git gst-core, gst-p-base, gst-p-good, gst-p-bad,
gst-p-ugly, gst-rtsp-server. I am using libtheora 1.0 and libogg 1.1.
I created a file test.ogg with this pipeline:

videotestsrc blocksize=4096 num-buffers=200 ! ffmpegcolorspace !
theoraenc ! oggmux ! filesink location=~/test.ogg

This pipeline works fine:

playbin2 uri=file://${HOME}/test.ogg

However, if I start the gst-rtsp-server example "test-ogg" and point
it to the same file, this pipeline causes a critical assertion in the
RTSP server when trying to connect using the following pipeline:

playbin2 uri=rtsp://localhost:8554/test

The full output on the server side:

$ ./test-ogg.bin ~/test.ogg
** Message: listening on port 8554
** Message: added new client 0x9afce60 ip 127.0.0.1:4572
** Message: attaching to context 0x9afdbe8
RTSP request message 0x9c1154c
 request line:
   method: 'OPTIONS'
   uri:    'rtsp://localhost:8554/test'
   version: '1.0'
 headers:
   key: 'CSeq', value: '1'
   key: 'User-Agent', value: 'RealMedia Player Version 6.0.9.1235
(linux-2.0-libc6-i386-gcc2.95)'
   key: 'ClientChallenge', value: '9e26d33f2984236010ef6253fb1887f7'
   key: 'CompanyID', value: 'KnKV4M4I/B2FjJ1TToLycw=='
   key: 'GUID', value: '00000000-0000-0000-0000-000000000000'
   key: 'RegionData', value: '0'
   key: 'PlayerStarttime', value: '[28/03/2003:22:50:23 00:00]'
   key: 'ClientID', value: 'Linux_2.4_6.0.9.1235_play32_RN01_EN_586'
   key: 'Date', value: 'Thu, 07 May 2009 14:15:07 GMT'
 body:
** Message: client 0x9afce60: received a request
RTSP response message 0xbff5a224
 status line:
   code:   '200'
   reason: 'OK'
   version: '1.0'
 headers:
   key: 'CSeq', value: '1'
   key: 'Public', value: 'OPTIONS, DESCRIBE, PAUSE, PLAY, SETUP, TEARDOWN'
   key: 'Server', value: 'GStreamer RTSP server'
 body: length 0
** Message: client 0x9afce60: sent a message with cseq 1
RTSP request message 0x9c1154c
 request line:
   method: 'DESCRIBE'
   uri:    'rtsp://localhost:8554/test'
   version: '1.0'
 headers:
   key: 'CSeq', value: '2'
   key: 'Accept', value: 'application/sdp'
   key: 'Date', value: 'Thu, 07 May 2009 14:15:07 GMT'
 body:
** Message: client 0x9afce60: received a request
** Message: found media 0x9bfbd20 for url abspath /test
** Message: enter mainloop
** Message: constructed media 0x9baa538 for url /test
** Message: preparing media 0x9baa538
** (lt-test-ogg:31866): CRITICAL **: make_granulepos: assertion `frame
>= keyframe' failed
** Message: stream 0x9c44470 received caps application/x-rtp,
media=(string)video, clock-rate=(int)90000,
encoding-name=(string)THEORA, sampling=(string)YCbCr-4:2:0,
width=(string)320, height=(string)240,
configuration=(string)"AAAAAcGmtQqRAioygHRoZW9yYQMCAQAUAA8AAUAAAPAAAAAAAB4AAAABAAAAAAAAAAAAAEDAgXRoZW9yYSMAAABYaXBoLk9yZyBsaWJUaGVvcmEgSSAyMDA4MTAyMCAzIDIgMQAAAACCdGhlb3Jhvs0o97nNaxi1qUlKEHOc5jGMUpSkIQgxjGIQhCEIQAAAAAAAAAAAABH04WQuVUm0dhL1cLSYa5WiqUCWSKHQR9OZuNZkMBdLJVKRLJRGIhAHg5HA0GQxFosFYoEwlEYhEAeDocDIYCwVCYSCIPBoMBT7mRfWlVVUFBLS0ZGQUE8PDc3MjItLS0oKCgjIyMeHh4eGRkZGRQUFBQUDw8PDw8PDwoKCgoKCgoKBQUFBQUFBQCEAsKEBgoMz0MDA4TGjo8Nw4NEBgoOUU4DhEWHTNXUD4SFiU6RG1nTRgjN0BRaHFcMUBOV2d5eGVIXF9icGRnYxESGC9jY2NjEhUaQmNjY2MYGjhjY2NjYy9CY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2MQEBAUGBwgKBAQFBgcICgwEBQYHCAoMEAUGBwgKDBAQBgcICgwQEBAHCAoMEBAQGAgKDBAQEBggCgwQEBA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kah386tgHpHFysrPNyF+XpGDEbaykzTPK4no4Cysi6hU1BG+XF4ZTNM5RtrjhI5W0QHm70fz98BG5SPp/VVI38gISjuI4sVhclXjTNtqYTMsf7eg3i9Ba/+748LKwSrhli0zNtUzC+ejlJ0QI4VVJSjN3fURASOLCtyShdMwv/G2pli0z+ULZ/D2GoqpQEYsrHG/ZK5Eyic21f/DLFpmXWsL+vSJ5JCIHlqmoIbnP5OYEgmaZm2suWPdhXuFEaK/5w69B1+nJAbamUzTOVjhfdUpgHjn4URW7ljj1Wdxwimoh9LefCAjUJCUNM22phMyxvu3D/vixWT/OogjAMsWmZtqmYX3S/p/uVlamoQ+QG6JIoteuHXY9OShafzBli0zNtVzC+fvdBUUvHFhGrdJfkKKQbxkkMRAOB0GODPItnX3Jnxro/25Ud+llbyVVSN4ySGIgHA6DHBnkWzr7kz410f7cqO/Syt5KqpG8ZJDEQDgdBjgzyLZ19yZ8a6P9uVHfpZW8lVUiqk4T9QAiXgmaZm2suUjHCHxZWLeX3ou7I6P9wWxw1KXrl/QLK4DzcLkhgxGUzTM21lvn4O/kXQH8/PlKpZWD6iL1vCgOCQvSjTNtqTMscLu0a3oLKzla+n8I3CTtv6QITo/ShhMyxXmmbbW6iJTUUnkQPp6O3HPoV2RwDcWn4yxaZkzC821ul6khqEKJ6srpVIBvI8A+TL7p1o10f7GODPKXl24UdRkCFGSBKLrWF5MonO+n/1isG2rngyxaZ7++RKqSqlARiyscb9krkTKJzbV/8MsWmZdawv69InkkIA\=",
delivery-method=(string)inline, ssrc=(guint)1814388793,
payload=(int)96, clock-base=(guint)3352273194,
seqnum-base=(guint)39273
** Message: stream 0x9c44470 received caps application/x-rtp,
media=(string)video, clock-rate=(int)90000,
encoding-name=(string)THEORA, sampling=(string)YCbCr-4:2:0,
width=(string)320, height=(string)240,
configuration=(string)"AAAAAcGmtQqRAioygHRoZW9yYQMCAQAUAA8AAUAAAPAAAAAAAB4AAAABAAAAAAAAAAAAAEDAgXRoZW9yYSMAAAB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HfpZW8lVUiqk4T9QAiXgmaZm2suUjHCHxZWLeX3ou7I6P9wWxw1KXrl/QLK4DzcLkhgxGUzTM21lvn4O/kXQH8/PlKpZWD6iL1vCgOCQvSjTNtqTMscLu0a3oLKzla+n8I3CTtv6QITo/ShhMyxXmmbbW6iJTUUnkQPp6O3HPoV2RwDcWn4yxaZkzC821ul6khqEKJ6srpVIBvI8A+TL7p1o10f7GODPKXl24UdRkCFGSBKLrWF5MonO+n/1isG2rngyxaZ7++RKqSqlARiyscb9krkTKJzbV/8MsWmZdawv69InkkIA\=",
delivery-method=(string)inline, ssrc=(guint)1814388793,
payload=(int)96, clock-base=(guint)3352273194,
seqnum-base=(guint)39273

The full output on the client side:

$ gst-launch-0.10 playbin2 uri=rtsp://localhost:8554/test
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Could not read from resource.
Additional debug info:
gstrtspsrc.c(3640): gst_rtspsrc_try_send ():
/GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Could not receive message. (Timeout while waiting for server response)
Setting pipeline to NULL ...
Freeing pipeline ...



The critical assertion is this:

** (lt-test-ogg:6966): CRITICAL **: make_granulepos: assertion `frame
>= keyframe' failed

The offending line of code is
gst-plugins-base/ext/theora/theoraparse.c line 420, in
make_granulepos():

g_return_val_if_fail (frame >= keyframe, -1);

The backtrace when breaking on this line:

Breakpoint 1, theora_parse_push_buffer (parse=0x9719000,
buf=0x9787ae0, keyframe=1, frame=0)
    at theoraparse.c:420
420  g_return_val_if_fail (frame >= keyframe, -1);
(gdb) bt
#0  theora_parse_push_buffer (parse=0x9719000, buf=0x9787ae0,
keyframe=1, frame=0)
    at theoraparse.c:420
#1  0xb78f2da5 in theora_parse_chain (pad=0x9655b18, buffer=0x9787ae0)
at theoraparse.c:620
#2  0xb7f328f5 in gst_pad_chain_unchecked (pad=0x9655b18,
buffer=0x9787ae0) at gstpad.c:3977
#3  0xb7f33d0a in gst_pad_push (pad=0x9655a58, buffer=0x9787ae0) at
gstpad.c:4144
#4  0xb7897562 in gst_queue_loop (pad=0x9655a58) at gstqueue.c:1042
#5  0xb7f571d3 in gst_task_func (task=0x975a190, tclass=0x95e6228) at
gsttask.c:172
#6  0xb7cfee26 in ?? () from /usr/lib/libglib-2.0.so.0
#7  0xb7cfd7bf in ?? () from /usr/lib/libglib-2.0.so.0
#8  0xb7c3b4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#9  0xb7bb649e in clone () from /lib/tls/i686/cmov/libc.so.6


The interesting thing is: if I comment out lines 417 and 418, then
(frame >= keyframe) is TRUE, and the critical doesn't trigger.
Unfortunately, after "fixing" this, I still don't get any output --
and I get no further error-ish stuff, only debug info.

The test-mp4 and test-readme examples don't work either. I don't know
how to operate this code, as it seems determined to do nothing
regardless of my efforts. I have also tried VLC as an RTSP client to
see if it's the client-side, but that hangs just like the gstreamer
client. I tried using VLC as an RTSP server, and both gstreamer and
VLC can connect to it and stream the very same Ogg/Theora test file.
Maybe I am making a user error - would anyone care to enlighten me?

Thanks,

Sean

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Loading...