Member-only story

How to download a streamed video

Formatting videos reconstructed from streamed segments in Chrome extensions. Executing ffmpeg in Chrome extensions.

Marian C.
6 min readNov 16, 2024

FFmpeg is a free command-line tool for processing video and audio files. In the browser it is possible to use its derivative ffmpeg.wasm which is a translation of the original FFmpeg C code into WebAssembly and JavaScript. Its sample use cases are demonstrated in https://ffmpegwasm.netlify.app/docs/getting-started/usage/. ffmpeg.wasm is much slower than FFmpeg, generally it cannot replace FFmpeg. But there is a common use case where ffmpeg.wasm performs at a reasonable speed — formatting videos reconstructed from streamed fragments into the mp4 file format.

Difference between streamed videos and regular video files

When an URL of video file is assigned to the src attribute of a video element, the browser loads the entire file. The video can be downloaded with Save video as option in the context menu:

When the user switches to another time point in the video, the user must wait for the video file to be loaded up to the…

--

--

Marian C.
Marian C.

Written by Marian C.

Java, JavaScript and SQL developer. Interested in data collection and visualization.

Responses (21)