视频解析时长为 0,导致无法预览图片
https://github.com/hughfenghen/WebAV/assets/31228055/a756dbf5-c285-4b2b-aaa0-daadfbdccdf6
如图 视频信息的 duration 为 0
duration 为 0,无法显示时长和预览图片
https://hughfenghen.github.io/WebAV/demo/1_4-mp4-previewer
用 @webav/av-recorder 录制的视频 也会出现同样的问题
总时长是videoTracks[0].duration除以videoTracks[0].timescale,不是那个duration。
用 @webav/av-recorder 录制的视频 也会出现同样的问题
@027xiguapi 参考 https://github.com/hughfenghen/WebAV/issues/20
如果无法获取时长,就无法获取到关键帧,为了可以获取,我修改了源码
if (info.duration != 0 && time > info.duration / info.timescale)
return null;
建议可以加上时长设置
问题在于,程序实际使用的是 videoTrack 下的 duration 字段,你期望的是 movie_duration 字段。
会在下个版本修复,将由最后一个 sample 决定时长,而不是从 moov 中读取时长信息
会在下个版本修复,将由最后一个 sample 决定时长,而不是从 moov 中读取时长信息
v0.4.0 已发布,查看 demo:https://bilibili.github.io/WebAV/demo/6_2-video-preview-cut 有问题再重开
会在下个版本修复,将由最后一个 sample 决定时长,而不是从 moov 中读取时长信息
v0.4.0 已发布,查看 demo:https://hughfenghen.github.io/WebAV/demo/6_2-video-preview-cut 有问题再重开
Hi, seems like the demo is unavailable, may I know how to solve the issue? Thanks