ijkplayer icon indicating copy to clipboard operation
ijkplayer copied to clipboard

如何播放dash?

Open trial opened this issue 1 year ago • 1 comments

比如 https://dash.akamaized.net/akamai/bbb_30fps/bbb-manifest-refresh.mpd

trial avatar Jul 03 '24 08:07 trial

目前不支持

debugly avatar Jul 15 '24 08:07 debugly

为啥?ffmpeg支持就应该支持啊。。。

wnpllrzodiac avatar Jan 09 '25 02:01 wnpllrzodiac

问得好,因为现在编译的ffmpeg不支持dash,下个版本我支持下

debugly avatar Jan 09 '25 05:01 debugly

@trial 这个包支持了 dash,有时间可以试试:https://github.com/debugly/ijkplayer/releases/tag/k0.12.0-beta-250109153044

debugly avatar Jan 09 '25 07:01 debugly

似乎不能播放

[IJKMEDIA]stream_close will close [IJKMEDIA]IJKMetalView: videiPicture is nil [IJKMEDIA]stream_close did close [IJKMEDIA]===== options ===== [IJKMEDIA]player-opts : video-pictq-size = 3 [IJKMEDIA]player-opts : overlay-format = fcc-_es2 [IJKMEDIA]player-opts : max-fps = 30 [IJKMEDIA]player-opts : framedrop = 1 [IJKMEDIA]player-opts : videotoolbox_hwaccel = 1 [IJKMEDIA]player-opts : start-on-prepared = 0 [IJKMEDIA]format-opts : ijkapplication = 0x60000032fc20 [IJKMEDIA]format-opts : ijkiomanager = 4343256400 [IJKMEDIA]format-opts : protocol_whitelist = ijkio,ijkhttphook,concat,http,tcp,https,tls,file,bluray,smb2,dvd,rtmp,rtsp,rtp,srtp,udp [IJKMEDIA]format-opts : infbuf = 1 [IJKMEDIA]format-opts : packet-buffering = 0 [IJKMEDIA]format-opts : auto_convert = 0 [IJKMEDIA]format-opts : timeout = 30000000 [IJKMEDIA]format-opts : reconnect = 1 [IJKMEDIA]format-opts : seek_flag_keyframe = 1 [IJKMEDIA]format-opts : user_agent = ijkplayer [IJKMEDIA]format-opts : safe = 0 [IJKMEDIA]=================== [IJKMEDIA]open [https://dash.akamaized.net/akamai/bbb_30fps/bbb-manifest-refresh.mpd] failed:Invalid data found when processing input,err:-1094995529 ``

trial avatar Jan 11 '25 02:01 trial

ffprobe info:

Input #0, dash, from 'https://dash.akamaized.net/akamai/bbb_30fps/bbb-manifest-refresh.mpd':
  Duration: 00:10:34.00, start: 0.000000, bitrate: 0 kb/s
  Program 0
    Stream #0:0: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1024x576 [SAR 1:1 DAR 16:9], 1513 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Metadata:
      variant_bitrate : 3134488
      id              : bbb_30fps_1024x576_2
    Stream #0:1: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2035 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Metadata:
      variant_bitrate : 4952892
      id              : bbb_30fps_1280x720_4
    Stream #0:2: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 3154 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Metadata:
      variant_bitrate : 9914554
      id              : bbb_30fps_1920x1080_
    Stream #0:3: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x180 [SAR 1:1 DAR 16:9], 181 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Metadata:
      variant_bitrate : 254320
      id              : bbb_30fps_320x180_20
    Stream #0:4: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 320x180 [SAR 1:1 DAR 16:9], 319 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Metadata:
      variant_bitrate : 507246
      id              : bbb_30fps_320x180_40
    Stream #0:5: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 502 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Metadata:
      variant_bitrate : 759798
      id              : bbb_30fps_480x270_60
    Stream #0:6: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 740 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Metadata:
      variant_bitrate : 1254758
      id              : bbb_30fps_640x360_10
    Stream #0:7: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 633 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Metadata:
      variant_bitrate : 1013310
      id              : bbb_30fps_640x360_80
    Stream #0:8: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 768x432 [SAR 1:1 DAR 16:9], 1052 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Metadata:
      variant_bitrate : 1883700
      id              : bbb_30fps_768x432_15
    Stream #0:9: Video: h264 (High) (avc1 / 0x31637661), yuv420p, 3840x2160 [SAR 1:1 DAR 16:9], 4578 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc
    Metadata:
      variant_bitrate : 14931538
      id              : bbb_30fps_3840x2160_
    Stream #0:10: Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 64 kb/s
    Metadata:
      variant_bitrate : 67071
      id              : bbb_a64k
[dash @ 0000023e361f65c0] No longer receiving stream_index 0f=0/0
[dash @ 0000023e361f65c0] No longer receiving stream_index 1
[dash @ 0000023e361f65c0] No longer receiving stream_index 2
[dash @ 0000023e361f65c0] No longer receiving stream_index 3
[dash @ 0000023e361f65c0] No longer receiving stream_index 4
[dash @ 0000023e361f65c0] No longer receiving stream_index 5
[dash @ 0000023e361f65c0] No longer receiving stream_index 6
[dash @ 0000023e361f65c0] No longer receiving stream_index 7
[dash @ 0000023e361f65c0] No longer receiving stream_index 8
   5.62 A-V: -0.012 fd=  17 aq=   11KB vq= 1349KB sq=    0B f=0/0

wnpllrzodiac avatar Jan 11 '25 04:01 wnpllrzodiac

@trial 这个包支持了 dash,有时间可以试试:https://github.com/debugly/ijkplayer/releases/tag/k0.12.0-beta-250109153044

最好打包的时候能把ffmpeg的config.h config.mak 打进去。这样可以检查下模块是否开启了。记得dash需要libxml2

wnpllrzodiac avatar Jan 11 '25 04:01 wnpllrzodiac

没有更新FFmpeg,周一我再打个

debugly avatar Jan 11 '25 14:01 debugly

试试这个包:https://github.com/debugly/ijkplayer/releases/tag/k0.12.0-beta-250113094650

debugly avatar Jan 13 '25 02:01 debugly

@trial 这个包支持了 dash,有时间可以试试:https://github.com/debugly/ijkplayer/releases/tag/k0.12.0-beta-250109153044

最好打包的时候能把ffmpeg的config.h config.mak 打进去。这样可以检查下模块是否开启了。记得dash需要libxml2

打 ffmpeg 这个三方库时,是有 config.h 的,但是他作为 ijkplayer 的依赖,在打 jikplayer 的包时,能做到但不适合暴露这个头文件,只对外提供功能而已。比如:可以提供查询支持的 demuxer,支持的协议等。

是的,依赖了 libxml2,所以默认没有开启 dash。

debugly avatar Jan 13 '25 02:01 debugly

可以播放dash了

trial avatar Jan 14 '25 13:01 trial