Closed fzw2408 closed 3 years ago
参考 decoder_wasm 的 readme
进入代码目录,根据需要,以下命令三选一执行:
./build_decoder_264.sh //支持解码 H.264 ./build_decoder_265.sh //支持解码 H.265 ./build_decoder_264_265.sh //支持解码 H.264 和 H.265
https://github.com/goldvideo/decoder_wasm#33-%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8 var codecType = 1; // 0 - H.264, 1 - H.265 var ret = Module._openDecoder(codecType, videoCallback, LOG_LEVEL_WASM)
got it !非常感谢 anxly 小结一下:
1.decode_wasm 解码器编译出来的 wasm文件是可以用的。 libffmpeg_264_265.wasm
tsDemuxed(data) {
let streamType = data.stream_type
let pes = data.pes || {}
switch (streamType) {
case 27: //h264
this.videoQueue(pes)
break
case 36: // 265
this.videoQueue(pes)
break
case 3:
case 15:
case 17:
pes.PTS = Math.round(pes.PTS AV_TIME_BASE_Q 1000)
this.maxAudioPTS = Math.max(pes.PTS, this.maxAudioPTS)
this.audioQueue(pes)
break
default:
break
}
作者你好,这个项目单纯的只支持h265.有没有 同时支持h264 h265 的lib库,h265player的lib库会不会开源出啦?