bilibili / WebAV

WebAV is an SDK built on WebCodecs, designed for creating and editing video files on the web platform. WebAV 是基于 WebCodecs 构建的 SDK,用于在 Web 平台上创建/编辑视频文件。
https://bilibili.github.io/WebAV/
MIT License
930 stars 109 forks source link

Error fetching 9:16 resolution video into MP4Clip #272

Closed yingersun closed 3 hours ago

yingersun commented 1 week ago

I encountered "First sample not idr frame" warning in console. And I believe it's because I am fetching a 9:16 iphone video as the MP4Clip.

I tested with one 9:16 video and it gave the "First sample not idr frame" error.

I tested with a second 9:16 different video and it couldn't add to timeline (using video editor demo) and gave this error "Uncaught (in promise) Error: MP4Clip stream is done, but not emit ready" in console.

It's weird because I tried a 3rd 9:16 video and it successfully added to timeline and everything was working fine with it.

Further testing, I think it might be about the video's resolution and the canvas size? Maybe the video resolution > one of canvas dimensions. But not sure.

I'm not sure what causes it. It also happens to 16:9 videos.

hughfenghen commented 4 days ago

Please use the MP4Box tool at https://gpac.github.io/mp4box.js/test/filereader.html to check if your video file is intact, and make sure the first video frame is a keyframe (is_sync). The mentioned errors and warnings are unrelated to the canvas resolution.