Live data from Hacker News

Hacking YouTube with a MP4

realkeyboardwarrior.github.io

81–90 of 94 posts

Re: Hacking YouTube with a MP4

#81
post #72

Earlier quoted context omitted.

AAC is far superior, as is OGG, on a technical basis

On the basis of "can it play in my car", MP3 is the only winner. My car's player has one of those baseline decoding chips that can only do MP3.

I mean, what I want is for the car to have an audio input that I plug a cable into. There's no reason for the car to be decoding audio at all.

Re: Hacking YouTube with a MP4

#82

It's almost like we didn't learn from the days of MP3. I have several MP3s that, in certain players, are like a half hour long, despite being only 2 minutes long. My best guess was that they were assumed to be CBR, despite nothing about MP3 implying CBR… (there's not a flag or anything that says "this is a VBR" file, CBR files are just special…) Nowadays it's mostly moot since MP3 is obsolete.

Plenty of obsolete audio files on my phone.

Re: Hacking YouTube with a MP4

#83
post #42

Earlier quoted context omitted.

Strange reference. Is that just meant to be an arbitrary celebrity or does xqcow have some particular relevance here I'm missing?

Most people would probably name-drop him if asked to list off the 10 biggest streamers they could think of. I wouldn't consider his ilk a household name, but I'm just playing it as it lies.

What proportion of people can name any 10 'streamers'?

Re: Hacking YouTube with a MP4

#84
Recently been playing with this. Using FFMpeg to generate videos from a series of stills, I assumed a frame rate of 1 and a fixed video length would be suitable... Turns out a lot of players are very particular about how they like their files to be set up. Windows couldn't open the file, VLC could, Google couldn't generate thumbnails, but could show the video. Playing them on a Pi lead to more fun and games.

In the end I just encoded them the 'correct' way, but it was eye opening to the wildness going on in video files. I just assumed I would be able to set a duration, a frame rate, and things would "work".

Re: Hacking YouTube with a MP4

#86
post #58

Earlier quoted context omitted.

Not discord, but the default player is vulnerable to many different crash shenanigans. I get them sent to me all the time to look into and its usually just people using bogus timestamps, bogus seek times or concatenating multiple videos of different resolutions/rates that the player can't handle. If there was a way to get discord to spawn VLC for playing videos by default this would be less of a problem.

> get discord to spawn VLC So rather than loading the bogus videos in a sandboxed Chromium instance, you want to load them in an unsandboxed VLC instance? I smell eventual RCE.

Yes.

- VLC has decades of battle hardening and entirely discards all the aforementioned nonsense. In a perfect world, both Discord and VLC would be sandboxed themselves, but I accept that this world is far from perfect. Discord could at least sanitize anything that strays from a filename when passed to VLC.

- Discord is already vulnerable to crashes from multimedia. This has been a long running problem that has not been resolved by sandboxing in Electron. The folks at Discord will not be able to resolve this with code changes in Electron AFAIK. If you can crash it, there is potential for an RCE. What that RCE can effectively accomplish will entirely depend on sandboxing boundaries external to the application, not sandboxing within the application.

In reference to sandboxing, I could make a document that explains how to enable the OS wide sandboxing features of Windows 10 [1] VirtualSecureMode / DeviceGuard / CredentialGuard and Linux SELinux / AppArmor. I don't have one for MacOS. I should add, don't enable the Windows 10 security features if you depend on any virtualization outside of Hyper-V. Enabling those will break all hypervisors that don't rhyme with Hyper-V.

I should add that my solution for Discord is to not preview videos or play them in the client. I click on the links and VLC plays them but that is not the default behavior of the application.

[1] - https://techcommunity.microsoft.com/t5/iis-support-blog/wind...

Re: Hacking YouTube with a MP4

#87
post #39

I've seen many strange mp4s and webms floating around various discord communities. Some crash your client at a fitting moment in the video, some appear to be thousands of hours long, some appear to be seconds long but are actually hours long, some even loop! somehow.

I even saw videos that play something entirely different the second time you play it!

Re: Hacking YouTube with a MP4

#88

It's almost like we didn't learn from the days of MP3. I have several MP3s that, in certain players, are like a half hour long, despite being only 2 minutes long. My best guess was that they were assumed to be CBR, despite nothing about MP3 implying CBR… (there's not a flag or anything that says "this is a VBR" file, CBR files are just special…) Nowadays it's mostly moot since MP3 is obsolete.

My Diamond Rio PMP300 would play VBR but would shit the bed on displaying duration and seeking because it assumed CBR, as you suggested. When VBR was new, this was a pretty familiar situation and oldschool mp3 encoding standards for share sites would give the option to stick to CBR for that reason - they'd specify alt preset standard for VBR and a couple of CBR options, generally around 256kbps.

Re: Hacking YouTube with a MP4

#89
post #78
post #72

Earlier quoted context omitted.

On the basis of "can it play in my car", MP3 is the only winner. My car's player has one of those baseline decoding chips that can only do MP3.

Same here. And it doesn't even do that very well. Imagine spending 15k or more on a brand new car in 2021 just to realize that the sound tech is borrowed from a $5 MP3 player from the early 2000s.

Almost exactly the same situation as me. The worst part of it is it doesn't sort the directory entries! It displays them in the same order they are written to the directory (ie. usually random). Luckily there is https://fatsort.sourceforge.io/

Re: Hacking YouTube with a MP4

#90
post #72

Earlier quoted context omitted.

On the basis of "can it play in my car", MP3 is the only winner. My car's player has one of those baseline decoding chips that can only do MP3.

I mean, what I want is for the car to have an audio input that I plug a cable into. There's no reason for the car to be decoding audio at all.

"Now you have two problems." Specifically the steering wheel controls won't work and I'd have to deal with charging the second device.
Post reply on HN