metartc / ffmpeg-webrtc

ffmpeg-webrtc for whip and whep protocol
Apache License 2.0
56 stars 12 forks source link

使用集成metartc的ffplay 拉取SRS的webrtc流失败 #12

Open ShaolinDeng opened 1 year ago

ShaolinDeng commented 1 year ago

SRS webrtc流在 RTC播放器是OK的, 但是使用集成metartc6 的ffplay 失败

./ffplay webrtc://10.10.2.3/exam/2021091400479_topStream
ffplay version 18ec4fa Copyright (c) 2003-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --enable-libx264 --enable-gpl --extra-libs='-L/home/shaolin/gitee/ffmpeg-metartc/FFmpeg-n4.3.3/metartc6 -lmetartccore6 -lpthread -lsrtp2 -lssl -lcrypto -ldl'
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[webrtc @ 0x7f158c000bc0] webrtc_read_header, filename webrtc://10.10.2.3/exam/2021091400479_topStream
[webrtc @ 0x7f158c000bc0] webrtc_open webrtc://10.10.2.3/exam/2021091400479_topStream
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0   
srtp init success!

avinfo->sys.whipUrl==rtc/v1/whip/?app=%s&stream=%s
[webrtc @ 0x7f158c000bc0] connect failed! uri= webrtc://10.10.2.3/exam/2021091400479_topStream
[webrtc @ 0x7f158c000bc0] webrtc_open exit
[webrtc @ 0x7f158c000bc0] webrtc_read_header wait failed, Connection timed out
[webrtc @ 0x7f158c000bc0] webrtc_close
session->context.avinfo->sys.whipUrl=rtc/v1/whip/?app=%s&stream=%s
webrtc disconnect
[webrtc @ 0x7f158c000bc0] webrtc_close exit
webrtc://10.10.2.3/exam/2021091400479_topStream: Connection timed out
    nan    :  0.000 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0 

请问哪里不正确?

yflisa commented 5 months ago

这个要把代码中的服务器改成srs的就能拉通了。在 webrtc_demuxer.c 和 webrtc_muxer.c 文件中