Probably the strangest ever request

For interesting topics. But remember this is a Linux Forum. Do not post offensive topics that are meant to cause trouble with other members or are derogatory towards people of different genders, race, color, minors (this includes nudity and sex), politics or religion. Let's try to keep peace among the community and for visitors.

No spam on this or any other forums please! If you post advertisements on these forums, your account may be deleted.

Do not copy and paste entire or even up to half of someone else's words or articles into posts. Post only a few sentences or a paragraph and make sure to include a link back to original words or article. Otherwise it's copyright infringement.

You can talk about other distros here, but no MX bashing. You can email the developers of MX if you just want to say you dislike or hate MX.
Message
Author
User avatar
colin_b
Posts: 452
Joined: Sun Mar 19, 2017 7:21 pm

Probably the strangest ever request

#1 Post by colin_b »

I've got a problem which is driving me nuts. I am hoping MX devs can give some info, and maybe be of assistance.

It started about three weeks ago when I read the article "The internet’s YouTube habit has the carbon footprint of a small city."

The following stuck in my head after reading it:
One common practice for users is to play a YouTube video just to access its audio. In their paper, which was presented at the annual ACM Computer-Human Interaction conference this week, the researchers show that YouTube’s carbon footprint could be meaningfully reduced if the company were to design a feature that would stop playing videos if they’re running in a browser tab that a user isn’t actively watching. If 25% of music videos are played in the background of a user’s browser, then YouTube could save 323,000 tons of carbon dioxide equivalent. This conservative estimate saves about 3% of the total annual greenhouse gas emissions associated with watching videos, and is about the same as the carbon footprint of 50,000 cars over the course of a year.
About a week later I saw David Attenborough saying the the world was going to end if carbon emissions aren't reduced.

I got to thinking about the above article and wondered if was a simple way to reduce the carbon emissions of YouTube. So I thought about it, and then thought about it some more :hmm: . Then a light-bulb pinged on above my head - I believe it can be easily achieved.

I contacted the professor in the article and forwarded him the solution I have come up with. I have called it "conservative buffering", and the following is how I described it in the email to the professor:
The following will allow YouTube to continue audio playback but stop downloading video when a different tab is selected:

[Note: the two second duration is a suggestion, not an absolute]

1a) When play is pressed audio and video data required for the first two seconds of playback are downloaded. When this data is downloaded the files are output.

1b) Whilst the initial two seconds of data is being output the next two seconds of A/V data is downloaded.

1c) When the output of the initial two seconds has completed the next two seconds of A/V data are output.

1d) Whilst this data is output the next two seconds of A/V data is downloaded.

1e) When the two second data output is completed the following two seconds of A/V data are output.

Repeat steps 1d and 1e whilst the browser tab showing the video is selected.

When a different browser tab is selected:

2a) Whilst the previous two seconds of data is being output the audio (and only the audio) for the next two seconds is downloaded.

2b) When the previous two seconds of data have completed output the two seconds of audio is output.

2c) Whilst this data is output the next two seconds of audio data is downloaded.

2d) When the two second data output is completed the following two seconds of audio data is output.

Repeat steps 2c and 2d whilst the video output tab is not selected.

When the video output tab is re-selected go back to step 1d.

Repeat until video output is complete.

This output method also reduces wasted data. If I stop a YouTube video that has been playing conventionally for a while then its 120 second buffer serves no purpose. If the same video is played with a conservative buffer of 2 seconds then the amount of wasted data will be no more than 4 seconds.

The entire resultant is a significant chunk off of YouTube's carbon footprint.
I have had no reply to the email, and I'm left scratching my head. I know my description isn't perfect, but the concept is easily grasped when it is given a bit of thought.

Will the above work?

If it will could someone find the time to modify mpv or Mplayer to use conservative buffering? When the player is maximized the audio and video is downloaded and output. When the player is minimized only the audio is downloaded and output.

Not only will it reduce the carbon footprint of YouTube, it will also benefit people like myself who have limited bandwidth (eg - podcasts can be played with the player minimized to reduce the bandwidth used).

I told you it was a strange request :biggrin: .

User avatar
Fibogacci
Posts: 165
Joined: Sun Dec 30, 2018 3:19 pm

Re: Probably the strangest ever request

#2 Post by Fibogacci »

You know, the solution is/could be simple - listen just audio if you don't need (any) video.

I am such a person, which often don't need video.

And it's easy with Linux and eg. mpsyt (mps-youtube) in terminal.

And also it could be a solution for listening YouTube music on your smartphone with Android (and Linux installed on it) - screen can be turned off.

With default YouTube application for Android screen is always on (if you don't use Premium YT music service).

I suppose smartphones' screens use most of battery life.

My way of listening to YouTube on smartphone (and it's not only music, but more often some educational videos/lectures and other similar stuff): https://lbry.tv/@Dude:7/youtube-on-andr ... ter-better
MX-18 Continuum x86_64: laptop Dell Inspiron N7110, Intel Core i5-2410M @ 2.900GHz, 4GB RAM, Kernel: 4.19, DE: Xfce

User avatar
sunrat
Posts: 663
Joined: Mon Mar 28, 2016 9:54 pm

Re: Probably the strangest ever request

#3 Post by sunrat »

If I want to listen to audio from Youtube more than once I just download it locally. No more wasted electricity and carbon emissions from those hungry servers, and it's easier to find when I want to play it.

Code: Select all

youtube-dl --extract-audio <url of video>
And I sadly predict the world will be fairly unliveable in 30-50 years anyway. We may not have reached the point of no return with climate change yet, but the people who could actually do the most to slow/stop it are dragging their heels.

User avatar
oops
Posts: 1878
Joined: Tue Apr 10, 2018 5:07 pm

Re: Probably the strangest ever request

#4 Post by oops »

Fibogacci wrote: Tue Jan 28, 2020 7:36 pm You know, the solution is/could be simple - listen just audio if you don't need (any) video.
...
Right, it's an efficient idea. I do not like videos, except sometimes.
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

User avatar
freemedia2018
Posts: 106
Joined: Thu Nov 21, 2019 3:56 pm

Re: Probably the strangest ever request

#5 Post by freemedia2018 »

Fibogacci wrote: Tue Jan 28, 2020 7:36 pm You know, the solution is/could be simple - listen just audio if you don't need (any) video.
most people are not going to use that solution, so it is relevant from a theoretical and practical standpoint, but not in terms of reducing overall energy usage.

if most of the energy usage comes from people who use the website, then the solution will probably need to be applied to the website. of course i welcome command-line solutions, im a fan of those myself. and there are a lot of us. but for the purpose of reducing overall energy waste, there arent enough of us for that (compared to those who would benefit from a website design tweak.)

this should definitely be proposed to the makers of peertube and invidio.us though.

both projects are free software and people could be encouraged to use those-- not as many as would benefit from google changing youtube, but likely more than would benefit from a command line tool.
we need a concept of antitrust violations for free software.

User avatar
Fibogacci
Posts: 165
Joined: Sun Dec 30, 2018 3:19 pm

Re: Probably the strangest ever request

#6 Post by Fibogacci »

freemedia2018 wrote: Wed Jan 29, 2020 2:54 am
Fibogacci wrote: Tue Jan 28, 2020 7:36 pm You know, the solution is/could be simple - listen just audio if you don't need (any) video.
most people are not going to use that solution, so it is relevant from a theoretical and practical standpoint, but not in terms of reducing overall energy usage.
That's the point. Good/optimal solutions are often not (too) popular (it is not easy to change an old habit). The same is with healthy lifestyle, way of doing things and so on.

Well, mpsyt is CLI, but someone could make a nice GUI - if there is no such a thing already, I don't know ;)
MX-18 Continuum x86_64: laptop Dell Inspiron N7110, Intel Core i5-2410M @ 2.900GHz, 4GB RAM, Kernel: 4.19, DE: Xfce

PPC
Posts: 362
Joined: Tue Sep 11, 2018 8:22 am

Re: Probably the strangest ever request

#7 Post by PPC »

There's a GUI version for listening to YouTube videos already available: smtube - click the video you want - and select the option to listen to audio with - vlc ...

User avatar
KoO
Posts: 491
Joined: Fri Feb 10, 2017 12:21 am

Re: Probably the strangest ever request

#8 Post by KoO »

Well, mpsyt is CLI, but someone could make a nice GUI - if there is no such a thing already, I don't know = GUI is bloat and has a bad carbon foot print = cli saves penguins from floating Icebergs. :alien:
Main : MX 19.1-AHS (i3) 5.4.13-1~mx19+1, Asus B450-i AMD 5 3600 , 32gb Hyper-X 3200 , GTX970 . :linuxlove:
Lenovo T430 : Debian10 antiX17 (i3) , 4.20.12 , i5 , 12gb .
Lenovo X220 : Test Machine (ATM)

User avatar
freemedia2018
Posts: 106
Joined: Thu Nov 21, 2019 3:56 pm

Re: Probably the strangest ever request

#9 Post by freemedia2018 »

KoO wrote: Wed Jan 29, 2020 8:36 am GUI is bloat and has a bad carbon foot print
oh i dont know, i have a cpu monitor running all the time and youll probably save more energy booting to ram than you will avoiding the gui.

even if you run vt-only, youre running a framebuffer. a modest toolkit and a similar window manager isnt costly in terms of ram or cpu. youre already running the backlight which uses a lot more energy. unless youre using a big fancy desktop environment-- that really is bloat. high-resolution video and a "gui" of some sort-- really not the same thing in terms of battery/ac-sucking resources. what this thread needs is stats; if that.
we need a concept of antitrust violations for free software.

User avatar
oops
Posts: 1878
Joined: Tue Apr 10, 2018 5:07 pm

Re: Probably the strangest ever request

#10 Post by oops »

freemedia2018 wrote: Wed Jan 29, 2020 1:11 pm
KoO wrote: Wed Jan 29, 2020 8:36 am GUI is bloat and has a bad carbon foot print
oh i dont know, i have a cpu monitor running all the time and youll probably save more energy booting to ram than you will avoiding the gui.
...
The foot print is not only on your computer, but also in the network and the net server.
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32

Post Reply

Return to “General”