1

这是我的 RTSP 对话:

    ANNOUNCE rtsp://216.224.181.197/bstream.sdp RTSP/1.0
    CSeq: 1
    Content-Type: application/sdp
    User-Agent: C.U.
    Authorization: Digest username="gidon", realm="null", nonce="null", uri="/bstream.sdp", response="239fcac559661c17436e427e75f3d6a0"
    Content-Length: 313

    v=0
    s=CameraStream
    m=video 5006 RTP/AVP 96
    b=RR:0
    a=rtpmap:96 H264/90000
    a=fmtp:96 packetization-mode=1;profile-level-id=42000c;sprop-parameter-sets=Z0IADJZUCg+I,aM44gA==;
    a=control:trackID=0
    m=audio 5004 RTP/AVP 96
    b=AS:128
    b=RR:0
    a=rtpmap:96 AMR/8000
    a=fmtp:96 octet-align=1;
    a=control:trackID=1


    RTSP/1.0 401 Unauthorized
    Server: DSS/6.0.3 (Build/526.3; Platform/Linux; Release/Darwin Streaming Server; State/Development; )
    Cseq: 1
    WWW-Authenticate: Digest realm="Streaming Server", nonce="e5c0b7aff71820962027d73f55fe48c8"


    ANNOUNCE rtsp://216.224.181.197/bstream.sdp RTSP/1.0
    CSeq: 2
    Content-Type: application/sdp
    User-Agent: C.U.
    Authorization: Digest username="gidon", realm="Streaming Server", nonce="e5c0b7aff71820962027d73f55fe48c8", uri="/bstream.sdp", response="6e3aa3be3f5c04a324491fe9ab341918"
    Content-Length: 313

    v=0
    s=CameraStream
    m=video 5006 RTP/AVP 96
    b=RR:0
    a=rtpmap:96 H264/90000
    a=fmtp:96 packetization-mode=1;profile-level-id=42000c;sprop-parameter-sets=Z0IADJZUCg+I,aM44gA==;
    a=control:trackID=0
    m=audio 5004 RTP/AVP 96
    b=AS:128
    b=RR:0
    a=rtpmap:96 AMR/8000
    a=fmtp:96 octet-align=1;
    a=control:trackID=1


    RTSP/1.0 200 OK
    Server: DSS/6.0.3 (Build/526.3; Platform/Linux; Release/Darwin Streaming Server; State/Development; )
    Cseq: 2


    OPTIONS * RTSP/1.0
    CSeq: 3
    User-Agent: C.U.
    Authorization: Digest username="gidon", realm="Streaming Server", nonce="e5c0b7aff71820962027d73f55fe48c8", uri="/bstream.sdp", response="0042e3981657cc43737f3076b241f422"


    RTSP/1.0 200 OK
    Server: DSS/6.0.3 (Build/526.3; Platform/Linux; Release/Darwin Streaming Server; State/Development; )
    Cseq: 3
    Public: DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, OPTIONS, ANNOUNCE, RECORD


    SETUP rtsp://216.224.181.197/bstream.sdp/trackID=0 RTSP/1.0
    CSeq: 4
    Transport: RTP/AVP;unicast;client_port=6970-6971;mode=record
    User-Agent: C.U.
    Accept-Language: en-US
    Authorization: Digest username="gidon", realm="Streaming Server", nonce="e5c0b7aff71820962027d73f55fe48c8", uri="/bstream.sdp", response="a9c762c9c456f85d3b913f5b6365e44d"


    RTSP/1.0 404 Not Found
    Server: DSS/6.0.3 (Build/526.3; Platform/Linux; Release/Darwin Streaming Server; State/Development; )
    Cseq: 4
    Connection: Close

这不是服务器错误,我之前已经让它与不同的客户端一起工作。

不是我正在实施我自己的客户......

当我打电话给 ANNOUNCE 时,我会返回 OK (200)

但是当我尝试调用 SETUP 时,我得到的并不存在(404)

为什么我得到 404?

DSS 配置:

<?xml version ="1.0"?>
<!-- The Document Type Definition (DTD) for the file -->
<!DOCTYPE CONFIGURATION [
<!ELEMENT CONFIGURATION (SERVER, MODULE*)>
<!ELEMENT SERVER (PREF|LIST-PREF|OBJECT|LIST-OBJECT)*>
<!ELEMENT MODULE (PREF|LIST-PREF|OBJECT|LIST-OBJECT)*>
<!ATTLIST MODULE
    NAME CDATA #REQUIRED>
<!ELEMENT PREF (#PCDATA)>
<!ATTLIST PREF
    NAME CDATA #REQUIRED
    TYPE (UInt8|SInt8|UInt16|SInt16|UInt32|SInt32|UInt64|SInt64|Float32|Float64|Bool16|Bool8|char) "char">
<!ELEMENT LIST-PREF (VALUE*)>
<!ELEMENT VALUE (#PCDATA)>
<!ATTLIST LIST-PREF
    NAME CDATA #REQUIRED
    TYPE  (UInt8|SInt8|UInt16|SInt16|UInt32|SInt32|UInt64|SInt64|Float32|Float64|Bool16|Bool8|char) "char">
<!ELEMENT OBJECT (PREF|LIST-PREF|OBJECT|LIST-OBJECT)*>
<!ATTLIST OBJECT
    NAME CDATA #REQUIRED>
<!ELEMENT LIST-OBJECT (OBJECT-VALUE*)>
<!ELEMENT OBJECT-VALUE (PREF|LIST-PREF|OBJECT|LIST-OBJECT)*>
<!ATTLIST LIST-OBJECT
    NAME CDATA #REQUIRED>
]>
<CONFIGURATION>
    <SERVER>
        <PREF NAME="rtsp_timeout" TYPE="UInt32" >0</PREF>
        <PREF NAME="real_rtsp_timeout" TYPE="UInt32" >180</PREF>
        <PREF NAME="rtp_timeout" TYPE="UInt32" >120</PREF>
        <PREF NAME="maximum_connections" TYPE="SInt32" >1000</PREF>
        <PREF NAME="maximum_bandwidth" TYPE="SInt32" >102400</PREF>
        <PREF NAME="movie_folder" >/usr/local/movies/</PREF>
        <PREF NAME="bind_ip_addr" >0</PREF>
        <PREF NAME="break_on_assert" TYPE="Bool16" >false</PREF>
        <PREF NAME="auto_restart" TYPE="Bool16" >true</PREF>
        <PREF NAME="total_bytes_update" TYPE="UInt32" >1</PREF>
        <PREF NAME="average_bandwidth_update" TYPE="UInt32" >60</PREF>
        <PREF NAME="safe_play_duration" TYPE="UInt32" >600</PREF>
        <PREF NAME="module_folder" >/usr/local/sbin/StreamingServerModules/</PREF>
        <PREF NAME="error_logfile_name" >Error</PREF>
        <PREF NAME="error_logfile_dir" >/var/streaming/logs/</PREF>
        <PREF NAME="error_logfile_interval" TYPE="UInt32" >7</PREF>
        <PREF NAME="error_logfile_size" TYPE="UInt32" >256000</PREF>
        <PREF NAME="error_logfile_verbosity" TYPE="UInt32" >2</PREF>
        <PREF NAME="screen_logging" TYPE="Bool16" >true</PREF>
        <PREF NAME="error_logging" TYPE="Bool16" >true</PREF>
        <PREF NAME="drop_all_video_delay" TYPE="SInt32" >1750</PREF>
        <PREF NAME="start_thinning_delay" TYPE="SInt32" >0</PREF>
        <PREF NAME="large_window_size" TYPE="UInt32" >64</PREF>
        <PREF NAME="window_size_threshold" TYPE="UInt32" >200</PREF>
        <PREF NAME="min_tcp_buffer_size" TYPE="UInt32" >8192</PREF>
        <PREF NAME="max_tcp_buffer_size" TYPE="UInt32" >200000</PREF>
        <PREF NAME="tcp_seconds_to_buffer" TYPE="Float32" >.5</PREF>
        <PREF NAME="do_report_http_connection_ip_address" TYPE="Bool16" >false</PREF>
        <PREF NAME="default_authorization_realm" >Streaming Server</PREF>
        <PREF NAME="run_user_name" >qtss</PREF>
        <PREF NAME="run_group_name" >qtss</PREF>
        <PREF NAME="append_source_addr_in_transport" TYPE="Bool16" >false</PREF>
        <LIST-PREF NAME="rtsp_port" TYPE="UInt16" >
            <VALUE>554</VALUE>
            <VALUE>7070</VALUE>
            <VALUE>8000</VALUE>
            <VALUE>8001</VALUE>
        </LIST-PREF>
        <PREF NAME="max_retransmit_delay" TYPE="UInt32" >500</PREF>
        <PREF NAME="small_window_size" TYPE="UInt32" >24</PREF>
        <PREF NAME="ack_logging_enabled" TYPE="Bool16" >false</PREF>
        <PREF NAME="rtcp_poll_interval" TYPE="UInt32" >100</PREF>
        <PREF NAME="rtcp_rcv_buf_size" TYPE="UInt32" >768</PREF>
        <PREF NAME="send_interval" TYPE="UInt32" >50</PREF>
        <PREF NAME="thick_all_the_way_delay" TYPE="SInt32" >-2000</PREF>
        <PREF NAME="alt_transport_src_ipaddr" ></PREF>
        <PREF NAME="max_send_ahead_time" TYPE="UInt32" >25</PREF>
        <PREF NAME="reliable_udp_slow_start" TYPE="Bool16" >true</PREF>
        <PREF NAME="auto_delete_sdp_files" TYPE="Bool16" >false</PREF>
        <PREF NAME="authentication_scheme" >digest</PREF>
        <PREF NAME="sdp_file_delete_interval_seconds" TYPE="UInt32" >10</PREF>
        <PREF NAME="auto_start" TYPE="Bool16" >false</PREF>
        <PREF NAME="reliable_udp" TYPE="Bool16" >true</PREF>
        <PREF NAME="reliable_udp_dirs" >/</PREF>
        <PREF NAME="reliable_udp_printfs" TYPE="Bool16" >false</PREF>
        <PREF NAME="drop_all_packets_delay" TYPE="SInt32" >2500</PREF>
        <PREF NAME="thin_all_the_way_delay" TYPE="SInt32" >1500</PREF>
        <PREF NAME="always_thin_delay" TYPE="SInt32" >750</PREF>
        <PREF NAME="start_thicking_delay" TYPE="SInt32" >250</PREF>
        <PREF NAME="quality_check_interval" TYPE="UInt32" >1000</PREF>
        <PREF NAME="RTSP_error_message" TYPE="Bool16" >false</PREF>
        <PREF NAME="RTSP_debug_printfs" TYPE="Bool16" >false</PREF>
        <PREF NAME="enable_monitor_stats_file" TYPE="Bool16" >false</PREF>
        <PREF NAME="monitor_stats_file_interval_seconds" TYPE="UInt32" >10</PREF>
        <PREF NAME="monitor_stats_file_name" >server_status</PREF>
        <PREF NAME="enable_packet_header_printfs" TYPE="Bool16" >false</PREF>
        <PREF NAME="packet_header_printf_options" >rtp;rr;sr;app;ack;</PREF>
        <PREF NAME="overbuffer_rate" TYPE="Float32" >2.0</PREF>
        <PREF NAME="medium_window_size" TYPE="UInt32" >48</PREF>
        <PREF NAME="window_size_max_threshold" TYPE="UInt32" >1000</PREF>
        <PREF NAME="RTSP_server_info" TYPE="Bool16" >true</PREF>
        <PREF NAME="run_num_threads" TYPE="UInt32" >0</PREF>
        <PREF NAME="pid_file" >/var/run/DarwinStreamingServer.pid</PREF>
        <PREF NAME="force_logs_close_on_write" TYPE="Bool16" >false</PREF>
        <PREF NAME="disable_thinning" TYPE="Bool16" >false</PREF>
        <LIST-PREF NAME="player_requires_rtp_header_info" >
            <VALUE>Nokia</VALUE>
            <VALUE>Real</VALUE>
        </LIST-PREF>
        <LIST-PREF NAME="player_requires_bandwidth_adjustment" >
            <VALUE>Nokia</VALUE>
            <VALUE>Real</VALUE>
        </LIST-PREF>
        <LIST-PREF NAME="player_requires_no_pause_time_adjustment" >
            <VALUE>Nokia</VALUE>
            <VALUE>Real</VALUE>
            <VALUE>PVPlayer</VALUE>
        </LIST-PREF>
        <PREF NAME="enable_3gpp_protocol" TYPE="Bool16" >true</PREF>
        <PREF NAME="enable_3gpp_protocol_rate_adaptation" TYPE="Bool16" >true</PREF>
        <PREF NAME="3gpp_protocol_rate_adaptation_report_frequency" TYPE="UInt16" >1</PREF>
        <PREF NAME="default_stream_quality" TYPE="UInt16" >0</PREF>
        <PREF NAME="player_requires_rtp_start_time_adjust" >Real</PREF>
        <PREF NAME="enable_3gpp_debug_printfs" TYPE="Bool16" >false</PREF>
        <PREF NAME="enable_udp_monitor_stream" TYPE="Bool16" >false</PREF>
        <PREF NAME="udp_monitor_video_port" TYPE="UInt16" >5002</PREF>
        <PREF NAME="udp_monitor_audio_port" TYPE="UInt16" >5004</PREF>
        <PREF NAME="udp_monitor_dest_ip" >127.0.0.1</PREF>
        <PREF NAME="udp_monitor_src_ip" >0.0.0.0</PREF>
        <PREF NAME="enable_allow_guest_default" TYPE="Bool16" >true</PREF>
        <PREF NAME="run_num_rtsp_threads" TYPE="UInt32" >1</PREF>
        <PREF NAME="player_requires_disable_3gpp_rate_adapt" ></PREF>
        <PREF NAME="player_requires_3gpp_target_time" ></PREF>
        <PREF NAME="3gpp_target_time_milliseconds" TYPE="UInt32" >3000</PREF>
        <PREF NAME="player_requires_disable_thinning" ></PREF>
    </SERVER>
    <MODULE NAME="QTSSErrorLogModule" ></MODULE>
    <MODULE NAME="QTSSFileModule" >
        <PREF NAME="flow_control_probe_interval" TYPE="UInt32" >10</PREF>
        <PREF NAME="max_allowed_speed" TYPE="Float32" >4.000000</PREF>
        <PREF NAME="enable_shared_file_buffers" TYPE="Bool16" >true</PREF>
        <PREF NAME="enable_private_file_buffers" TYPE="Bool16" >false</PREF>
        <PREF NAME="num_shared_buffer_increase_per_session" TYPE="UInt32" >8</PREF>
        <PREF NAME="shared_buffer_unit_k_size" TYPE="UInt32" >256</PREF>
        <PREF NAME="private_buffer_unit_k_size" TYPE="UInt32" >256</PREF>
        <PREF NAME="num_shared_buffer_units_per_buffer" TYPE="UInt32" >1</PREF>
        <PREF NAME="num_private_buffer_units_per_buffer" TYPE="UInt32" >1</PREF>
        <PREF NAME="max_shared_buffer_units_per_buffer" TYPE="UInt32" >8</PREF>
        <PREF NAME="max_private_buffer_units_per_buffer" TYPE="UInt32" >8</PREF>
        <PREF NAME="add_seconds_to_client_buffer_delay" TYPE="Float32" >0.000000</PREF>
        <PREF NAME="record_movie_file_sdp" TYPE="Bool16" >false</PREF>
        <PREF NAME="enable_movie_file_sdp" TYPE="Bool16" >false</PREF>
        <PREF NAME="enable_player_compatibility" TYPE="Bool16" >true</PREF>
        <PREF NAME="compatibility_adjust_sdp_media_bandwidth_percent" TYPE="UInt32" >50</PREF>
        <PREF NAME="compatibility_adjust_rtp_start_time_milli" TYPE="SInt64" >500</PREF>
        <PREF NAME="allow_invalid_hint_track_refs" TYPE="Bool16" >false</PREF>
        <PREF NAME="sdp_url" ></PREF>
        <PREF NAME="admin_email" ></PREF>
    </MODULE>
    <MODULE NAME="QTSSReflectorModule" >
        <PREF NAME="reflector_bucket_offset_delay_msec" TYPE="UInt32" >73</PREF>
        <PREF NAME="reflector_buffer_size_sec" TYPE="UInt32" >10</PREF>
        <PREF NAME="reflector_use_in_packet_receive_time" TYPE="Bool16" >false</PREF>
        <PREF NAME="reflector_in_packet_max_receive_sec" TYPE="UInt32" >60</PREF>
        <PREF NAME="reflector_rtp_info_offset_msec" TYPE="UInt32" >500</PREF>
        <PREF NAME="disable_rtp_play_info" TYPE="Bool16" >false</PREF>
        <PREF NAME="allow_non_sdp_urls" TYPE="Bool16" >true</PREF>
        <PREF NAME="enable_broadcast_announce" TYPE="Bool16" >true</PREF>
        <PREF NAME="enable_broadcast_push" TYPE="Bool16" >true</PREF>
        <PREF NAME="max_broadcast_announce_duration_secs" TYPE="UInt32" >0</PREF>
        <PREF NAME="allow_duplicate_broadcasts" TYPE="Bool16" >false</PREF>
        <PREF NAME="enforce_static_sdp_port_range" TYPE="Bool16" >false</PREF>
        <PREF NAME="minimum_static_sdp_port" TYPE="UInt16" >20000</PREF>
        <PREF NAME="maximum_static_sdp_port" TYPE="UInt16" >65535</PREF>
        <PREF NAME="kill_clients_when_broadcast_stops" TYPE="Bool16" >false</PREF>
        <PREF NAME="use_one_SSRC_per_stream" TYPE="Bool16" >true</PREF>
        <PREF NAME="timeout_stream_SSRC_secs" TYPE="UInt32" >30</PREF>
        <PREF NAME="timeout_broadcaster_session_secs" TYPE="UInt32" >20</PREF>
        <PREF NAME="authenticate_local_broadcast" TYPE="Bool16" >false</PREF>
        <PREF NAME="disable_overbuffering" TYPE="Bool16" >false</PREF>
        <PREF NAME="allow_broadcasts" TYPE="Bool16" >true</PREF>
        <PREF NAME="allow_announced_kill" TYPE="Bool16" >true</PREF>
        <PREF NAME="enable_play_response_range_header" TYPE="Bool16" >true</PREF>
        <PREF NAME="enable_player_compatibility" TYPE="Bool16" >true</PREF>
        <PREF NAME="compatibility_adjust_sdp_media_bandwidth_percent" TYPE="UInt32" >100</PREF>
        <PREF NAME="force_rtp_info_sequence_and_time" TYPE="Bool16" >false</PREF>
        <PREF NAME="BroadcasterGroup" >broadcaster</PREF>
        <PREF NAME="redirect_broadcast_keyword" ></PREF>
        <PREF NAME="redirect_broadcasts_dir" ></PREF>
        <PREF NAME="broadcast_dir_list" ></PREF>
        <PREF NAME="ip_allow_list" >127.0.0.*</PREF>
    </MODULE>
    <MODULE NAME="QTSSRelayModule" >
        <PREF NAME="relay_prefs_file" >/etc/streaming/relayconfig.xml</PREF>
        <PREF NAME="relay_stats_url" ></PREF>
    </MODULE>
    <MODULE NAME="QTSSAccessLogModule" >
        <PREF NAME="request_logging" TYPE="Bool16" >true</PREF>
        <PREF NAME="request_logfile_size" TYPE="UInt32" >10240000</PREF>
        <PREF NAME="request_logfile_interval" TYPE="UInt32" >7</PREF>
        <PREF NAME="request_logtime_in_gmt" TYPE="Bool16" >true</PREF>
        <PREF NAME="request_logfile_dir" >/var/streaming/logs/</PREF>
        <PREF NAME="request_logfile_name" >StreamingServer</PREF>
    </MODULE>
    <MODULE NAME="QTSSFlowControlModule" >
        <PREF NAME="loss_thin_tolerance" TYPE="UInt32" >30</PREF>
        <PREF NAME="num_losses_to_thin" TYPE="UInt32" >3</PREF>
        <PREF NAME="loss_thick_tolerance" TYPE="UInt32" >5</PREF>
        <PREF NAME="num_losses_to_thick" TYPE="UInt32" >6</PREF>
        <PREF NAME="num_worses_to_thin" TYPE="UInt32" >2</PREF>
        <PREF NAME="flow_control_udp_thinning_module_enabled" TYPE="Bool16" >true</PREF>
    </MODULE>
    <MODULE NAME="QTSSPosixFileSysModule" ></MODULE>
    <MODULE NAME="QTSSAdminModule" >
        <PREF NAME="IPAccessList" >127.0.0.*</PREF>
        <PREF NAME="Authenticate" TYPE="Bool16" >true</PREF>
        <PREF NAME="LocalAccessOnly" TYPE="Bool16" >true</PREF>
        <PREF NAME="RequestTimeIntervalMilli" TYPE="UInt32" >50</PREF>
        <PREF NAME="enable_remote_admin" TYPE="Bool16" >true</PREF>
        <PREF NAME="AdministratorGroup" >admin</PREF>
    </MODULE>
    <MODULE NAME="QTSSMP3StreamingModule" >
        <PREF NAME="mp3_request_logfile_name" >mp3_access</PREF>
        <PREF NAME="mp3_request_logfile_dir" >/var/streaming/logs/</PREF>
        <PREF NAME="mp3_streaming_enabled" TYPE="Bool16" >true</PREF>
        <PREF NAME="mp3_broadcast_password" >*****</PREF>
        <PREF NAME="mp3_broadcast_buffer_size" TYPE="UInt32" >8192</PREF>
        <PREF NAME="mp3_max_flow_control_time" TYPE="SInt32" >10000</PREF>
        <PREF NAME="mp3_request_logging" TYPE="Bool16" >true</PREF>
        <PREF NAME="mp3_request_logfile_size" TYPE="UInt32" >10240000</PREF>
        <PREF NAME="mp3_request_logfile_interval" TYPE="UInt32" >7</PREF>
        <PREF NAME="mp3_request_logtime_in_gmt" TYPE="Bool16" >true</PREF>
    </MODULE>
    <MODULE NAME="QTSSAccessModule" >
        <PREF NAME="modAccess_enabled" TYPE="Bool16" >true</PREF>
        <PREF NAME="modAccess_usersfilepath" >/etc/streaming/qtusers</PREF>
        <PREF NAME="modAccess_groupsfilepath" >/etc/streaming/qtgroups</PREF>
        <PREF NAME="modAccess_qtaccessfilename" >qtaccess</PREF>
    </MODULE>
</CONFIGURATION>
4

2 回答 2

3

添加

c=IN IP4 216.224.181.197

修复了问题。

于 2012-06-26T17:24:54.577 回答
0

也许是为了

, uri="/bstream.sdp",

/bstream.sdp 文件存在吗?

您尝试过使用 avi、wmv、rmvb 或 mp4 文件吗?

于 2012-06-26T09:08:15.873 回答