Closed climlove closed 1 week ago
我播放online samples里的东西好像也只有声音画面不会动
rtsp 没有经过严格测试,只是保留了原版ijk的逻辑,你那能否提供一个稳定复现的源给我? 不方便公开的话,可以发我邮箱。
我这边是自己机器发送出来的源,所以给不了你,用你打包好的ijk包播放没有问题,但是用demo是有问题的,我想稍微改改里面的代码 编译自己的包。
demo使用的是源码,打的包也是基于这个源码的,无非是Release和Debug的区别,你跑demo时改成Release试试。
改成release也不行,只有第一帧出来,后面就一直丢包了。
用你打包的framework就没有问题。。不知道问题出在哪里
我是在14系统上打的包,换成14系统呢
打包很简单,你自己也能打,调用 ./build-framework.sh 就行
我系统是14.5 xcode版本是16
为啥把 videotoolbox_hwaccel 设置成 0 ?确定要用软解?开启debug日志,发个完整的日志。
我是根据您之前问题的回答来的 ===== custom modules begin ===== [0;33mskip demuxer : ijklivehook (duplicated) [0m===== custom modules end ===== [IJKMEDIA]remove 'timeout' option for rtmp. [IJKMEDIA]===== versions ===== [IJKMEDIA]ijkplayer : k0.11.6 [IJKMEDIA]FFmpeg : n6.1.1-19-ga0f2c92 [IJKMEDIA]libavutil : 58.29.100 [IJKMEDIA]libavcodec : 60.31.102 [IJKMEDIA]libavformat : 60.16.100 [IJKMEDIA]libswscale : 7.5.100 [IJKMEDIA]libswresample: 4.12.100 [IJKMEDIA]===== options ===== [IJKMEDIA]player-opts : packet-buffering = 0 [IJKMEDIA]player-opts : overlay-format = fcc-_es2 [IJKMEDIA]player-opts : infbuf = 1 [IJKMEDIA]player-opts : videotoolbox_hwaccel = 0 [IJKMEDIA]player-opts : vol = 256 [IJKMEDIA]player-opts : maxx-buffer-size = 1024 [IJKMEDIA]player-opts : video-pictq-size = 3 [IJKMEDIA]player-opts : max-fps = 60 [IJKMEDIA]player-opts : framedrop = 1 [IJKMEDIA]player-opts : start-on-prepared = 1 [IJKMEDIA]format-opts : ijkapplication = 0x104526880 [IJKMEDIA]format-opts : ijkiomanager = 4367511776 [IJKMEDIA]format-opts : protocol_whitelist = ijkio,ijkhttphook,concat,http,tcp,https,tls,file,bluray,dvd,rtmp,rtsp,rtp,srtp,udp [IJKMEDIA]format-opts : probesize = 10240 [IJKMEDIA]format-opts : analyzemaxduration = 100 [IJKMEDIA]format-opts : flush_packets = 1 [IJKMEDIA]format-opts : auto_convert = 0 [IJKMEDIA]format-opts : safe = 0 [IJKMEDIA]format-opts : reconnect = 1 [IJKMEDIA]format-opts : user_agent = ijkplayer [IJKMEDIA]codec-opts : skip_loop_filter = 0 [IJKMEDIA]codec-opts : skip_frame = 0 [IJKMEDIA]=================== [IJKMEDIA]remove 'timeout' option for rtmp. [IJKMEDIA]dns getaddrinfo uri = 192.168.1.254 [IJKMEDIA]tcp did open uri = tcp://192.168.1.254:554?timeout=0, ip = 2024-11-15 15:54:50.126424+0800 IJKMediaDemo[8997:434318] [si_destination_compare] send failed: Invalid argument 2024-11-15 15:54:50.126528+0800 IJKMediaDemo[8997:434318] [si_destination_compare] send failed: Undefined error: 0 [IJKMEDIA]Option ijkapplication not found. [IJKMEDIA]Stream #0: not enough frames to estimate rate; consider increasing probesize [IJKMEDIA]max_frame_duration: 10.000 [IJKMEDIA]Input #0, rtsp, from 'rtsp://192.168.1.254:554/xxx.mov': [IJKMEDIA] Metadata: [IJKMEDIA] title : [IJKMEDIA]Nvt RTSP, streamed by the LIVE555 Media Server [IJKMEDIA] comment : [IJKMEDIA]00000002 [IJKMEDIA] Duration: [IJKMEDIA]N/A[IJKMEDIA], start: [IJKMEDIA]0.000000[IJKMEDIA], bitrate: [IJKMEDIA]N/A [IJKMEDIA] Stream #0:0[IJKMEDIA]: Video: h264, yuv420p(progressive), 864x480[IJKMEDIA], [IJKMEDIA]90k tbr, [IJKMEDIA]90k tbn [IJKMEDIA]videotoolbox hwaccel switch:off [IJKMEDIA]VideoCodec: avcodec, h264 [IJKMEDIA]auto decision max buffer size:27MB [IJKMEDIA]Playback rate: 1.000000 2024-11-15 15:54:50.213418+0800 IJKMediaDemo[8997:433884] mediaIsPreparedToPlayDidChange 2024-11-15 15:54:50.213523+0800 IJKMediaDemo[8997:433884] loadStateDidChange: IJKMPMovieLoadStatePlaythroughOK: 3 2024-11-15 15:54:50.214034+0800 IJKMediaDemo[8997:433884] IJKMPMoviePlayBackStateDidChange 1: playing [IJKMEDIA]render pipeline:yuv420pFragmentShader,fullRange:1,matrix:BT709[IJKMEDIA]max delay reached. need to consume packet [IJKMEDIA]RTP: missed 6 packets
设置成1 和0 都都一样,只有第一帧的画面
[IJKMEDIA]===== custom modules begin ===== [IJKMEDIA]skip demuxer : ijklivehook (duplicated) [IJKMEDIA]===== custom modules end ===== [IJKMEDIA]ijkmp_set_inject_opaque(0x2826b9d40) [IJKMEDIA]ijkmp_set_inject_opaque()=void [IJKMEDIA]ijkmp_set_ijkio_inject_opaque(0x2826b9d40) [IJKMEDIA]ijkmp_set_ijkio_inject_opaque()=void [IJKMEDIA]ijkmp_ios_set_view(glView=0x101045e00) [IJKMEDIA]ijkmp_ios_set_view(glView=0x101045e00)=void [IJKMEDIA]ijkmp_set_data_source(url="rtsp://192.168.1.254:554/xxx.mov") [IJKMEDIA]ijkmp_set_data_source(url="rtsp://192.168.1.254:554/xxx.mov")=0 [IJKMEDIA]ijkmp_prepare_async() [IJKMEDIA][FFPlayer @ 0x103e48000] remove 'timeout' option for rtmp. [IJKMEDIA]===== versions ===== [IJKMEDIA][FFPlayer @ 0x103e48000] ijkplayer : k0.11.6 [IJKMEDIA][FFPlayer @ 0x103e48000] FFmpeg : n6.1.1-19-ga0f2c92 [IJKMEDIA][FFPlayer @ 0x103e48000] libavutil : 58.29.100 [IJKMEDIA][FFPlayer @ 0x103e48000] libavcodec : 60.31.102 [IJKMEDIA][FFPlayer @ 0x103e48000] libavformat : 60.16.100 [IJKMEDIA][FFPlayer @ 0x103e48000] libswscale : 7.5.100 [IJKMEDIA][FFPlayer @ 0x103e48000] libswresample: 4.12.100 [IJKMEDIA]===== options ===== [IJKMEDIA][FFPlayer @ 0x103e48000] player-opts : packet-buffering = 0 [IJKMEDIA][FFPlayer @ 0x103e48000] player-opts : overlay-format = fcc-_es2 [IJKMEDIA][FFPlayer @ 0x103e48000] player-opts : infbuf = 1 [IJKMEDIA][FFPlayer @ 0x103e48000] player-opts : videotoolbox_hwaccel = 1 [IJKMEDIA][FFPlayer @ 0x103e48000] player-opts : vol = 256 [IJKMEDIA][FFPlayer @ 0x103e48000] player-opts : maxx-buffer-size = 1024 [IJKMEDIA][FFPlayer @ 0x103e48000] player-opts : video-pictq-size = 3 [IJKMEDIA][FFPlayer @ 0x103e48000] player-opts : max-fps = 60 [IJKMEDIA][FFPlayer @ 0x103e48000] player-opts : framedrop = 1 [IJKMEDIA][FFPlayer @ 0x103e48000] player-opts : start-on-prepared = 1 [IJKMEDIA][FFPlayer @ 0x103e48000] format-opts : ijkapplication = 0x100a14200 [IJKMEDIA][FFPlayer @ 0x103e48000] format-opts : ijkiomanager = 4305689488 [IJKMEDIA][FFPlayer @ 0x103e48000] format-opts : protocol_whitelist = ijkio,ijkhttphook,concat,http,tcp,https,tls,file,bluray,dvd,rtmp,rtsp,rtp,srtp,udp [IJKMEDIA][FFPlayer @ 0x103e48000] format-opts : probesize = 10240 [IJKMEDIA][FFPlayer @ 0x103e48000] format-opts : analyzemaxduration = 100 [IJKMEDIA][FFPlayer @ 0x103e48000] format-opts : flush_packets = 1 [IJKMEDIA][FFPlayer @ 0x103e48000] format-opts : auto_convert = 0 [IJKMEDIA][FFPlayer @ 0x103e48000] format-opts : safe = 0 [IJKMEDIA][FFPlayer @ 0x103e48000] format-opts : reconnect = 1 [IJKMEDIA][FFPlayer @ 0x103e48000] format-opts : user_agent = ijkplayer [IJKMEDIA][FFPlayer @ 0x103e48000] codec-opts : skip_loop_filter = 0 [IJKMEDIA][FFPlayer @ 0x103e48000] codec-opts : skip_frame = 0 [IJKMEDIA]=================== [IJKMEDIA]ijkmp_prepare_async()=0 [IJKMEDIA][FFPlayer @ 0x103e48000] remove 'timeout' option for rtmp. [IJKMEDIA]dns getaddrinfo uri = 192.168.1.254 [IJKMEDIA][tcp @ 0x100b11b00] Original list of addresses: [IJKMEDIA][tcp @ 0x100b11b00] Address 192.168.1.254 port 554 [IJKMEDIA][tcp @ 0x100b11b00] Interleaved list of addresses: [IJKMEDIA][tcp @ 0x100b11b00] Address 192.168.1.254 port 554 [IJKMEDIA][tcp @ 0x100b11b00] Starting connection attempt to 192.168.1.254 port 554 [IJKMEDIA][tcp @ 0x100b11b00] Successfully connected to 192.168.1.254 port 554 [IJKMEDIA]tcp did open uri = tcp://192.168.1.254:554?timeout=0, ip = [IJKMEDIA][rtsp @ 0x100a42e80] SDP: v=0
o=- 1731657648874736 1 IN IP4 192.168.1.254
s=Nvt RTSP, streamed by the LIVE555 Media Server
i=00000004
t=0 0
a=tool:LIVE555 Streaming Media v2013.07.03
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Nvt RTSP, streamed by the LIVE555 Media Server
a=x-qt-text-inf:00000004
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:2000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKDYPZA=,aO48sA==
a=control:track1
[IJKMEDIA]Failed to parse interval end specification '' 2024-11-15 16:00:49.233551+0800 IJKMediaDemo[9054:438054] [si_destination_compare] send failed: Invalid argument 2024-11-15 16:00:49.233888+0800 IJKMediaDemo[9054:438054] [si_destination_compare] send failed: Undefined error: 0 [IJKMEDIA][rtsp @ 0x100a42e80] video codec set to: h264 [IJKMEDIA][rtsp @ 0x100a42e80] RTP Packetization Mode: 1 [IJKMEDIA][rtsp @ 0x100a42e80] RTP Profile IDC: 64 Profile IOP: 0 Level: 33 [IJKMEDIA][rtsp @ 0x100a42e80] Extradata set to 0x2800a6340 (size: 23) [IJKMEDIA][udp @ 0x100b34850] end receive buffer size reported is 393216 [IJKMEDIA][udp @ 0x100b186a0] end receive buffer size reported is 393216 [IJKMEDIA][rtsp @ 0x100a42e80] setting jitter buffer size to 500 [IJKMEDIA][rtsp @ 0x100a42e80] hello state=0 [IJKMEDIA]Failed to parse interval end specification '' [IJKMEDIA]Option ijkapplication not found. [IJKMEDIA][h264 @ 0x100b371a0] nal_unit_type: 7(SPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x100b371a0] nal_unit_type: 8(PPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x100b371a0] nal_unit_type: 7(SPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x100b371a0] nal_unit_type: 8(PPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x100b371a0] nal_unit_type: 7(SPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x100b371a0] nal_unit_type: 8(PPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x100b371a0] nal_unit_type: 5(IDR), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x100b371a0] Format yuv420p chosen by get_format(). [IJKMEDIA][h264 @ 0x100b371a0] Reinit context to 864x480, pix_fmt: yuv420p [IJKMEDIA][rtsp @ 0x100a42e80] Probe buffer size limit of 10240 bytes reached [IJKMEDIA][rtsp @ 0x100a42e80] Stream #0: not enough frames to estimate rate; consider increasing probesize [IJKMEDIA][FFPlayer @ 0x103e48000] max_frame_duration: 10.000 [IJKMEDIA]Input #0, rtsp, from 'rtsp://192.168.1.254:554/xxx.mov': [IJKMEDIA] Metadata: [IJKMEDIA] title : [IJKMEDIA]Nvt RTSP, streamed by the LIVE555 Media Server[IJKMEDIA] [IJKMEDIA] comment : [IJKMEDIA]00000004[IJKMEDIA] [IJKMEDIA] Duration: [IJKMEDIA]N/A[IJKMEDIA], start: [IJKMEDIA]0.000000[IJKMEDIA], bitrate: [IJKMEDIA]N/A[IJKMEDIA] [IJKMEDIA] Stream #0:0[IJKMEDIA], 1, 1/90000[IJKMEDIA]: Video: h264, 1 reference frame, yuv420p(progressive), 864x480, 0/1[IJKMEDIA], [IJKMEDIA]90k tbr, [IJKMEDIA]90k tbn[IJKMEDIA] [IJKMEDIA]videotoolbox hwaccel switch:on [IJKMEDIA]try use videotoolbox accel [IJKMEDIA]detected 2 logical cores [IJKMEDIA][h264 @ 0x100b379e0] nal_unit_type: 7(SPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x100b379e0] nal_unit_type: 8(PPS), nal_ref_idc: 3 [IJKMEDIA][FFPlayer @ 0x103e48000] VideoCodec: avcodec, h264 [IJKMEDIA][FFPlayer @ 0x103e48000] fps: 90000.000000 (normal) [IJKMEDIA]ic metadata item:title=Nvt RTSP, streamed by the LIVE555 Media Server [IJKMEDIA]ic metadata item:comment=00000004 [IJKMEDIA]auto decision max buffer size:27MB [IJKMEDIA][h264 @ 0x100b379e0] nal_unit_type: 7(SPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x100b379e0] nal_unit_type: 8(PPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x100b379e0] nal_unit_type: 5(IDR), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x100b379e0] Format videotoolbox_vld chosen by get_format(). [IJKMEDIA][h264 @ 0x100b379e0] Format videotoolbox_vld requires hwaccel initialisation. [IJKMEDIA]ijkmp_get_msg: FFP_MSG_PREPARED [IJKMEDIA]ijkmp_get_meta_l [IJKMEDIA]ijkmp_get_meta_l()=void [IJKMEDIA]ijkmp_set_playback_rate(1.000000) [IJKMEDIA][FFPlayer @ 0x103e48000] Playback rate: 1.000000 [IJKMEDIA]ijkmp_set_playback_rate()=void [IJKMEDIA]ijkmp_set_playback_volume(1.000000) [IJKMEDIA]ijkmp_set_playback_volume()=void 2024-11-15 16:00:49.317669+0800 IJKMediaDemo[9054:437626] mediaIsPreparedToPlayDidChange 2024-11-15 16:00:49.317754+0800 IJKMediaDemo[9054:437626] loadStateDidChange: IJKMPMovieLoadStatePlaythroughOK: 3 2024-11-15 16:00:49.318781+0800 IJKMediaDemo[9054:437626] IJKMPMoviePlayBackStateDidChange 1: playing [IJKMEDIA][h264 @ 0x100b379e0] ff avcc maybe wrong:01640033FFE1000B67640033AC use origin avcc:0000000167640033AC1514 [IJKMEDIA][h264 @ 0x100b379e0] Unknown VideoToolbox session creation error -4 [IJKMEDIA][h264 @ 0x100b379e0] Failed setup for format videotoolbox_vld: hwaccel initialisation returned error. [IJKMEDIA][h264 @ 0x100b379e0] Format videotoolbox_vld not usable, retrying get_format() without it. [IJKMEDIA][h264 @ 0x100b379e0] Format yuv420p chosen by get_format(). [IJKMEDIA][h264 @ 0x100b379e0] Reinit context to 864x480, pix_fmt: yuv420p [IJKMEDIA][h264 @ 0x100a49090] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA]Create FFmpeg Overlay(w=864, h=480, fmt=yuv420p, dp=0x280791130) [IJKMEDIA][h264 @ 0x100a52350] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA]Video: first frame decoded [IJKMEDIA]render pipeline:yuv420pFragmentShader,fullRange:1,matrix:BT709[IJKMEDIA][h264 @ 0x100b379e0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA][rtsp @ 0x100a42e80] max delay reached. need to consume packet [IJKMEDIA][rtsp @ 0x100a42e80] RTP: missed 25 packets
不要设置 analyzeduration 和 probesize 试试。
2024-11-15 16:31:51.509089+0800 IJKMediaDemo[9298:447742] Metal GPU Frame Capture Enabled 2024-11-15 16:31:51.511144+0800 IJKMediaDemo[9298:447742] Metal API Validation Enabled [IJKMEDIA]===== custom modules begin ===== [IJKMEDIA]skip demuxer : ijklivehook (duplicated) [IJKMEDIA]===== custom modules end ===== [IJKMEDIA]ijkmp_set_inject_opaque(0x280705c90) [IJKMEDIA]ijkmp_set_inject_opaque()=void [IJKMEDIA]ijkmp_set_ijkio_inject_opaque(0x280705c90) [IJKMEDIA]ijkmp_set_ijkio_inject_opaque()=void [IJKMEDIA]ijkmp_ios_set_view(glView=0x14004c200) [IJKMEDIA]ijkmp_ios_set_view(glView=0x14004c200)=void [IJKMEDIA]ijkmp_set_data_source(url="rtsp://192.168.1.254:554/xxx.mov") [IJKMEDIA]ijkmp_set_data_source(url="rtsp://192.168.1.254:554/xxx.mov")=0 [IJKMEDIA]ijkmp_prepare_async() [IJKMEDIA][FFPlayer @ 0x13fe38000] remove 'timeout' option for rtmp. [IJKMEDIA]===== versions ===== [IJKMEDIA][FFPlayer @ 0x13fe38000] ijkplayer : k0.11.6 [IJKMEDIA][FFPlayer @ 0x13fe38000] FFmpeg : n6.1.1-19-ga0f2c92 [IJKMEDIA][FFPlayer @ 0x13fe38000] libavutil : 58.29.100 [IJKMEDIA][FFPlayer @ 0x13fe38000] libavcodec : 60.31.102 [IJKMEDIA][FFPlayer @ 0x13fe38000] libavformat : 60.16.100 [IJKMEDIA][FFPlayer @ 0x13fe38000] libswscale : 7.5.100 [IJKMEDIA][FFPlayer @ 0x13fe38000] libswresample: 4.12.100 [IJKMEDIA]===== options ===== [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : packet-buffering = 0 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : overlay-format = fcc-_es2 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : infbuf = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : videotoolbox_hwaccel = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : vol = 256 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : maxx-buffer-size = 1024 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : video-pictq-size = 3 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : max-fps = 60 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : framedrop = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : start-on-prepared = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : ijkapplication = 0x13fd2b0f0 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : ijkiomanager = 5365760416 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : protocol_whitelist = ijkio,ijkhttphook,concat,http,tcp,https,tls,file,bluray,dvd,rtmp,rtsp,rtp,srtp,udp [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : auto_convert = 0 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : user_agent = ijkplayer [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : flush_packets = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : safe = 0 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : reconnect = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] codec-opts : skip_loop_filter = 0 [IJKMEDIA][FFPlayer @ 0x13fe38000] codec-opts : skip_frame = 0 [IJKMEDIA]=================== [IJKMEDIA]ijkmp_prepare_async()=0 [IJKMEDIA][FFPlayer @ 0x13fe38000] remove 'timeout' option for rtmp. [IJKMEDIA]dns getaddrinfo uri = 192.168.1.254 [IJKMEDIA][tcp @ 0x13fd34dc0] Original list of addresses: [IJKMEDIA][tcp @ 0x13fd34dc0] Address 192.168.1.254 port 554 [IJKMEDIA][tcp @ 0x13fd34dc0] Interleaved list of addresses: [IJKMEDIA][tcp @ 0x13fd34dc0] Address 192.168.1.254 port 554 [IJKMEDIA][tcp @ 0x13fd34dc0] Starting connection attempt to 192.168.1.254 port 554 [IJKMEDIA]ijkmp_stop() [IJKMEDIA]aout_pause_audio(1) [IJKMEDIA]ijkmp_stop()=0 [IJKMEDIA]ijkmp_shutdown_l() [IJKMEDIA]aout_pause_audio(1) [IJKMEDIA]stream_close will close [IJKMEDIA]IJKMetalView: videiPicture is nil [IJKMEDIA]open input failed:rtsp://192.168.1.254:554/xxx.mov,err:-1414092869 [IJKMEDIA]wait for video_refresh_tid [IJKMEDIA]stream_close did close [IJKMEDIA]ijkmp_shutdown_l()=void [IJKMEDIA]ijkmp_set_inject_opaque(0x0) [IJKMEDIA]ijkmp_set_inject_opaque()=void [IJKMEDIA]ijkmp_set_ijkio_inject_opaque(0x0) [IJKMEDIA]ijkmp_set_ijkio_inject_opaque()=void [IJKMEDIA]ijkmp_dec_ref(): ref=0 [IJKMEDIA]ijkmp_shutdown_l() [IJKMEDIA]ijkmp_shutdown_l()=void [IJKMEDIA]aout_close_audio() 2024-11-15 16:32:46.316271+0800 IJKMediaDemo[9298:447742] AVAudioSessionInterruptionTypeBegan [IJKMEDIA]ijkmp_set_inject_opaque(0x280705d60) [IJKMEDIA]ijkmp_set_inject_opaque()=void [IJKMEDIA]ijkmp_set_ijkio_inject_opaque(0x280705d60) [IJKMEDIA]ijkmp_set_ijkio_inject_opaque()=void [IJKMEDIA]ijkmp_ios_set_view(glView=0x140859a00) [IJKMEDIA]ijkmp_ios_set_view(glView=0x140859a00)=void [IJKMEDIA]ijkmp_set_data_source(url="rtsp://192.168.1.254:554/xxx.mov") [IJKMEDIA]ijkmp_set_data_source(url="rtsp://192.168.1.254:554/xxx.mov")=0 [IJKMEDIA]ijkmp_prepare_async() [IJKMEDIA][FFPlayer @ 0x13fe38000] remove 'timeout' option for rtmp. [IJKMEDIA]===== options ===== [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : packet-buffering = 0 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : overlay-format = fcc-_es2 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : infbuf = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : videotoolbox_hwaccel = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : vol = 256 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : maxx-buffer-size = 1024 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : video-pictq-size = 3 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : max-fps = 60 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : framedrop = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] player-opts : start-on-prepared = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : ijkapplication = 0x13fd254d0 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : ijkiomanager = 5365725408 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : protocol_whitelist = ijkio,ijkhttphook,concat,http,tcp,https,tls,file,bluray,dvd,rtmp,rtsp,rtp,srtp,udp [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : auto_convert = 0 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : user_agent = ijkplayer [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : flush_packets = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : safe = 0 [IJKMEDIA][FFPlayer @ 0x13fe38000] format-opts : reconnect = 1 [IJKMEDIA][FFPlayer @ 0x13fe38000] codec-opts : skip_loop_filter = 0 [IJKMEDIA][FFPlayer @ 0x13fe38000] codec-opts : skip_frame = 0 [IJKMEDIA]=================== [IJKMEDIA]ijkmp_prepare_async()=0 [IJKMEDIA][FFPlayer @ 0x13fe38000] remove 'timeout' option for rtmp. [IJKMEDIA]dns getaddrinfo uri = 192.168.1.254 [IJKMEDIA][tcp @ 0x13ff22770] Original list of addresses: [IJKMEDIA][tcp @ 0x13ff22770] Address 192.168.1.254 port 554 [IJKMEDIA][tcp @ 0x13ff22770] Interleaved list of addresses: [IJKMEDIA][tcp @ 0x13ff22770] Address 192.168.1.254 port 554 [IJKMEDIA][tcp @ 0x13ff22770] Starting connection attempt to 192.168.1.254 port 554 [IJKMEDIA][tcp @ 0x13ff22770] Successfully connected to 192.168.1.254 port 554 [IJKMEDIA]tcp did open uri = tcp://192.168.1.254:554?timeout=0, ip = [IJKMEDIA][rtsp @ 0x13ff41500] SDP: v=0
o=- 1731659567181931 1 IN IP4 192.168.1.254
s=Nvt RTSP, streamed by the LIVE555 Media Server
i=00000000
t=0 0
a=tool:LIVE555 Streaming Media v2013.07.03
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:Nvt RTSP, streamed by the LIVE555 Media Server
a=x-qt-text-inf:00000000
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:2000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=640033;sprop-parameter-sets=Z2QAM6wVFKDYPZA=,aO48sA==
a=control:track1
[IJKMEDIA]Failed to parse interval end specification '' 2024-11-15 16:32:48.187134+0800 IJKMediaDemo[9298:448379] [si_destination_compare] send failed: Invalid argument 2024-11-15 16:32:48.187286+0800 IJKMediaDemo[9298:448379] [si_destination_compare] send failed: Undefined error: 0 [IJKMEDIA][rtsp @ 0x13ff41500] video codec set to: h264 [IJKMEDIA][rtsp @ 0x13ff41500] RTP Packetization Mode: 1 [IJKMEDIA][rtsp @ 0x13ff41500] RTP Profile IDC: 64 Profile IOP: 0 Level: 33 [IJKMEDIA][rtsp @ 0x13ff41500] Extradata set to 0x28211a1c0 (size: 23) [IJKMEDIA][udp @ 0x13ff323b0] end receive buffer size reported is 393216 [IJKMEDIA][udp @ 0x13ff1ec30] end receive buffer size reported is 393216 [IJKMEDIA][rtsp @ 0x13ff41500] setting jitter buffer size to 500 [IJKMEDIA][rtsp @ 0x13ff41500] hello state=0 [IJKMEDIA]Failed to parse interval end specification '' [IJKMEDIA]Option ijkapplication not found. [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 7(SPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 8(PPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 7(SPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 8(PPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 7(SPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 8(PPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 5(IDR), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x13fd438a0] Format yuv420p chosen by get_format(). [IJKMEDIA][h264 @ 0x13fd438a0] Reinit context to 864x480, pix_fmt: yuv420p [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA][h264 @ 0x13fd438a0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA][rtsp @ 0x13ff41500] All info found [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 24.416667 0.018609 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 24.500000 0.013738 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 24.583333 0.009605 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 24.666667 0.006211 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 24.750000 0.003555 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 24.750000 0.003555 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 24.833333 0.001638 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 24.833333 0.001638 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 24.916667 0.000459 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 24.916667 0.000459 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.000000 0.000018 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.000000 0.000018 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.083333 0.000316 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.083333 0.000316 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.166667 0.001352 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.250000 0.003127 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.333333 0.005640 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.333333 0.005640 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.416667 0.008891 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.416667 0.008891 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.500000 0.012881 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.500000 0.012881 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 25.583333 0.017610 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 50.000000 0.000073 [IJKMEDIA][rtsp @ 0x13ff41500] rfps: 50.000000 0.000073 [IJKMEDIA][FFPlayer @ 0x13fe38000] max_frame_duration: 10.000 [IJKMEDIA]Input #0, rtsp, from 'rtsp://192.168.1.254:554/xxx.mov': [IJKMEDIA] Metadata: [IJKMEDIA] title : [IJKMEDIA]Nvt RTSP, streamed by the LIVE555 Media Server[IJKMEDIA] [IJKMEDIA] comment : [IJKMEDIA]00000000[IJKMEDIA] [IJKMEDIA] Duration: [IJKMEDIA]N/A[IJKMEDIA], start: [IJKMEDIA]0.115356[IJKMEDIA], bitrate: [IJKMEDIA]N/A[IJKMEDIA] [IJKMEDIA] Stream #0:0[IJKMEDIA], 28, 1/90000[IJKMEDIA]: Video: h264, 1 reference frame, yuv420p(progressive), 864x480, 0/1[IJKMEDIA], [IJKMEDIA]25 tbr, [IJKMEDIA]90k tbn[IJKMEDIA] [IJKMEDIA]videotoolbox hwaccel switch:on [IJKMEDIA]try use videotoolbox accel [IJKMEDIA]detected 2 logical cores [IJKMEDIA][h264 @ 0x13fd44780] nal_unit_type: 7(SPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x13fd44780] nal_unit_type: 8(PPS), nal_ref_idc: 3 [IJKMEDIA][FFPlayer @ 0x13fe38000] VideoCodec: avcodec, h264 [IJKMEDIA][FFPlayer @ 0x13fe38000] fps: 25.000000 (normal) [IJKMEDIA]ic metadata item:title=Nvt RTSP, streamed by the LIVE555 Media Server [IJKMEDIA]ic metadata item:comment=00000000 [IJKMEDIA]auto decision max buffer size:27MB [IJKMEDIA][h264 @ 0x13fd44780] nal_unit_type: 7(SPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x13fd44780] nal_unit_type: 8(PPS), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x13fd44780] nal_unit_type: 5(IDR), nal_ref_idc: 3 [IJKMEDIA][h264 @ 0x13fd44780] Format videotoolbox_vld chosen by get_format(). [IJKMEDIA][h264 @ 0x13fd44780] Format videotoolbox_vld requires hwaccel initialisation. [IJKMEDIA]ijkmp_get_msg: FFP_MSG_PREPARED [IJKMEDIA]ijkmp_get_meta_l [IJKMEDIA]ijkmp_get_meta_l()=void [IJKMEDIA]ijkmp_set_playback_rate(1.000000) [IJKMEDIA][FFPlayer @ 0x13fe38000] Playback rate: 1.000000 [IJKMEDIA]ijkmp_set_playback_rate()=void [IJKMEDIA]ijkmp_set_playback_volume(1.000000)
[IJKMEDIA]ijkmp_set_playback_volume()=void 2024-11-15 16:32:49.459171+0800 IJKMediaDemo[9298:447742] mediaIsPreparedToPlayDidChange 2024-11-15 16:32:49.459509+0800 IJKMediaDemo[9298:447742] loadStateDidChange: IJKMPMovieLoadStatePlaythroughOK: 3 2024-11-15 16:32:49.459964+0800 IJKMediaDemo[9298:447742] IJKMPMoviePlayBackStateDidChange 1: playing [IJKMEDIA][h264 @ 0x13fd44780] ff avcc maybe wrong:01640033FFE1000B67640033AC use origin avcc:0000000167640033AC1514 [IJKMEDIA][h264 @ 0x13fd44780] Unknown VideoToolbox session creation error -4 [IJKMEDIA][h264 @ 0x13fd44780] Failed setup for format videotoolbox_vld: hwaccel initialisation returned error. [IJKMEDIA][h264 @ 0x13fd44780] Format videotoolbox_vld not usable, retrying get_format() without it. [IJKMEDIA][h264 @ 0x13fd44780] Format yuv420p chosen by get_format(). [IJKMEDIA][h264 @ 0x13fd44780] Reinit context to 864x480, pix_fmt: yuv420p [IJKMEDIA][h264 @ 0x13fd4d990] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA][h264 @ 0x13fd4ea60] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA]Create FFmpeg Overlay(w=864, h=480, fmt=yuv420p, dp=0x28262ba70) [IJKMEDIA]Video: first frame decoded [IJKMEDIA]Create FFmpeg Overlay(w=864, h=480, fmt=yuv420p, dp=0x28262ba70) [IJKMEDIA][h264 @ 0x13fd44780] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA]Create FFmpeg Overlay(w=864, h=480, fmt=yuv420p, dp=0x28262ba70) [IJKMEDIA][h264 @ 0x13fd4d990] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA][h264 @ 0x13fd4ea60] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1 [IJKMEDIA]render pipeline:yuv420pFragmentShader,fullRange:1,matrix:BT709[IJKMEDIA][h264 @ 0x13fd44780] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 1
还是只有第一帧
用的什么工具起的 rtsp 的服务?
是我们自己的研发的设备启动的rtsp服务,用你打包好的framework 是可以流畅播放的,不知道为什么demo上就不行,我们本来准备在你代码基础上修改下编译个新的库使用
我这没有 rtsp 服务,自测 rtmp 表现正常。你有尝试自己打包,然后使用你打的 framework 吗?
尝试过了,就是因为跟demo类似,所以觉得很奇怪
我这边下最新的就可以了
demo运行 [options setPlayerOptionIntValue:0 forKey:@"videotoolbox_hwaccel"]; 使用这个后 第一帧有画面, [IJKMEDIA]max delay reached. need to consume packet [IJKMEDIA]RTP: missed 247 packets [IJKMEDIA]max delay reached. need to consume packet [IJKMEDIA]RTP: missed 28 packets [IJKMEDIA]max delay reached. need to consume packet [IJKMEDIA]RTP: missed 51 packets
后面就持续丢包了