5 ms·
> .mp4 being associated with a video player seems reasonable, since it's almost always used for video. (I think the only difference between .mp4 and .m4a is the
by 10000truths 4y ago
> .mp4 being associated with a video player seems reasonable, since it's almost always used for video. (I think the only difference between .mp4 and .m4a is the extension? It's just serving as a signal about which app should open it, really.)
mp4 is a container format, all it does is wrap some codecs and add metadata. There's no requirement that it contain video. The smart thing to do would be to inspect the mp4 and open it in an audio player if it contains an audio stream but no video stream.
- hot_gril 4y agoFile extensions alone decide how to open something. Inspecting the data takes time, and you might be opening many at once.
- AceJohnny2 4y agoThat's actually not true on macOS (Finder), which has a much more sophisticated^H^H abstruse system https://eclecticlight.co/2022/12/24/how-does-macos-tell-the-type-of-a-file/ https://eclecticlight.co/2022/12/24/how-does-macos-tell-the-...
- hot_gril 4y agoSo if I understand correctly, if you have a file with an unknown type then change the extension to something still unknown, it'll preserve the first default editor you set for the file.
- CoolGuySteve 4y agoI used to work on this part of CoreMedia. Opening the mp4 header is fast enough that spotlight does it in the background for every supported media file on your system. For tens of thousands or even millions of files, inspecting the header only loads about an extra page into RAM per file. Or, since Apple already has the Spotlight index with this track data in it, 0 extra pages. Basically, only track information that's not already in the Spotlight DB needs to be loaded so the performance should be the same as walking the filesystem for filenames.
- hot_gril 4y agoBut how fast is that? Cause Spotlight is running in the background, not blocking you from opening the file. I think the bigger issue is just that users expect a .mp4 to open with their default .mp4 player, and in fact some people don't know about "open with" and change the extension as a way to pick the player.
- CoolGuySteve 4y agoUnless it's changed since I was there, Spotlight is more or less a sqlite3 database so it has about the same complexity as navigating a filesystem tree but probably with better cache affinity. But also this concern about loading the header of millions of files is such an edge case that I don't think it matters. A human tapping on a piece of glass to play a few files would notice no difference in performance.
- asutekku 4y agoi've never seen mp4 containing anything else than video so it's reasonable assume they would contain video most of the time and thus have a video player as the default app.
- the_third_wave 4y agoPeertube can create audio-only mp4 files by setting the video resolution to 0 [1]. I use this to create audio-only versions of lecture videos for use on the road etc - which is why I made this feature and submitted the PR. [1] https://github.com/Chocobozzz/PeerTube/pull/2213 https://github.com/Chocobozzz/PeerTube/pull/2213
- brigade 4y agoQuickTime Player is an audio player, why wouldn't it be? However, the underlying complaint is that Music doesn't claim to be capable of handling mp4. Which is basically true; the "m4a" and "m4v" that Music does claim to support are restricted subsets of mp4. Should Chrome handle files with a .heif extension if they contain AV1? That's pretty much the same question.