Page 1 of 1

Keeping YouTube video audio 192 kbps (not really)

Posted: October 24th, 2016, 11:25 am
by HKO2006
Update
emilemil1 wrote:No because streaming uses DASH audio and video, which for audio is the 160kbps stream. The 720p stream you're downloading is normally never seen by anyone unless DASH breaks.
As emil mentioned, YouTube capped the audio bit rate to 160 kbps around a year ago. However, I got a way to keep it 192 kbps and the result is very promising.
Image

It is done by encoding the audio with qaac 2.61 in Maruko Toolbox. Maruko Toolbox comes with qaac 2.44 so download latest qaac from here. You only have to download qaac-x.xx.zip. Then extract the files inside x86 and x64 to MarukoToolbox\tools and overwrite them when prompted.

Back on how to do it. I encoded the audio to QAAC 320 in the Audio tab. It looks like this before uploading, and after.

I then created a single picture video in the General tab. However, I have noticed that the the contrast is reduced/the colour is washed out, grey/whitish. It recoded the video (exclude audio size) from 7 MB to 21 MB. There was a 'it can process faster if it's streamable' so I tried [urlhttp://www.datagoround.com/lab/]MP4 FASTSTART[/url] to add the metadata for streaming. It is a method that worked but not any more, using it now induce 'video/audio is out of sync'. I then tried Avidemux, Video Output is Copy, output format MP4v2 Muxer, check Optimize for streaming in Configure. No more warning but all three videos resulted in 21 MB and all have the colour being less vibrant problem. So maybe use Sony Vegas instead?

Another downlside is that there will be fewer download options. http://keepvid.com/?url=https%3A%2F%2Fy ... epJaYzvC1s

Re: Keeping YouTube uploads 192 kbps

Posted: October 24th, 2016, 1:05 pm
by emilemil1
The color issue is fixed through a color leveling filter, I have to do it to every video in Vegas, but the other way around. My colors are too vibrant.

The fewer download options are because the video hasn't finished processing.

Weird thing is that when I download it (format tag 22) with YT-DL, it says that the audio is 192kbps before downloading if I run " --list-formats", and that's exactly what it is when the file has finished downloading. But when I try it on my own video (also format tag 22), it also says that the audio is 192kbps before download, but after downloading it's only 128kbps. The Wikipedia page on YouTube says that the tag 22 stream should always be 192kbps, so it might be a bug that some streams are 128kbps.

Going to try updating Vegas to the latest version in a bit, maybe try some different encoders, see if anything changes.

Either way this doesn't affect the actual streaming quality, so by fixing all this you're really only helping the very very few people who want to download the audio from your video.

Re: Keeping YouTube uploads 192 kbps

Posted: October 25th, 2016, 11:27 am
by HKO2006
I downloaded the 720p one and it has the 192 kbps audio, so I suppose anyone streaming 720p should have 192 kbps too.

Re: Keeping YouTube video audio 192 kbps

Posted: October 25th, 2016, 2:39 pm
by emilemil1
No because streaming uses DASH audio and video, which for audio is the 160kbps stream. The 720p stream you're downloading is normally never seen by anyone unless DASH breaks.

Re: Keeping YouTube video audio 192 kbps

Posted: October 26th, 2016, 10:29 am
by HKO2006
Ah, my hope. orz
I used uBlock Origin to see the urls, and they do have separate downloads. I managed to download the m4a audio that is absent in keepvid.com (which I took as a good sign) by manipulating the url. The m4a is 160 kbps. sigh

To download the m4a, remove the last part &range=2861790-2903401&rn=73&rbuf=85317

Re: Keeping YouTube video audio 192 kbps (not really)

Posted: October 27th, 2016, 7:50 am
by emilemil1
The correct 160kbps stream should be in webm format and have the itag 251 (I think). If it can't be found, the video isn't fully processed. The audio stream contained within is in Opus format.

You can see which file is used when streaming by right clicking the YT player and choose a video information display option, can't remember what it's called.