Be aware that not all the video container formats allow for streaming. Compared to the commonly used .mp4, effective streamable video container (muxer) names for use with FFmpeg are Matroska (.mkv), MPEG-TS (.m2ts preferred over .ts to be distinguished against TypeScript) and so on.
If the proper format option is missing, an error may occur from FFmpeg as:
1
Unable to choose an output format for 'pipe:'; use a standard extension for the filename or specify the format manually.
There appears to be lots of screen recordings that occupy gigabytes of storage space locally on an MBP, which need to be compressed. While the local tasks running on an MBP may cause the heat dissipating fan to roaring, making use of an idle desktop seems a viable solution to accelerate the workflow.
Considerations Before Starting
Q: Why not refer to powerful cloud-top computing resources such as those on AWS/GCP/Azure?
A: Extra costs will apply, yet the deploying, debugging and tuning operations can’t be skipped still. On the contrary, a personal desktop as the server host is likely more cost-effective and easily maintainable for personal use cases versus in production.
Q: Why not use a U-disk to transfer the files from the MBP to the desktop device?
A: The source files are gigabytes of videos that can’t fit into the U-disk given the capacity limit.
Q: Why not establish a simple web service on the host over HTTP for a user-friendly interface?
A: Those web UI features (see also Docker API documentation) are more than necessary to achieve the goal. In the meantime, exposing the port 2375 (reference) over HTTP is not secured, yet the HTTPS/TLS setup via port 2376 introduced lots of complexity even when following the Docker’s documentation.
Quick Start
Counter-intuitively, there’s actually no need to install or run Docker Desktop app on either the client or server side, as long as the Docker daemon is ready on the server host and Docker CLI is present on the client side, saving lots of confusion, time and effort on the unnecessary desktop app settings.
Either Docker daemon and Docker CLI can be installed on the common *nix OS or distros including MacOS. If on Windows, Windows Subsystem Linux (WSL) will be helpful to prepare the runtime environment without the need to reinstall the entire OS or run a virtual machine, by enabling the certain optional feature instead.
Even if Docker Desktop is installed on Windows, the runtime environment has to be held in WSL anyway.
Server-side setup in Linux/WSL distro of Ubuntu (as an example)
Package sources
Common practice to refresh the list of available packages and their versions:
1
sudo apt update
Additionally, set up Docker’s apt repository using Docker’s official GPG key and Apt sources (recommended; see also Install Docker Engine on Ubuntu).
Why does WSL end, and the established SSH connection get closed, after a while of being idle?
The cause lies in the WSL Idle Timeout setting. By default, WSL 2 goes into a suspended state (after a short period) once all open terminal windows and running processes have exited. The best way to prevent this is to configure the vmIdleTimeout setting in a Windows configuration file.
Navigate to the Windows user profile directory: %userprofile% (e.g., C:\Users\YourUsername). Create a file named .wslconfig if it doesn’t exist. Open the file and add the following lines:
1 2 3 4
[wsl2] ; Sets the time in seconds that a WSL 2 distro can be idle before it is terminated. ; To disable the timeout, set this to -1. vmIdleTimeout=-1
Known Issue of OpenSSH / Docker
docker stderr=ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or director