ungoogled-chromium icon indicating copy to clipboard operation
ungoogled-chromium copied to clipboard

Reintroduce the flag removed from chrome 50: chrome://flags/#disable-media-source to disable MSE (Media Source Extension) for fluid playback full buffer video for weak wifi and tricks to increase network cache for streaming 4K videos

Open trimechee opened this issue 1 year ago • 8 comments

EDIT : After several tests and comparisons with other web browsers and streaming websites, I find that increasing the video buffer depends on the website and not the web browser, for example via the second video player "Dstream", Chrome and Firefox buffer the same quantity even when I modify the parameters of the MSE media source extension of Firefox and the default video buffer of "Dstream" is comfortable (5 minutes video buffer but sometimes other video players only allow a buffer of 40 seconds... .)

https://french-anime.com/animes-vf/1391-bucchigiri.html

but it happens that in other video players, Firefox with the default values buffer full video while chrome and chromium browsers buffer a small amount which penalizes us and jerky palyback when the video is in high definition and the wifi is weak... .

https://livetv767.me/frx/showvideo/1296935_fulham_tottenham/

so we hope Ungoogled-Chromium will be able to adjust the video buffer parameters like in Firefox, thank you :)


Hello, I see with admiration tht there many enhancing features introduced by the awesome Ungoogled-Chromium. and it will be great to introduce this essential option please : sometimes the wifi connection becomes very weak when a lot of my de is connected at home and when watching streaming sites with full HD video, there are a lot of jerks, interruptions, I discovered that when you disable the MSE media source extension, there is a full video buffer until the end of the video so smooth plyaback, the problem with browsers is that they don't put enough buffering when the connection becomes weak, i have disabled media source extension in firefox and pale moon and i have buffered full video on many streaming sites, but chromium has hidden or disabled media source extension API from chrome flags, i tried to increase the cache network for MSEs with these command lines but unfortunately it does not work:

Edit : Hello, i find this video which reveal how disable media source extension but we should donwload chrome 50 and merge it with the current version of chrome : How to disable media source extensions in Chrome? https://www.youtube.com/watch?v=XyVDmsfgXV8 chrome://flags/#disable-media-source [disable this]

--mse-audio-buffer-size-limit-mb=12

--mse-video-buffer-size-limit-mb=150

--enable-protected-video-buffers

--audio-buffer-size

--force-protected-video-output-buffers

-enable-swap-buffers-with-bounds

it will be exceptional and useful for the millions of people who have weak connections and lack smooth streaming, it will be great if the amazing Ungooled Chromium gives us this gift of increasing media buffering or a solution to disable MSE to buffer ful video and enjoy streaming without embarrassment, because even when trying to download the videos, many videos are protected and impossible to download them and several video download extensions are full of ads or malware or not open-source, thank you very much !

https://w3c.github.io/media-source/index.html#idl-def-sourcebuffer

Edit :

I did some new research and maybe it can help to enable this important option in chromium browsers :

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 enhance

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 !

I discovered very very powerful amazing scripts to donwload all types of videos or discover media source extension tools ::

https://greasyfork.org/fr/scripts/445751-unlimited-downloader

https://github.com/Momo707577045/m3u8-downloader/blob/master/README-EN.md

https://greasyfork.org/en/scripts/18671-inject2download

https://github.com/acolwell/mse-tools

ArtPlayer.js is a modern and full featured HTML5 video player

https://github.com/zhw2590582/ArtPlayer

https://artplayer.org/

https://www.v2ex.com/t/856510

https://github.com/zhw2590582/bilibili-live-recorder

https://github.com/dabaisuv/Tampermonkey-Script/commit/d10978268b1bda38fcbe1a75e0aaa2665409ac6f

https://segmentfault.com/a/1190000025182822

https://github.com/zhw2590582/live-video-study-notes

https://github.com/zhw2590582/FlvPlayer

https://flvplayer.js.org/

I have made many test experiences, i discouver it is enough to disable only one parameter to be able to buffer full video, it is disable media source extension (MSE), google which owns youtube has hidden or removed this option media source extension API in chrome flags because probably it does not want that we activate this option in youtube, google would like to save bandwidth but unfortunately, browsers do not put enough buffer when we have a weak connection and it jerks in some streaming websites, it is a scandalous injustice :(

buffer full video is useful because we don't need to download video and downlaod video is often complicated, and it saves the 4G data plan, we can in our smartphone leave the video full buffer until the end and thus the video is saved in the smartphone and no longer need 4G to watch video, the same for the notebook, I test and the full buffering is very fast and I can even turn off my wifi and watch my videos without internet, I hope the wonderful Mr Alexander David Frick can discouver the secret in sha Allah and invent a solution for full buffer, it would make our beloved Thorium Browser even more popular and impressive and awesome exceptional !

if browsers buffer the streaming video enough, I wouldn't have asked for this option, it's out of necessity, at night, my sisters often use wifi and sometimes i have weak connection

https://w3c.github.io/media-source/index.html#idl-def-sourcebuffer

i find this video which reveal how disable media source extension but we should donwload chrome 50 and merge it with the current version of chrome, not sure if it's secure : https://www.youtube.com/watch?v=XyVDmsfgXV8&t=3s

I find where we can find old chromium versions https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html

May be it can help

https://github.com/jhiesey/to-arraybuffer

https://www.npmjs.com/package/buffer

May be adding option to changing the default user agent to user agent of smartphone mobile browser and this will increase the default amount buffer of video, we just need to see the video in full screen so it doesn't matter the UI of the browser

, I could not full buffer to the end video streaming in firefox browser and many people were in my case despite putting the values:

media.cache_readahead_limit 9999 media.cache_readahead_limit.cellular 9999

media.cache_resume_threshold 9999 media.cache_resume_threshold.cellular 9999

and alhamdoulilAllah, after many attempts and trials, I was able to find the solution by putting the values previously mentioned and at the same time putting this value that disables MSE media source extension :

media.mediasource.enabled FALSE

and so I was able to full buffer to the end several streaming videos and have a smooth and jerk-free playback on several streaming platforms although my internet connection can become weak when many members of my family connect to it and I have no no longer need to have an expensive internet subscription with a higher speed alhadoulilAllah to watch the videos in high HD and 1080p and 4K and I think my discovery is one of the greatest discoveries of the century lol!

for example I can watch videos from the "uqload" platform, ok.ru/video and many other sites with full buffer to the end like on this site!

https://french-anime.com/exclue/1061-bleach-sennen-kessen-hen-vostfrrrr.html

chromium has removed the flag which allows to disable the MSE media source extension since version 52 if my memory is good....

so my idea for the magnificent Ungoogled-Chromium team is to compile at source a special version of our beloved Ungoogled-Chromium browser with media source extension disabled at source by checking if there are parameters in the source code like in firefox media.cache_readahead_limit and media.cache_resume_threshold that 'we can change their values....and check if it works on this site by exp with the uqload platform by checking the network activity in the task manager:

https://french-anime.com/animes-vf/1218-dead-mount-death-play.html

and so we can remedy the problem of the absence of the flag in chrome allowing to deactivate MSE media source extension and therefore please , we hope there would be a second special or experimental version of Thorium browserr named "Ungoogled- Chromium without MSE with media source plugin disabled"

we know that compiling a new version of a web browser takes hours and it's very complicated and complex and we will be very grateful to Ungoogled Chromium team if he gives us this rare exceptional gift unique in the world because I think it's worth it and it saves a lot of money, because it becomes difficult to download videos from streaming sites because the videos are well protected, and above all we can, for example, using the amison's wifi full buffer several episodes of our tv series favorite in our smartphone or laptop then we can watch our tv series episodes without internet when we go outside the house and without needing an expensive 4G or 5G plan

I find some documentation about MSE where it seems we can specify the size of the network cache :

https://source.chromium.org/chromium/chromium/src/+/main:media/base/media_switches.cc?q=kMSEAudioBufferSizeLimitMb&ss=chromium

https://source.chromium.org/chromium/chromium/src/+/main:media/base/media_switches.cc?q=kMSEVideoBufferSizeLimitMb&ss=chromium

and here is some technical documentation about MSE Media Source API :

https://www.w3.org/TR/media-source-2/

https://web.dev/media-mse-basics/

https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API

I have tried with mse enbaled and disbaled in pale moon and basilisk browser, with mse enable and disabled, i can full buffer the video from uqload, ok.ru, sibnet....but other site only load 30 seconds. ...so we hope that the great Ungoogled Chromium Browser team will do its own internal test, a rare test unique in the world that no chromium browser can do for example on this streamig site:

https://french-anime.com/animes-vf/

if some platforms like uqload full buffer, then it might be worth doing this special version if you have the ability and generosity and we know it's very complex difficult, and if no platform full buffer , then it's logical there is no longer any point in making a special version with MSE disabled, thank you in advance :)

in chromium, we would like to test but the flag has been deleted so i can't test, i added these command lines :

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

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

https://peter.sh/experiments/chromium-command-line-switches/

my request saves expensive 5G/4G plans, because we can by manipulating MSE full buffer videos streaming in smartphone on many streaming paltforms and we can watch them offline without 4G and 5G mobile plan, thank you !

trimechee avatar Aug 09 '22 08:08 trimechee

Hi, I find this video which reveal how disable media source extension but we should donwload chrome 50 and merge it with the current version of chrome, not sure if it's secure : https://www.youtube.com/watch?v=XyVDmsfgXV8&t=3s

trimechee avatar Aug 11 '22 09:08 trimechee

I find where we can find old chromium version ! https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html

trimechee avatar Aug 11 '22 10:08 trimechee

Isn't this site dependent? Like YT won't buffer the full video when paused but some sites still try to. Its not as simple as "merging" old chrome. Who knows how much the code used by those flags has changed in over 50 version. A stream ripper might be better and easier for instance the famous youtube-dl on linux.

if you got a slow connection, which I did at one point it might be better to be able to resume rather than lose your stream if the connection breaks.

Ph0rk0z avatar Aug 12 '22 00:08 Ph0rk0z

With MSE disabled, i can buffer full video n youtube with 360p and 720p resotion, youtube-dl can't detect all embed video streaming in streaming sites and sites protect their video with more and more sophisticated ways and technique so the most simple and fast s buffer video, the probleme with resume is the browerd sometimes doesn't buffer enough :( the flag of chrome 50 still exist in web archive, so it's not possible to scrutinize the code and integrate it into the recent chromiums as they have integrated the reader mode?

trimechee avatar Aug 12 '22 08:08 trimechee

It depends what they did. If they removed the code the flag was referring to it gets exponentially harder. You should actually go look if you can code at all.

There's a few things I'd love to change that I could probably even pull off but with chrome there are gb to download and hours to compile even on a fast machine and the base is constantly updating. So if you can find any work around its easier than building.

You can try running a copy of 50 as a portable just for streams. Probably the fastest way to a "fix". On win/lin and android I already run both chrome and FFs since some websites like one or the other.

Ph0rk0z avatar Aug 12 '22 11:08 Ph0rk0z

Thank you for recommandations :) for now i am using firefox where i can disable mse with one click, additionally i can disable session store and save my hard disk, but what worries me is that firefox drops to 3% users and 2 sites from bank and government don't support firefox anymore, that's why I ask chromium for these options in case firefox disappears :(

trimechee avatar Aug 12 '22 15:08 trimechee

Use chromium for the bank and FF for the streams. Plus there is librewolf, palemoon, waterfox, bromite, brave, etc.

Ph0rk0z avatar Aug 14 '22 22:08 Ph0rk0z

edge browser become more and more wonderful , librewolf may have some problems so i prefer use firefox and then, i disbale by m self the prefetch and other options....palemoon is good and has options in settigs to disable mse but i can't install web extension like ultrawideo to stretch video, brave has crypto and i would like a light browser....

trimechee avatar Aug 15 '22 10:08 trimechee