Hacker News new | ask | show | jobs
by londons_explore 601 days ago
I'm sure this is a feature of the browser... Just right click the video and "save as" and it'll give you a .mp4 file right? Or just Ctrl+C to copy the video onto the clipboard.

Oh wait, we let commercial interests take that functionality from us...

2 comments

I don't think you ever could "copy the video onto the clipboard" in anything.

That said, I do wonder why you aren't able to just save as. Is it a "commercial interest" or is there an optimization going on?

How would you copy a video from one folder into another without using the clipboard ?

How would you copy a video clip from one video editing project into another without using the clipboard ?

That's an interesting question.

When you select and copy text, text data (typically UTF-8 encoded) is copied to a temporary area called the clipboard (except on X11, where the clipboard doesn't actually exist). When you select and copy an image, the pixel data (24bpp or 32bpp bitmap) is copied to the clipboard. This means you can copy text or image data from one application and paste it into another.

When you copy and paste files within a file manager, data isn't transferred across applications. The data copied is just text data with a special tag indicating it was copied from the file manager. When you paste it, the file manager performs the copy action from one filepath to another. Similarly, when you copy clips within a video-editing application or 3D models or anything more complex than just text and image, it's all done by copying a reference to the data within the application, so you can never paste it outside the application.

You can't, for example, copy a video from DaVinci Resolve and paste it in KDEnlive. You also can't copy and paste audio data.

For some reason, the clipboard is confined to text and image.

The same applies to drag and drop, by the way. If you drag and drop an image to a file manager, either it will pass a URL (text data) and the file manager handles downloading it from the source, or, on Windows, it gives the file manager the filepath of the image the browser already downloaded in cache so it copies without downloading anything.

From a UX perspective, right-click-save-as should absolutely be a thing that works.

But the fact that it doesn't isn't some kind of industry-wide conspiracy, it's just not an easy feature for a browser to implement in a generic way, given how streamed video works.

Maybe I should write a browser extension that actually does do this generically, by hooking the SourceBuffer interface, increasing the playback speed, and remuxing into a container format.
Even better, send a pull request to Blink to add this feature. It doesn't actually need to play the whole content, merely fire the right js events to get all the content loaded before doing a save.

It would ideally get integrated into the browser "downloading..." UI too, although I could imagine that being technically hard to do.