Dax89 / WebPirate

A Tabbed, WebKit based Browser Web for SailfishOS
GNU General Public License v3.0
15 stars 7 forks source link

Video stuttereing #77

Closed Tichy closed 8 years ago

Tichy commented 8 years ago

When opening a video, it stutters for the first seconds. Looks like it needs some pre-buffering before play.

lewadedun commented 8 years ago

with wi fi & LTE iit s Ok )

Dax89 commented 8 years ago

I can disable the autoplay, but I don't now if stuttering disappears, this issue comes out after a sailfishos update (I think that is 1.1.9)

llelectronics commented 8 years ago

Yeah thats a side effect of Gstreamer 1.0 it tries starting playback even though caches aren't filled 100%

llelectronics commented 8 years ago

Created a workaround in webcat for this issue by just waiting until buffer is filled before starting playback. This makes video loading a little bit longer (subjective feeling as there appears a black screen before the actual video loads) https://github.com/llelectronics/webcat/commit/9fa437eceda6f4227cd2c30ef27068063e856b58

llelectronics commented 8 years ago

Seems like that workaround breaks loading of local files. I had to revert it. For me now its a wont fix as its an upstream issue.

Dax89 commented 8 years ago

Ok! :+1:

Anyway, thanks @llelectronics :)

llelectronics commented 8 years ago

Fixed it finally with these two commits. A little bit hacky as it will show the first image of the remote stream but then pauses until buffer is full. Though this works without problem also with local files (that apparently don't buffer or don't trigger the bufferChanged signal) https://github.com/llelectronics/webcat/commit/702479e83c62181a444567955931ad843bfc1dd4

I also add a check if the source of the video was changed so it will only pause at the beginning of a new stream and not if on poor internet connection where it has to buffer in the background while playing back (and most often is able to playback during buffering in the background) https://github.com/llelectronics/webcat/commit/3f09d907d4b81a0ce06e29986f41e4f96e48b46e

Hope that helps fixing it here aswell :)