dodying / UserJs

MIT License
310 stars 120 forks source link

Buffer full video #118

Open trimechee opened 2 years ago

trimechee commented 2 years ago

Hello, thank you so much for these awesome magnificent amazing scripts and tools 🥇 !!

please I have a wish which is very useful for many poeple, sometimes the internet connection is weak and it is necessary to buffer full video or increase the size of the video buffering to avoid jerky interruptions on streaming sites and for smooth playback, I found how buffer full video and even buffer youtube videos with firefox browser by putting:

cache_readahead_limit: 999999 cache_resume_threshold: 999999

set media.mediasource.enabled to false

I even made a personal discovery and I discovered that when I deactivate the different types of cache:

set browser.cache.disk.enable, browser.cache.disk.smart_size.enabled, browser.cache.disk_cache_ssl and browser.cache.offline.enable to false

I can buffer full streaming video!!!

but on chrome and chromium, it's more complicated because chrome removed MSE media source extension API from chrome flags....

I tried several things: enable command line and chrome flags to increase buffering in chrome chromium:

--video-underflow-threshold-ms

chrome flag: Increase the nesting threshold before which setTimeout(..., <4ms) start being clamped.

--mse-audio-buffer-size-limit-mb

--mse-video-buffer-size-limit-mb

--enable-protected-video-buffers

--audio-buffer-size --force-protected-video-output-buffers

-enable-swap-buffers-with-bounds

--mem-pressure-system-reserved-kb

--aggressive-cache-discard -disable-back-forward-cache

--enable-protected-video-buffers --mse-video-buffer-size-limit-mb=150 --mse-audio-buffer-size-limit-mb=10

I even installed different scripts for full buffering and even used the console in developer mode:

youtube buffer enhence

https://greasyfork.org/en/scripts/442685-youtube-buffer-enhence-%E7%BC%93%E5%86%B2%E5%A2%9E%E5%8A%A0

GREASYFORK USESCRIPTS Custom Native HTML5 Player with Shortcuts

Force a full preload HTML5 video with Javascript? https://stackoverflow.com/questions/16581801/force-a-full-preload-html5-video-with-javascript

HTML5 video full preload in javascript

https://stackoverflow.com/questions/9616236/html5-video-full-preload-in-javascript/23299806#23299806

jQuery.html5Loader https://github.com/GianlucaGuarini/jquery.html5loader

MSE Dump Tools Media Source Extensions API 数据 Dump 工具

https://greasyfork.org/en/scripts/420325-mse-dump-tools

Custom Native HTML5 Player with Shortcuts https://greasyfork.org/en/scripts/404717-custom-native-html5-player-with-shortcuts

YouTube - Auto-Buffer & Auto-HD

krisnoble / mediabuffer

Buffer HTML5 audio/video for uninterrupted playback.

https://github.com/krisnoble/Mediabuffer Youtube Pause and full buffer

PONY56

https://pastebin.com/ZGcpri47

What it does: It pauses your youtube video. When video stop buffering it manually move the seeker to force the download. When the download is finished, it places the cursor back to it's original position. You are then ready to play a fully buffered video. */

/ How to use: Paste this script in the console of your browser (F12 > Console). Tested on Firefox Linux. /

// Note: Maximize your "browser.cache.disk.capacity" (type "about:config" in Firefox) if you are loading long videos......

I tried all that but failed to enable buffer full video, I tried disabling cache in developer console, and put:

--disk-cache-size=2147483647

--disk-cache-size=1 --media-cache-size=1

but it didn't work, we will be grateful if you have the generosity to find a way or make a script to increase the video buffering or buffer fill video especially when watching full HD video with a weak internet connection which becomes a nightmare, thank you very much !!