[Live-devel] openRTSP Test Program Fails to Export a File

Ross Finlayson finlayson at live555.com
Sun Feb 5 12:53:27 PST 2012


>>> I'm using the live555 library in order to save an RTSP stream from a PTZ camera.  I used the openRTSP program in the "testProgs" directory in order to test whether it would work with the camera I was using.  From the output, the program was able to connect to and talk to the camera and request frames from it.  However, upon examining the output files from the program, the data was corrupt.
>> 
>> Are you sure?  You haven't said what RTP payload format the stream was using.  Please post the RTSP protocol exchange (the debugging output from "openRTSP").
> 
> H:\live\testProgs>openRTSP -d 10 -V -Q rtsp://10.248.123.150/live2.sdp
> Opened URL "rtsp://10.248.123.150/live2.sdp", returning a SDP description:
> v=0
> o=RTSP 1327875302 714 IN IP4 0.0.0.0
> s=RTSP server
> c=IN IP4 0.0.0.0
> t=0 0
> a=charset:Shift_JIS
> a=range:npt=0-
> a=control:*
> a=etag:1234567890
> m=video 0 RTP/AVP 96
> b=AS:0
> a=rtpmap:96 MP4V-ES/30000
> a=control:trackID=2
> a=fmtp:96 profile-level-id=3;config=000001B003000001B2464D5F5047204D6F6465000001
> B509000001000000012000C48881F4514043C1463F;decode_buf=76800
> m=audio 0 RTP/AVP 97
> a=control:trackID=3
> a=rtpmap:97 mpeg4-generic/44100/2
> a=fmtp:97 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=1210;SizeLengt
> h=13; IndexLength=3; IndexDeltaLength=3; CTSDeltaLength=0; DTSDeltaLength=0;

OK, this shows that your received video file contained "MPEG-4 Elementary Stream" data, and that your received audio file contained "MPEG-4 (AAC) Elementary Stream" data.  It's unlikely that this data really was 'corrupt'.  It's more likely that whatever media player you used to try to play these files failed to do so, because it did not know how to play this type of file.



>>> My next test was to try outputting a quicktime file.  When I tried this, the program started printing Klingon to the screen and producing an annoying beeping.
>> 
>> That's because the "-q" (and the "-i" and "-4" options) output to 'stdout'.  If you want to write the output to a file, then you will need to redirect 'stdout' to it.
> 
> Is there a simple switch to do that or do I have to compile the test program in order to allow that?

Oh dear.  Read
	http://en.wikipedia.org/wiki/Redirection_%28computing%29
This should be common knowledge for anyone who wants to use software like this.  Run
	openRTSP -q -w frame-width -h frame-height -f frame-rate rtsp://url > outputfile.mov

Note:
- As noted in the "openRTSP" documentation
	http://www.live555.com/openRTSP/#quicktime
  the "-w <width>", "-h <height>" and "-f <frame-rate>" options are important, and should not be omitted.
- Note also the "important note" at the end of that section of the documentation.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120205/14f7b841/attachment.html>


More information about the live-devel mailing list