bilibili / ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
GNU General Public License v2.0
32.26k stars 8.09k forks source link

无法播放rtsp协议 视频格式H264; 音频格式pcm_alaw #3260

Open flyMan1991 opened 7 years ago

flyMan1991 commented 7 years ago

无法播放rtsp协议 视频格式H264; 音频格式pcm_alaw; 有没有配置教程: log日志如下: [rtsp @ 0x10119a200] SDP: v=0

o=admin 24612 24613 IN IP4 192.168.0.103

s=NVT

i=From NVT

c=IN IP4 0.0.0.0

t=0 0

a=control:rtsp://192.168.0.103/snl/live/1/2/

m=video 0 RTP/AVP 96

b=AS:1500

a=rtpmap:96 H264/90000

a=fmtp:96 packetization-mode=1;profile-level-id=64001e;sprop-parameter-sets=Z2QAHqw0zAsBJ//8AEAALbgoKCoAAAfQAAGGodDAC3AAATEtXeXGhgBbgAAJiWrvLhQ=,aO44MA==

a=framesize:96 704-576

a=framerate:25.0

a=control:trackID=0

a=recvonly

m=audio 0 RTP/AVP 8

a=rtpmap:8 PCMA/8000

a=fmtp:8 octet-align=1;decode_buf=400

a=control:trackID=1

a=recvonly

m=application 0 RTP/AVP 98

b=AS:10

a=rtpmap:98 vnd.onvif.metadata/90000

a=control:trackID=10

a=recvonly

[rtsp @ 0x10119a200] video codec set to: h264 [rtsp @ 0x10119a200] RTP Packetization Mode: 1 [rtsp @ 0x10119a200] RTP Profile IDC: 64 Profile IOP: 0 Level: 1e [rtsp @ 0x10119a200] Extradata set to 0x1702a1980 (size: 62)

一直卡在这里,也没有其他错误信息,请问具体怎么解决,谢谢

fanzhengfeng commented 7 years ago

export COMMON_FF_CFG_FLAGS="$COMMON_FF_CFG_FLAGS --enable-decoder=pcm_alaw"

pcm_alaw decode 打开没有 ?

flyMan1991 commented 7 years ago

已经打开,但是还是无法播放,已经设置传输协议为tcp了; 视频地址为:rtsp://admin:admin@59.53.175.163:14554/snl/live/1/2; 请给解决一下问题,谢谢 ffmpeg测试调试信息为:Could not find codec parameters for stream 0 (Video: h264, none, 704x576): unspecified pixel format Consider increasing the value for the 'analyzeduration' and 'probesize' options Input #0, rtsp, from 'rtsp://admin:admin@59.53.175.163:14554/snl/live/1/2': Metadata: title : NVT comment : From NVT Duration: N/A, bitrate: 64 kb/s Stream #0:0: Video: h264, none, 704x576, 90k tbr, 90k tbn, 180k tbc Stream #0:1: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s Stream #0:2: Data: none Unsupported codec with id 0 for input stream 2 [rtsp @ 0x7fe421002a00] UDP timeout, retrying with TCP 具体不知道问题出在那里:

muyitimha commented 6 years ago

因为你在编译ffmpeg时配置文件里的描述是不支持rtsp的

huangcy3373 commented 6 years ago

@flyMan1991 你好,请问,你这个问题后来是怎么解决的?

yjjwxy2 commented 6 years ago

@flyMan1991 也遇到这个问题。声音有但是不清楚,都是杂音根本听不清