News for hackers. Stuff that matters.
Re:YouTube to limit default video quality around the world f... by ponsin on Tuesday March 24, 2020 @04:09PM (#22678447)
It would be nice if they have a 0 pixel option. I use YouTube mostly for the music and I let it play in the background
Re:YouTube to limit default video quality around the world f... by symplee on Tuesday March 24, 2020 @04:13PM (#22678495)
I think most "Lyric" videos, where the screen is a single image, or nearly the same image, can be compressed to be almost the size of just the audio.

If not, I would second the "zero pixel" option!

Re:YouTube to limit default video quality around the world f... by close04 on Tuesday March 24, 2020 @04:35PM (#22678726)
Youtube doesn't offer a "no video" option for free because the ToS for the free service says you are not allowed to separate the video and audio streams. This is to prevent free streaming on devices like Sonos since it's harder (if possible at all) to monetize those videos. It's also why when using the free service the app doesn't allow streaming with the screen off.

A 0 pixel video would defeat this by being in effect an audio stream separated from the video. I always wondered why manufacturers don't just resize the video stream to 1 pixel and use any of the device LEDs to "display" the video thus bypassing this part of the ToS.

Re:YouTube to limit default video quality around the world f... by NoodleIncident on Tuesday March 24, 2020 @10:49PM (#22681561)
> Youtube doesn't offer a "no video" option for free because the ToS for the free service says you are not allowed to separate the video and audio streams.

Isn't this backwards? It seems more likely that the TOS follows the business decision here. I believe old versions of the official mobile apps continued to play the video with the phone screen off.

Re:YouTube to limit default video quality around the world f... by close04 on Wednesday March 25, 2020 @05:08AM (#22683018)
I imagine the ToS were written as such in order to make sure some features can be monetized (like offline or screen-off playback). But this just means they would not offer any feature for free that undermines this decision. A "0px" video would effectively turn it into an audio-only stream and be an "official" way for others to bypass some of those restrictions. It would make streaming to all devices that now require a Premium/Music membership, or stream ripping (something they don't actually sue for but insist it's illegal) fair game.
Re:YouTube to limit default video quality around the world f... by cwkoss on Tuesday March 24, 2020 @08:21PM (#22680582)
> resize the video stream to 1 pixel and use any of the device LEDs to "display" the video thus bypassing this part of the ToS

Hilarious hack, love this idea

Re:YouTube to limit default video quality around the world f... by gray_-_wolf on Wednesday March 25, 2020 @05:51AM (#22683190)
> since it's harder (if possible at all) to monetize those videos

it's not like we don't have ads on radio

Re:YouTube to limit default video quality around the world f... by Insanity on Tuesday March 24, 2020 @04:30PM (#22678657)
I think this is a safe assumption, there should be no difference between each frames thus nothing should be sent.
Re:YouTube to limit default video quality around the world f... by nightfly on Tuesday March 24, 2020 @04:34PM (#22678709)
Videos usually have key frames (full pictures) after ever interval of x seconds/frames. So new data will be sent occasionally even with no changes.
Re:YouTube to limit default video quality around the world f... by est31 on Tuesday March 24, 2020 @05:34PM (#22679265)
Yeah, I've downloaded this video: https://www.youtube.com/watch?v=DwHpDOWhkGk

youtube-dl -k gave me two files, one webm/opus audio file and one mp4/av1 video file.

The files had roughly same sizes, the audio being 9728k large, the video 9476k.

The video had 127 keyframes, out of 17030 frames total, distributed over 567 seconds of video (one keyframe every 4.5 seconds). I don't have a method at hand to measure the encoded size of the keyframes but if I extract the first 90k of the file using dd (bs=90k count=1), I get 21 frames, so that's a lower bound for the size that's actually needed to encode one single keyframe, more shouldn't actually be neccessary.

So of the 9.4M video file, > 99% is waste. Quite literally as 1% of 9476k is 95k. With the addition of audio, the amount of waste has to be adjusted to roughly half of the total audio+video data. Still a large amount of data that can be saved, especially at youtube scale where reductions of traffic in the sub-percent range are material for promotions.

Re:YouTube to limit default video quality around the world f... by the8472 on Tuesday March 24, 2020 @06:11PM (#22679615)
This could also be solved by youtube detecting these situations and simply spacing keyframes farther apart or using duplicate frame decimation/vfr encoding. Seeking would still be fast since it could just fetch and skip a huge bunch of empty P-frames.
Re:YouTube to limit default video quality around the world f... by clouddrover on Tuesday March 24, 2020 @07:12PM (#22680059)
For static image videos YouTube's H.264 version of the video is generally significantly smaller than either the VP9 or AV1 versions. Either YouTube's detection and modification of the encoder settings for this type of video or something intrinsic to the x264 encoder delivers better results from their H.264 encoding pipeline.

The 480p video-only file sizes for this video as reported by youtube-dl have VP9 at 9.70MiB, AV1 at 9.25MiB, and H.264 at 3.55MiB.

Re:YouTube to limit default video quality around the world f... by 6510 on Tuesday March 24, 2020 @07:50PM (#22680341)
So we give them something 13 kb-ish[0] and they compress it to 4.16 MB. I'm sure I'm already not putting it kind enough. Combined with the tiny battery in my phone I really feel like people are pulling a prank on me. I'm a behavioral experiment now! I think my roomba just looked at me.

[0] http://i3.ytimg.com/vi/DwHpDOWhkGk/hqdefault.jpg

Re:YouTube to limit default video quality around the world f... by clouddrover on Tuesday March 24, 2020 @08:06PM (#22680454)
YouTube's a video encoding site. The original video that was given to YouTube will have been substantially larger than 13 kb-ish.

If your content is audio only then use an audio encoding site like SoundCloud. Or, if you really want to use YouTube, then you need to get them to develop an audio specific option.

Re:YouTube to limit default video quality around the world f... by 6510 on Tuesday March 24, 2020 @09:37PM (#22681155)
I think we already have tons of brilliant people developing video codec. I'm sure they are all well aware there isn't a way to define part(s) of a video a slide show. What is missing is people pointing out how silly this is. The keyframes also define the seek points. Its a mess.
Re:YouTube to limit default video quality around the world f... by acqq on Wednesday March 25, 2020 @01:28AM (#22682189)
Yes, the formats and players should be changed to also allow more seek points than the key frames, exactly for these "picture not changing" scenarios but with the audio content we want to seek and consume.

And then additionally, there should be better recognition of the "picture not changing" conditions, to allow better use of such a feature.

Re:YouTube to limit default video quality around the world f... by 6510 on Tuesday March 24, 2020 @07:20PM (#22680125)
I moan about this a lot with codec ppl. I think they are just building on top of what they have?

I was trying to distribute a 3 hour lecture with a single slide. I suppose seeing the speaker for a few seconds would be nice too. haha, I'm asking a lot? The slide had a lot of detail so the video uhhh I mean the jpg got enormous and few keyframes so no seeking? No thanks, ill do the "compression" in javascript. (eeewww!)

Re:YouTube to limit default video quality around the world f... by akiselev on Tuesday March 24, 2020 @08:05PM (#22680448)
If it's a solid color or simple enough for the static image compression algorithms in play to optimize away, even those keyframes would be tiny. Some codecs will just optimize those keyframes away entirely.
Re:YouTube to limit default video quality around the world f... by Insanity on Wednesday March 25, 2020 @07:42AM (#22683655)
oh okay, TIL :)
Re:YouTube to limit default video quality around the world f... by qwerty456127 on Tuesday March 24, 2020 @04:43PM (#22678783)
I just wonder why wouldn't they put the lyrics into the subtitles channel.
Re:YouTube to limit default video quality around the world f... by jmiskovic on Wednesday March 25, 2020 @07:37AM (#22683636)
The 'they' part is critical. YouTube relies on users to provide actual content. Digitalized music is uploaded by people with vast differences in tech abilities, access to tools, and even personal tastes. Some get creative and want to have HD city time-lapse as background and power point animation of lyrics. What do you do with those?

It is not impossible to go over all music videos, automatically fetch lyrics and replace video with static album cover or something, but who would do it? If YouTube does this then they are responsible for any copyright infringement, and they become huge competition to user-created content on their own platform.

Re:YouTube to limit default video quality around the world f... by TrinaryWorksToo on Tuesday March 24, 2020 @04:45PM (#22678815)
This is YouTube Music: https://music.youtube.com/
Re:YouTube to limit default video quality around the world f... by ken on Tuesday March 24, 2020 @05:47PM (#22679402)
Is this down? I just get a black window and "Oops, something went wrong" popping up in the corner repeatedly.
Re:YouTube to limit default video quality around the world f... by nightfly on Tuesday March 24, 2020 @06:40PM (#22679850)
I think you need Youtube Premium to use it.
Re:YouTube to limit default video quality around the world f... by dvdgsng on Tuesday March 24, 2020 @05:53PM (#22679461)
up for me (germany)
Re:YouTube to limit default video quality around the world f... by Hamuko on Wednesday March 25, 2020 @02:50AM (#22682513)

    youtube-dl -f bestaudio https://youtu.be/YT0k99hCY5I
Or if you want to listen to it straight away

    mpv --ytdl-format=bestaudio https://youtu.be/YT0k99hCY5I
Re:YouTube to limit default video quality around the world f... by Zhyl on Wednesday March 25, 2020 @07:48AM (#22683683)
if you want to search for a song:

    mpv --ytdl-format=bestaudio 'ytdl://ytsearch1:John Butler Trio Ocean'
As a function:

    !#/bin/bash

    yt(){
        mpv --ytdl-format=bestaudio "ytdl://ytsearch1:$*"
    }
Edit: as per comment below, swapped '--no-video' for '--ytdl-format=bestaudio'
Re:YouTube to limit default video quality around the world f... by Hamuko on Wednesday March 25, 2020 @07:58AM (#22683732)
--no-video is not relevant to this conversation since it still fetches the video stream.
Re:YouTube to limit default video quality around the world f... by Zhyl on Wednesday March 25, 2020 @08:23AM (#22683869)
Interesting, I was not aware of that!

Shall amend my scripts immediately.

Re:YouTube to limit default video quality around the world f... by dredmorbius on Wednesday March 25, 2020 @03:02AM (#22682552)
mpv is absolutely transformative for Youtube (and a huge number of other platforms, services, & urls).

youtube-dl can directly stream as well, e.g.,

    youtube-dl -o - "https://www.youtube.com/watch?v=BaW_jenozKcj" | vlc -
(from the manpage).

And there's mps-youtube as well.

Re:YouTube to limit default video quality around the world f... by nickthegreek on Tuesday March 24, 2020 @04:25PM (#22678610)
Youtube music app allows this. I don’t think the website does.
Re:YouTube to limit default video quality around the world f... by TrinaryWorksToo on Tuesday March 24, 2020 @04:45PM (#22678812)
https://music.youtube.com/

This does what you want.

Re:YouTube to limit default video quality around the world f... by filoleg on Tuesday March 24, 2020 @04:53PM (#22678894)
I like the concept of it, but the app has atrocious UX on mobile.

For a specific example, it has a nice toggle above every track, where you can flip between video and audio-only. It works great, except that I cannot find a way to force it to stay on audio-only. As soon as the current track ends, the toggle resets back to "video".

And this kind of stuff is all over the app.

Re:YouTube to limit default video quality around the world f... by ferysurya on Wednesday March 25, 2020 @03:52AM (#22682737)
You can toggle off the video mode in the app setting.
Re:YouTube to limit default video quality around the world f... by lone_haxx0r on Wednesday March 25, 2020 @03:47AM (#22682719)
You should try Newpipe if you're on Android.
Re:YouTube to limit default video quality around the world f... by weatherperson on Tuesday March 24, 2020 @06:04PM (#22679546)
that's weird, I use the app and don't have this problem. I love the UI even on iOS.
Re:YouTube to limit default video quality around the world f... by eastbayjake on Tuesday March 24, 2020 @04:32PM (#22678685)
I wish more ASMR content were available on music streaming services instead of with bulky videos on YouTube!
Re:YouTube to limit default video quality around the world f... by jdminhbg on Tuesday March 24, 2020 @04:52PM (#22678888)
You can use youtube-dl to pull down audio-only tracks. I do this frequently for talks without much in the way of visual presentation that I then listen to as podcasts.

    youtube-dl -F https://youtube.com/video-url
That will give you a list of formats, pick an audio-only one, and use the -f flag to download that format.
Re:YouTube to limit default video quality around the world f... by James_STT on Tuesday March 24, 2020 @05:42PM (#22679347)
the 'bestaudio' format is particularly useful, you can't be certain of the container it serves you but it avoids having to check '-F'
Re:YouTube to limit default video quality around the world f... by qwerty456127 on Tuesday March 24, 2020 @04:45PM (#22678808)
The video channel plays a serious role in ASMR.
Re:YouTube to limit default video quality around the world f... by lukifer on Tuesday March 24, 2020 @04:58PM (#22678929)
I think the iOS player will stream only audio if the app is backgrounded; it seems to restart the stream to get video back if the app is brought to front again.

As others have said, if the "video" is a static image, the bandwidth usage should be negligible in practice. But I've seen lots of promotional album streams that intentionally add busy graphics, motion lyrics, etc; while they're sometimes cool, they're wastes of bandwidth and processing if I just want it play audio in a background tab.

Re:YouTube to limit default video quality around the world f... by Cyberdog on Tuesday March 24, 2020 @08:58PM (#22680862)
Background audio play only works if you're paying for the subscription service. Otherwise both video and audio stops when the app is backgrounded.

Many times I've listened to a YouTube video or stream without watching it by just starting the video and then pocketing my phone and being careful not to touch it. I hear the audio and continue my shopping or cleaning or whatever while battery and bandwidth is wasted displaying the video to the debris inside my pocket.

I can only assume Google has run the numbers and decided it's actually more profitable for them to make something so silly and wasteful on both sides of the connection necessary, but that's what it is.

Re:YouTube to limit default video quality around the world f... by NoodleIncident on Tuesday March 24, 2020 @10:51PM (#22681568)
Your phone might be saving you some battery; there is a sensor to detect when your face is close to the phone, turning off the screen and disabling touch. Not sure if it actually works when it's in your pocket though. There's a serious "light in the refrigerator" problem, where trying to measure it changes the outcome
Re:YouTube to limit default video quality around the world f... by Dylan16807 on Wednesday March 25, 2020 @12:20AM (#22681912)
It's really easy to see if that sensor is active. It's not fridge light at all, it triggers at a distance and you could test against your shirt to see if the light shines through.

I've never seen it be active outside of a phone call.

Re:YouTube to limit default video quality around the world f... by lukifer on Wednesday March 25, 2020 @01:28PM (#22686660)
Ah, I pay for YouTube Red, I didn't realize this "feature" wasn't the default. Thanks for clarifying.
Re:YouTube to limit default video quality around the world f... by JJMcJ on Tuesday March 24, 2020 @04:34PM (#22678707)
Pick the lowest resolution, usually 144. The audio quality seems unchanged and the video network bandwidth greatly reduced.
Re:YouTube to limit default video quality around the world f... by Scoundreller on Tuesday March 24, 2020 @04:18PM (#22678525)
I thought they did switch to audio feed only in the background? After all, youtube-dl usually reports an audio-only file.
Re:YouTube to limit default video quality around the world f... by smichel17 on Tuesday March 24, 2020 @08:36PM (#22680725)
youtube-dl violates the YouTube terms of service. That's why they scrape the website intstead of using the api.
Re:YouTube to limit default video quality around the world f... by spullara on Tuesday March 24, 2020 @04:12PM (#22678474)
Re:YouTube to limit default video quality around the world f... by noir_lord on Tuesday March 24, 2020 @04:37PM (#22678741)
NewPipe free on f-droid and it allows "download audio" in whatever format is available, it's great on phone for music from non-traditional studio sources (NewWaveRetro) etc.
Re:YouTube to limit default video quality around the world f... by arandomsapien on Tuesday March 24, 2020 @06:16PM (#22679675)
This is an option in the mobile app, but only if you're a paid premium user. Otherwise, to listen to audio only on mobile you need to keep the screen on.
Re:YouTube to limit default video quality around the world f... by sidcool on Wednesday March 25, 2020 @05:11AM (#22683033)
They have YouTube premium for that feature.
Re:YouTube to limit default video quality around the world f... by Waterluvian on Tuesday March 24, 2020 @07:04PM (#22680008)
Twitch has audio only mode. I use it when working outside.
Re:YouTube to limit default video quality around the world f... by pjc50 on Tuesday March 24, 2020 @04:34PM (#22678708)
On Android you have to pay extra to not watch the video.
Re:YouTube to limit default video quality around the world f... by catalogia on Tuesday March 24, 2020 @06:01PM (#22679525)

    mpv --no-video [youtube url]
(This uses youtube-dl, without saving it to your hard drive.)
Re:YouTube to limit default video quality around the world f... by rampant_ai on Wednesday March 25, 2020 @12:27AM (#22681937)
You're still pulling down the video data itself, it's just being removed after-the-fact. But this will save your battery on a laptop since you're not rendering the video.