bluenviron / mediamtx

Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
MIT License
12.19k stars 1.53k forks source link

ERR: sdp: invalid syntax `o=[-2208991488 2208991488 IN IP4 10.255.1.119] #231

Closed Kiwa21 closed 3 years ago

Kiwa21 commented 3 years ago

Which version are you using?

v0.14.2

Which operating system are you using?

OS

Architecture

Describe the issue

I saw there are some similar issues which need to add the camera config into the go library.

I have an IP camera streaming at rtsp://10.255.1.119:554/steam0 VLC and other player can open the stream directly with rtsp://10.255.1.119:554 or rtsp://10.255.1.119:554/steam0. When launching RTPSS with a path "redirect" targetting this rtsp stream, I get the following error :

2021/03/09 17:03:04 [I] [0/0/0] [path redirect] [rtsp source] connecting 2021/03/09 17:03:05 [I] [0/0/0] [path redirect] [rtsp source] ERR: sdp: invalid syntaxo=[-2208991488 2208991488 IN IP4 10.255.1.119](o=-2208991488 2208991488 IN IP4 10.255.1.119) 2021/03/09 17:03:08 [I] [0/0/0] [path redirect] [rtsp source] stopped

The SDP :

` Session Description Protocol Session Description Protocol Version (v): 0 Owner/Creator, Session Id (o): -2208991488 2208991488 IN IP4 10.255.1.119 Owner Username: -2208991488 Session ID: 2208991488 Session Version: IN Owner Network Type: IP4 Owner Address Type: 10.255.1.119 Owner Address: -2208991488 2208991488 IN IP4 10.255.1.119 Session Name (s): Unnamed Session Information (i): N/A Connection Information (c): IN IP4 10.255.1.54 Connection Network Type: IN Connection Address Type: IP4 Connection Address: 10.255.1.54 Time Description, active time (t): 0 0 Session Start Time: 0 Session Stop Time: 0 Session Attribute (a): recvonly Media Description, name and address (m): video 5004 RTP/AVP 96 Media Type: video Media Port: 5004 Media Protocol: RTP/AVP Media Format: DynamicRTP-Type-96 Bandwidth Information (b): RR:0 Bandwidth Modifier: RR Bandwidth Value: 0 Media Attribute (a): rtpmap:96 H264/90000 Media Attribute Fieldname: rtpmap Media Format: 96 MIME Type: H264 Sample Rate: 90000 Media Attribute (a): fmtp:96 packetization-mode=1;profile-level-id=64001f;sprop-parameter-sets=Z2QAH6wsaoFAFum4CAgIEAAAAAFo7jywAAAAAQY=,aO48sAAA; Media Attribute Fieldname: fmtp Media Format: 96 [H264] Media format specific parameters: packetization-mode=1 [Packetization mode: Non-interleaved mode (1)] Media format specific parameters: profile-level-id=64001f Profile: 64001f 0110 0100 = Profile_idc: High profile (100) 0... .... = Constraint_set0_flag: 0 .0.. .... = Constraint_set1_flag: 0 ..0. .... = Constraint_set2_flag: 0 ...0 .... = Constraint_set3_flag: 0 .... 0... = Constraint_set4_flag: 0 .... .0.. = Constraint_set5_flag: 0 .... ..00 = Reserved_zero_2bits: 0 0001 1111 = Level_id: 31 [Level 3,1 14 Mb/s] Media format specific parameters: sprop-parameter-sets=Z2QAH6wsaoFAFum4CAgIEAAAAAFo7jywAAAAAQY=,aO48sAAA NAL unit 1 string: Z2QAH6wsaoFAFum4CAgIEAAAAAFo7jywAAAAAQY= NAL unit: 6764001fac2c6a814016e9b808080810 0... .... = Forbidden_zero_bit: 0 .11. .... = Nal_ref_idc: 3 ...0 0111 = Nal_unit_type: Sequence parameter set (7) 0110 0100 = Profile_idc: High profile (100) 0... .... = Constraint_set0_flag: 0 .0.. .... = Constraint_set1_flag: 0 ..0. .... = Constraint_set2_flag: 0 ...0 .... = Constraint_set3_flag: 0 .... 0... = Constraint_set4_flag: 0 .... .0.. = Constraint_set5_flag: 0 .... ..00 = Reserved_zero_2bits: 0 0001 1111 = Level_id: 31 [Level 3,1 14 Mb/s] 1... .... = seq_parameter_set_id: 0 .010 .... = chroma_format_id: 1 .... 1... = bit_depth_luma_minus8: 0 .... .1.. = bit_depth_chroma_minus8: 0 .... ..0. = qpprime_y_zero_transform_bypass_flag: 0 .... ...0 = seq_scaling_matrix_present_flag: 0 0010 1... = log2_max_frame_num_minus4: 4 .... .1.. = pic_order_cnt_type: 0 .... ..00 0110 1... = log2_max_pic_order_cnt_lsb_minus4: 12 .... .010 = num_ref_frames: 1 1... .... = gaps_in_frame_num_value_allowed_flag: 1 .000 0001 0100 00.. = pic_width_in_mbs_minus1: 79 .... ..00 0001 0110 1... .... = pic_height_in_map_units_minus1: 44 .1.. .... = frame_mbs_only_flag: 1 ..1. .... = direct_8x8_inference_flag: 1 ...0 .... = frame_cropping_flag: 0 .... 1... = vui_parameters_present_flag: 1 .... .0.. = aspect_ratio_info_present_flag: 0 .... ..0. = overscan_info_present_flag: 0 .... ...1 = video_signal_type_present_flag: 1

  1. .... = video_format: Unspecified video format (5) ...1 .... = video_full_range_flag: 1 .... 1... = colour_description_present_flag: 1 .... .000 0000 1... = colour_primaries: 1 .... .000 0000 1... = transfer_characteristics: 1 .... .000 0000 1... = matrix_coefficients: 1 .... .0.. = chroma_loc_info_present_flag: 0 .... ..0. = timing_info_present_flag: 0 .... ...0 = nal_hrd_parameters_present_flag: 0 0... .... = vcl_hrd_parameters_present_flag: 0 .0.. .... = pic_struct_present_flag: 0 ..0. .... = bitstream_restriction_flag: 0 ...1 .... = rbsp_stop_bit: 1 .... 0000 = rbsp_trailing_bits: 0 NAL unit: 0000000168ee3cb00000000106 0... .... = Forbidden_zero_bit: 0 .11. .... = Nal_ref_idc: 3 ...0 1000 = Nal_unit_type: Picture parameter set (8) 1... .... = pic_parameter_set_id: 0 .1.. .... = seq_parameter_set_id: 0 ..1. .... = entropy_coding_mode_flag: 1 ...0 .... = pic_order_present_flag: 0 .... 1... = num_slice_groups_minus1: 0 .... .1.. = num_ref_idx_l0_active_minus1: 0 .... ..1. = num_ref_idx_l1_active_minus1: 0 .... ...0 = weighted_pred_flag: 0 00.. .... = weighted_bipred_idc: 0 ..1. .... = pic_init_qp_minus26: 0 ...1 .... = pic_init_qs_minus26: 0 .... 1... = chroma_qp_index_offset: 0 .... .1.. = deblocking_filter_control_present_flag: 1 .... ..0. = constrained_intra_pred_flag: 0 .... ...0 = redundant_pic_cnt_present_flag: 0 1... .... = transform_8x8_mode_flag: 1 .0.. .... = pic_scaling_matrix_present_flag: 0 ..1. .... = second_chroma_qp_index_offset: 0 ...1 .... = rbsp_stop_bit: 1 .... 0000 = rbsp_trailing_bits: 0 NAL unit 2 string: aO48sAAA NAL unit: 68ee3cb00000 0... .... = Forbidden_zero_bit: 0 .11. .... = Nal_ref_idc: 3 ...0 1000 = Nal_unit_type: Picture parameter set (8) 1... .... = pic_parameter_set_id: 0 .1.. .... = seq_parameter_set_id: 0 ..1. .... = entropy_coding_mode_flag: 1 ...0 .... = pic_order_present_flag: 0 .... 1... = num_slice_groups_minus1: 0 .... .1.. = num_ref_idx_l0_active_minus1: 0 .... ..1. = num_ref_idx_l1_active_minus1: 0 .... ...0 = weighted_pred_flag: 0 00.. .... = weighted_bipred_idc: 0 ..1. .... = pic_init_qp_minus26: 0 ...1 .... = pic_init_qs_minus26: 0 .... 1... = chroma_qp_index_offset: 0 .... .1.. = deblocking_filter_control_present_flag: 1 .... ..0. = constrained_intra_pred_flag: 0 .... ...0 = redundant_pic_cnt_present_flag: 0 1... .... = transform_8x8_mode_flag: 1 .0.. .... = pic_scaling_matrix_present_flag: 0 ..1. .... = second_chroma_qp_index_offset: 0 ...1 .... = rbsp_stop_bit: 1 .... 0000 = rbsp_trailing_bits: 0 Media format specific parameters: Media Attribute (a): control:trackID=0 Media Attribute Fieldname: control Media Attribute Value: trackID=0

`

Did you attach a network dump?

I can do one if you need more info !

Thanks !!

Kiwa21 commented 3 years ago

By the way, the stream is configured to be RTSP 720p H264 but it can also be 1080p and/or H265. Not sure if it has an impact

aler9 commented 3 years ago

Hello, this can be fixed in a very short period of time, but i need a dump of the SDP in native format - to generate it, it's enough to set logLevel: debug inside the configuration file, and post the log. Thanks

Kiwa21 commented 3 years ago

Here is the log, thanks !

rtsp-simple-server.log.txt

aler9 commented 3 years ago

In the log, the error about the SDP is gone, while there's another error related to the UDP protocol.

Regarding the former problem, i'd like to solve it but i need a log against the previous camera.

Regarding the new problem, switch to the TCP protocol by using

paths:
  cam:
    source: rtsp://myurl
    sourceProtocol: tcp
aler9 commented 3 years ago

BTW, since v0.15.2 it's not necessary anymore to manually switch to TCP, since this is done automatically when no UDP packets are received after a timeout.

aler9 commented 3 years ago

This should be fixed in newer releases, in case it's not, feel free to post again.

github-actions[bot] commented 1 year ago

This issue is being locked automatically because it has been closed for more than 6 months. Please open a new issue in case you encounter a similar problem.