Video Flicker when streaming image blobs
See original GitHub issueWhen running from live, each frame is passed as an image blob. After digging into the code I noticed the image-sequence.js class never has the image data loaded (because the browser needs to load it).
So essentially what happens is componentWillReceiveProps
sets state from _getCurrentFrames
. This kicks off the image load promise, but returns currentFrameImage
as undefined. The image subsequently is removed, then the promise callback fires and sets the new frame into state.
One potential fix for this would be to not remove the image but rather just not change the currentFrameImage
if it hasn’t loaded yet.
_getCurrentFrames(props) {
const {currentTime, src} = props;
const {currentFrameImage} = this.state || {}
const currentFrame = this._buffer.set(src, currentTime);
const currentFrameData = this._buffer.get(currentFrame);
if (currentFrameData && !currentFrameData.image) {
currentFrameData.promise.then(image => {
if (this.state.currentFrame === currentFrame) {
this.setState({currentFrameImage: image});
}
});
}
return {
currentFrameImage: (currentFrameData && currentFrameData.image) || currentFrameImage,
currentFrame
};
}
I’m happy to make a PR if this is unintended behavior / a bug. If its not can you explain how I should stream image blobs from live data?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Video Flicker when streaming image blobs · Issue #299 - GitHub
When running from live, each frame is passed as an image blob. After digging into the code I noticed the image-sequence.js class never...
Read more >MediaRecorder video blob has blinking when recording both ...
When using MediaRecorder to record a stream of both video and audio, the resulting video blob contains glitches (it's blinking).
Read more >Streaming issues (stuttering, black flashes) - TL.net
The black flicker is due to fullscreen. If you want to play under fullscreen you indeed need to use fullscreen (windowed). WestTyrant is...
Read more >Video Glitch on Amazon Prime Video When Resolution Adjusts
294.1, when streaming video on Amazon Prime in full screen mode, the screen flickers to black and then back to the picture as...
Read more >While watching videos on Google Chrome, my screen flickers ...
I had a problem with videos in Google Chrome, looking like “ripple effect”, and tried two things: * Turning off hardware acceleration setting...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fix is published in 1.0.0-beta.10.
@MGraefe Great thanks! When will this be released (so I can pull down in NPM)?