Run FFmpeg inside a tmux session, add -nostdin to the FFmpeg command, and detach from tmux before closing SSH. Later, reconnect to the same Linode and reattach to the session. This keeps the command attached to the server rather than to your SSH terminal; it does not protect the job from a reboot, server shutdown, or FFmpeg failure.
Keep a one-off FFmpeg job running with tmux
Use tmux when you want to disconnect from SSH and later return to the same terminal session to inspect FFmpeg output.
-
Connect to your Linode over SSH and check that
tmuxis installed. If it is not, install it using the package manager for the Linux distribution running on your instance. -
Start a named tmux session:
tmux new -s ffmpeg -
Run FFmpeg inside that session, substituting the actual input and output paths and the encoding options appropriate to your job:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
ffmpeg -nostdin -i /path/to/input -c:v libx264 -c:a aac /path/to/output.mp4The codecs shown are illustrative, not a recommendation for every source or output. FFmpeg’s FAQ recommends
-nostdinfor background execution so it does not check for terminal input. That option handles FFmpeg’s console interaction; it does not, by itself, keep a process alive after logout. FFmpeg FAQ. -
While FFmpeg is running, press Ctrl+B, then D. This detaches from tmux without stopping the command. You can then close SSH.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
-
To return, SSH to the same Linode and attach to the session:
tmux attach -t ffmpeg
Before disconnecting, check that FFmpeg is running in the tmux session. If the session name is already in use when you start, list existing sessions with tmux ls and attach to the intended one instead of starting a duplicate job.
Recommended Free Tools
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Choose another method if the job has different needs
| Method | Best fit | How to use it | Important limitation |
|---|---|---|---|
| tmux | A one-off job you may want to inspect interactively later. | Start FFmpeg in a tmux session, detach with Ctrl+B then D, and reattach with tmux attach -t ffmpeg. |
It preserves a terminal session across SSH disconnection, not across a server reboot. |
| GNU Screen | A persistent terminal-session alternative to tmux. | Start a Screen session, detach with Ctrl+A then Ctrl+D, and reattach with screen -r. |
Like tmux, it is for terminal-session persistence, not reboot recovery. Linode Community describes both tools for disconnecting and reattaching. Linode Community. |
| nohup | A noninteractive command when returning to its terminal is unnecessary and a log file is enough. | Redirect output to a known file and background the process, as shown below. | It does not restart the command after a reboot; track the process and check the log yourself. |
| systemd | A service-like job that needs explicit start/stop management or should start at boot. | Create a service unit with a deliberate user, working directory, full executable path, command, and restart policy; then use systemd to manage and enable it. | Requires service configuration. Restart policy should suit the workload rather than blindly restarting every failure. See Linode’s systemd service at boot guide. |
Run FFmpeg with nohup and keep a log
For a simple noninteractive job, use nohup with explicit redirections. FFmpeg writes diagnostic logs to stderr by default, so 2>&1 sends them to the same file as stdout.
nohup ffmpeg -nostdin -i input.mp4 output.mp4 > ffmpeg.log 2>&1 < /dev/null &
This ignores hangup signals, redirects terminal input away from the command, and places the process in the background. The Linux nohup manual describes its hangup handling and default terminal I/O behavior: nohup(1). Check the shell’s output for the background job or PID, then inspect the log after reconnecting:
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
tail -f ffmpeg.log
Use a unique log filename for each run if you need to preserve earlier diagnostics. If you want to return to the live terminal itself, tmux or Screen is more convenient than nohup.
When to use systemd instead
A detached terminal or nohup is a lightweight way to survive an SSH disconnect, but neither is a service manager. If FFmpeg must be started and stopped deliberately or launched after the machine boots, configure a systemd service. Linode’s guide covers creating and enabling a custom service: Use systemd to Start a Linux Service at Boot.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Set the service’s user, working directory, full FFmpeg executable path, input and output locations, and restart behavior deliberately. Then inspect the service state and logs with the host’s systemd tools, such as systemctl status and journalctl for the selected unit. A service can be configured to start at boot, but that does not guarantee a successful encode: the input, disk space, network source, permissions, and FFmpeg command still need to be valid.
Capture useful FFmpeg diagnostics and progress
FFmpeg normally writes logs to stderr. Its -report option saves the full command line and log output in a timestamped report file in the current directory, which can help diagnose a failed run. Its -progress option emits periodic machine-readable progress to a chosen destination, such as pipe:1. If you use -progress pipe:1, redirect stdout intentionally so those progress records are retained rather than lost or mixed unexpectedly. See the FFmpeg command-line documentation for logging, reports, progress, and stdin options.
What survives SSH—and what does not
- SSH disconnect: tmux, Screen, and nohup separate the FFmpeg process from the terminal connection when used correctly.
- FFmpeg waiting for terminal input: use
-nostdin, or redirect stdin from/dev/nullon Linux or macOS. The FFmpeg FAQ documents both approaches: background execution guidance. - Server reboot or shutdown: an ordinary tmux, Screen, or nohup process will not continue running through a reboot. Use a systemd service if the job should be launched at boot.
- Other failures: none of these methods makes a job immune to resource exhaustion, a full disk, failed network input, invalid paths, or an FFmpeg error. Check the process and its logs, and make sure the output destination has space.
Troubleshoot a job that stopped or is hard to find
| Symptom | Likely cause | What to check or do |
|---|---|---|
| FFmpeg appears suspended after being backgrounded. | It is checking terminal input or still has terminal stdin. | Run with -nostdin; for nohup, redirect stdin from /dev/null. These are the background-input remedies documented by the FFmpeg FAQ. |
| You cannot find the tmux session. | You reconnected to a different server, used a different session name, or the session ended. | SSH to the same Linode and run tmux ls. Attach using the listed session name, for example tmux attach -t ffmpeg. |
| The nohup command is running but the log is empty or missing. | The command may have failed immediately, the path may differ from your current directory, or the output redirection may not match the command you started. | Use the explicit log path you supplied, inspect it with tail -f ffmpeg.log, and verify the input/output paths and permissions. Capture both streams with > ffmpeg.log 2>&1. |
| The job disappeared after a reboot. | tmux and nohup do not provide reboot persistence. | Configure and enable a systemd service if the task should start after boot, then inspect that unit’s status and logs. See Linode’s systemd guide. |
| The process still exists but output is not progressing. | The input may be unavailable, the destination may be full, or FFmpeg may have encountered an error. | Inspect the FFmpeg log or tmux output, verify the input source and output path, and check available disk space and server resources. |
Or let it run in the cloud
If your goal is to keep prerecorded videos playing as a 24/7 YouTube live stream rather than run an FFmpeg job on Linode, StreamNeo is a separate cloud option: upload a recording or build a playlist, add your YouTube stream key once, and go live. It loops uploaded videos to YouTube; it does not stream from a camera.
- Nothing has to stay on at home: the stream runs from the cloud.
- Uploaded quality is streamed as made, up to 4K 60fps, at one price per slot with no quality tiers.
- It automatically recovers if YouTube drops the stream.
- The first day is free with no card, one free day per account.
- Monthly: $9.99 per month.
See StreamNeo for details, or start the free first day.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




