openRTSP
openRTSP是一个命令行程序,它可以用来打开,流化,接收并且录制指定的RTSP视频链接媒体流(如rtsp://开头的URL)
(一个相关的程序“playSIP”可以用来播放或者录制一个SIP会话)
本文将要介绍如下内容
- Basic operation 基本操作
- Playing without receiving 播放不接收
- Playing-time options 播放时选项
- Streaming access-controlled sessions 流式访问控制选项
- Outputting a ".mov", ".mp4", or ".avi"-format file 输出一个mov, mp4, avi 格式文件
- Periodic file output 周期的文件输出
- 'Trick play' options “特技播放”选项
- Other options 其他选项
- A note about RealAudio and RealVideo sessions 关于RealVideo和RealAudio会话注意事项
- Source code 源码
- Support and customization 支持与定制
- Summary of command-line options 选项汇总
其实本文主要内容是openRTSP一些选项的用法,所以将“选项汇总”放在前面来介绍。
Summary of command-line options
(for "openRTSP" and "playSIP")
-4 output a '.mp4'-format file (to 'stdout', unless the "-P <interval-in-seconds>" option is also given)
输出一个“mp4”格式文件(到'标准输出',除非同时有选项“-P <interval-in-seconds>”给定区间时间间隔)
-a play only the audio stream (to 'stdout', unless the "-P <interval-in-seconds>" option is also given)
只输出音频流(到'标准输出',除非同时有选项“-P <interval-in-seconds>”给定区间时间间隔)
-A <codec-number> specify the static RTP payload format number of the audio codec to request from the server ("playSIP" only)
指定从服务器请求的音频编解码器的静态RTP负载格式数量(仅用于“playSIP”)
-b <buffer-size> change the output file buffer size
更改输出文件的缓冲区大小
-B <buffer-size> change the input network socket buffer size
更改输入网络套接字缓冲区大小
-c play continuously
连续播放
-C Explicitly ask for a multicast stream even if the server's "DESCRIBE" response doesn't specify a multicast address. (Note that not all servers will support this.) ("openRTSP" only)
明确要求多播流,即使服务器的“DESCRIBE”响应不指定多播地址。(注意,并非所有的服务器都将支持此功能。)(仅对于“openRTSP”)
-d <duration> specify an explicit duration
指定一个明确的持续时间
-D <maximum-inter-packet-gap> specify a maximum period of inactivity to wait before exiting
指定退出之前要等待的最长非活动状态时间
-f <frame-rate> specify the video frame rate (used only with "-q", "-4", or "-i")
指定的视频帧速率(仅用于“-q”,“-4”或“ -i”)
-F <fileName-prefix> specify a prefix for each output file name
指定每个输出文件名前缀
-g <user-agent-name> specify a user agent name to use in outgoing requests
指定输出请求中使用的用户代理名
-h <height> specify the video image height (used only with "-q", "-4", or "-i")
指定视频图像的高度(仅用于“-q”,“-4”或“ -i”)
-H output a QuickTime 'hint track' for each audio/video track (used only with "-q" or "-4")
为每个音频/视频轨道输出QuickTime的“索引轨道”
-i output a '.avi'-format file (to 'stdout', unless the "-P <interval-in-seconds>" option is also given)
输出一个“avi”格式文件(到'标准输出',除非同时有选项“-P <interval-in-seconds>”给定区间时间间隔)
-I <interface-name-or-address> specify a particular network interface on which to receive data
指定要接收数据的特定网络接口
-k <username> <password> specify a user name and password that's required to authenticate an incoming "REGISTER" command (used with "-R" only)
指定验证到来的“REGISTER”命令需要的用户名和密码(仅和“-R”使用)
-l try to compensate for packet losses (used only with "-q", "-4", or "-i")
尽量弥补丢包(仅和“-q”,“-4”或“ - i”使用)
-m output each incoming frame into a separate file
输出的每个到来的帧到一个单独的文件
-M <MIME-subtype> specify the MIME subtype of a dynamic RTP payload format for the audio codec to request from the server ("playSIP" only)
为音频编解码器指定一个动态的RTP负载格式的MIME子类型来请求服务器(仅用于“playSIP”)
-n be notified when RTP data packets start arriving
RTP数据包到达时通知
-o request the server's command options, without sending "DESCRIBE" ("openRTSP" only)
请求服务器的命令选项,而不发送“DESCRIBE”(仅用于“openRTSP”)
-O don't request the server's command options; just send "DESCRIBE" ("openRTSP" only)
不请求服务器的命令选项;只要发送“DESCRIBE”(仅用于“openRTSP”)
-p <starting-port-number> specify the client port number(s)
指定客户端的端口号
-P <interval-in-seconds> write new output files every <interval-in-seconds> seconds
每一个时间区间写新的输出文件
-q output a QuickTime '.mov'-format file (to 'stdout', unless the "-P <interval-in-seconds>" option is also given)
输出一个“.mov”格式文件(到'标准输出',除非同时有选项“-P <interval-in-seconds>”给定区间时间间隔)
-Q output 'QOS' statistics about the data stream (when the program exits)
输出关于数据流统计的QoS“(程序退出时)
-r play the RTP streams, but don't receive them
播放RTP流,但不接收他们
-R (or -R <port-number>) Waits for an incoming "REGISTER" command, specifying a "rtsp://" URL to play. This option is used instead of a "rtsp://" URL on the command line. ("openRTSP" only)
等待到来的“注册”命令,指定要播放端口号. 这个选项是用来代替命令行中的“rtsp://”URL。 (仅用于“openRTSP”)
-s <initial-seek-time> request that the server seek to the specified time (in seconds) before streaming
请求服务器在流化前搜索到指定的时间(以秒为单位) 用于“trick play”
-S <byte-offset> assume a simple RTP payload format (skipping over a special header of the specified size)
假设一个简单的RTP负载格式(跳过指定大小的特殊头)
-t stream RTP/RTCP data over TCP, rather than (the usual) UDP. ("openRTSP" only)
通过TCP流化RTP / RTCP数据,而不是通过(通常的)的UDP。 (仅用于“openRTSP”)
-T <http-port-number> like "-t", except using RTSP-over-HTTP tunneling. ("openRTSP" only)
类似“-t”,除了使用RTSP-over-HTTP隧道。 (仅用于“openRTSP”)
-u <username> <password> specify a user name and password for digest authentication
指定摘要式身份验证的用户名和密码
-U <initial-absolute-seek-time> request that the server seek to the specified absolute time (format: "YYYYMMDDTHHMMSSZ" or "YYYYMMDDTHHMMSS.<frac>Z") before streaming
请求服务器在流化前搜索到指定的绝对时间
-v play only the video stream (to 'stdout', unless the "-P <interval-in-seconds>" option is also given)
只输出视频流(到'标准输出',除非同时有选项“-P <interval-in-seconds>”给定区间时间间隔)
-V print less verbose diagnostic output
打印更加简洁诊断输出
-w <width> specify the video image width (used only with "-q", "-4", or "-i")
指定视频图像的宽度
-y try to synchronize the audio and video tracks (used only with "-q" or "-4")
尝试同步音频和视频轨道
-z <scale> request that the server scale the stream (fast-forward, slow, or reverse play)
请求服务器缩放数据流(快进,慢速,或者反向播放)
后续内容慢慢添加......