aframe icon indicating copy to clipboard operation
aframe copied to clipboard

Unexpected droppedVideoFrames while using a-videosphere

Open Vesper0704 opened this issue 2 years ago • 3 comments
trafficstars

Description:

  • A-Frame Version: 1.3.0
  • Platform / Device: Intel Mac OS X 10_14_4, Chrome/108.0.0.0
  • Reproducible Code Snippet or URL:
let quality = document.querySelector('a-videosphere').object3D.children[0].material.map.image.getVideoPlaybackQuality();
decoded = quality.totalVideoFrames;  // 657
dropped = quality.droppedVideoFrames; // 646

Actually, the frames are decoded successfully and the playback is not stalled. Since droppedVideoFrames are defined as the frames that are typically dropped either before or after decoding when it's determined that it will not be possible to draw them to the screen at the correct time, maybe it is reasonable that there are so many droppedVideoFrames due to partial render of the 360 video.

I wonder if there is any way to measure the dropped frames in panorama video when using a-videosphere?

Vesper0704 avatar Jan 03 '23 07:01 Vesper0704

Not sure what getVideoPlaybackQuality actually measures when applied to rendering video as a texture in WebGL vs a regular video on the 2D DOM.

dmarcos avatar Jan 04 '23 19:01 dmarcos

Thanks. I'm gonna use requestVideoFrameCallback to get the presentedFrames. But I am still curious about how getVideoPlaybackQuality works in 3D rendering.

Vesper0704 avatar Jan 05 '23 04:01 Vesper0704

It seems that presentedFrames derived from requestVideoFrameCallback is less than totalVideoFrames. But they are still close. Maybe it is not a good solution.

Vesper0704 avatar Jan 05 '23 04:01 Vesper0704