You can use SRS on Ubuntu to receive a looping video from FFmpeg, but the standard SRS example does not by itself forward that video to YouTube. The documented SRS workflow verifies the first connection—FFmpeg to SRS—while YouTube’s setup requires an encoder to connect to YouTube using the stream URL and key. For a straightforward YouTube loop, send FFmpeg directly to YouTube; use SRS when you also need its local ingest or playback, and configure and verify a separate outbound relay before treating SRS as the middle of an end-to-end broadcast.
How the streaming pieces fit together
SRS (Simple Realtime Server) is a media server. Docker is the convenient way shown in SRS’s getting-started guide to run it. FFmpeg reads a media file and publishes its audio and video to an ingest address. YouTube Live is the destination for the public stream.
These are separate links in the chain. SRS’s official loop example publishes FFmpeg output to SRS at rtmp://host.docker.internal/live/livestream; YouTube’s encoder instructions describe publishing to a YouTube server URL and stream key. The cited examples do not document a version-specific SRS configuration that relays an incoming SRS stream to YouTube. Do not assume that a successful FFmpeg-to-SRS publish is live on YouTube. SRS Getting Started · YouTube’s RTMPS instructions
Choose the architecture before configuring anything
- Direct to YouTube: FFmpeg reads and loops the file, then publishes directly to YouTube with its Live Control Room URL and key. SRS is not required. This is the simpler documented path when local SRS ingest or playback is not needed.
- Through SRS: FFmpeg publishes to SRS, and a separately configured outbound relay must then publish to YouTube. This adds a stage and requires a verified relay configuration for the SRS version and deployment you use.
The SRS repository identifies version 8.0, lists protocols including RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181, and recommends Docker. A separate SRS v7 RTMP guide is marked unstable; do not treat its branch-specific examples as a production-version guarantee. Check the SRS repository and the SRS v7 RTMP guide for the version you choose.
#1 Best Overall
Run SRS on Ubuntu with Docker
SRS’s Getting Started page gives this Docker example:
docker run --rm -it -p 1935:1935 -p 1985:1985 -p 8080:8080 ossrs/srs:5
This is an upstream example, not a recommendation that the :5 tag is the current or right tag for every deployment. The current repository README shows a different image tag and additional UDP ports. Before using SRS for a persistent stream, verify and deliberately choose an upstream image tag for your version, configure container restart behavior, and provide persistent configuration or data where your setup needs it. Treat Docker port publishing and firewall rules as separate security decisions: expose only the ports required by your clients, and do not make management or playback ports public without a reason. The upstream example documents ports, not a hardened production setup.
Check that the local SRS example responds
With the example container running on the same machine, open http://localhost:8080/. The guide also shows HLS and HTTP-FLV playback paths for a published stream:
Rank #2
- 12th Intel Alder Lake N95 Processor – The GMKtec G3 S Mini PC is powered by the 12th Gen Intel N95 processor with 4 cores, 4 threads, 6MB cache and a burst frequency up to 3.4GHz. Compared with N100/N5105/N5100/N5095, the N95 delivers up to 36% overall performance improvement. Perfect for routine tasks, office work, and home entertainment, this compact mini desktop is more convenient than traditional bulky PCs.
- 8GB RAM & 256GB SSD Storage – Pre-installed with 8GB DDR4 memory and a fast 256GB M.2 2242 SSD, the G3 S mini desktop offers quicker startup, smoother multitasking, and faster file transfers. Enjoy seamless performance whether you’re working on multiple applications, browsing, or streaming content.
- Rich Interfaces & Connectivity – The G3 S mini computer comes equipped with USB 3.2 (up to 10Gbps), dual HDMI 2.0 (4K@60Hz), and a 3.5mm audio jack. With support for WiFi 5, Bluetooth 5.0, and Gigabit Ethernet (RJ45 1000MbE), it connects easily with monitors, projectors, printers, office equipment, and other peripherals, making it versatile for both home and business use.
- Dual 4K Display Support – Featuring upgraded Intel UHD Graphics (up to 1000MHz), the G3 S supports 4K video playback and AV1 decoding for a smooth viewing experience. With dual HDMI outputs, you can connect two 4K@60Hz displays simultaneously, enabling efficient multitasking for work and entertainment.
- GMKtec WARRANTY - GMKtec offers a 1-year limited GMKtec's warranty for each mini PC, starting from the date of the purchase. All defects due to design and workmanship are covered. With a professional after sales team always ready to attend to your needs, you can simply relax and enjoy your mini PC.
- HLS:
http://localhost:8080/live/livestream.m3u8 - HTTP-FLV:
http://localhost:8080/live/livestream.flv
These local URLs are useful for checking the example, but they do not demonstrate a YouTube broadcast. From another machine, localhost refers to that other machine, not your Ubuntu server; use an address reachable from the publishing or playback process and configure Docker networking and firewall access accordingly. The host.docker.internal name in SRS’s example likewise depends on the environment and should not be assumed to resolve on every Linux installation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Loop a video from FFmpeg into SRS
The SRS guide’s Docker-based encoder example uses -stream_loop -1 for indefinite repetition and publishes to SRS. Its sample input, doc/source.flv, is part of the SRS source repository, not a file that will necessarily exist in your working directory:
docker run --rm -it ossrs/srs:encoder ffmpeg -stream_loop -1 -re -i doc/source.flv
-c copy -f flv rtmp://host.docker.internal/live/livestream
Replace the sample input with a media file accessible to FFmpeg. If FFmpeg runs directly on Ubuntu and SRS’s RTMP listener is reachable on that host, the equivalent local publishing form is:
Rank #3
ffmpeg -stream_loop -1 -re -i /path/to/video.mp4 -c copy -f flv rtmp://127.0.0.1:1935/live/livestream
This direct-host command adapts the documented SRS publisher URL and loop option. -stream_loop -1 repeats the input indefinitely, -re reads it at its native rate rather than sending it as fast as possible, and -c copy copies the existing audio and video streams instead of encoding them again. Copying works only when the input streams are compatible with the destination ingest. SRS’s official examples establish publishing into SRS, not that every file or codec will be accepted by YouTube. If YouTube rejects the media, inspect FFmpeg’s output and YouTube’s stream health; a transcoding command for a particular input should be chosen and tested for that file.
Get YouTube’s ingest URL and stream key
- In YouTube Studio, create or schedule a live stream and open its Live Control Room.
- Under Stream settings, copy the server URL and stream key supplied for that stream.
- For secure ingest, use the lock icon in Stream settings to reveal the RTMPS URL, then copy that exact URL. YouTube says to use the RTMPS address provided in Live Control Room rather than assuming a default RTMP address. RTMPS is RTMP over TLS/SSL and encrypts the connection.
- Enter the URL and key in the encoder that is publishing directly to YouTube. Keep the key secret; anyone with it may be able to send a stream to your broadcast.
YouTube’s official guide describes the encoder-to-YouTube connection and recommends RTMPS: Encrypt your stream using RTMPS. Do not put the YouTube URL and key into an SRS configuration by guesswork. A working SRS-to-YouTube relay needs its own version-appropriate configuration and verification, which the SRS getting-started and loop examples cited above do not supply.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Set encoder quality for YouTube Live
YouTube lists RTMP/RTMPS ingest, H.264, H.265/HEVC, or AV1 video, frame rates up to 60 fps, AAC or MP3 audio, and constant bitrate (CBR) encoding in its encoder guidance. It recommends a two-second keyframe interval and says not to exceed four seconds. Bitrate depends on resolution, frame rate, and codec; the examples below are YouTube’s published recommendations, not guarantees of stream quality or audience outcomes. The retrieved page does not state a publication year.
Rank #4
- OFFICE LIGHT GAMING MINI PC - GMKtec Nucbox G10 Series is equipped with the Ryzen 5 3500U, a 64-bit quad-core mid-range performance x86 mobile microprocessor. This processor is based on AMD's Zen+ microarchitecture and is fabricated on a 12 nm process. The 3500U operates at a base frequency of 2.1 GHz with a TDP of 15 W and a Boost frequency of 3.7 GHz. This APU supports up to 32 GB of dual-channel DDR4-2400 memory and incorporates Radeon Vega 8 Graphics operating at up to 1.2 GHz. 35% Performance increase over the similar Intel N-Series N150/N100/N97/N95 processor chips
- 16GB DDR4 + 1TB SSD - Installed with DDR4 16GB SO-DIMM RAM and a 1TB SSD, the Nucbox G10 mini pc supports memory expansion to 64GB RAM. Featured with Dual M.2 2280 PCIe 3.0 slots, supports dual storage slot expansion to 16TB SSD (2*8TB). (Upgrades not included) This model supports a configurable TDP-down of 12 W and TDP-up of 35 W
- 2.5GBE ETHERNET FAST NETWORK SPEEDS - Enjoy up to 2500Mbps data transmission speed without worrying about lagging. Ideal for working, gaming, and surfing the internet. Great for Untangle, Pfsense or as a server office PC
- MINI DESKTOP COMPUTER WITH TRIPLE DISPLAY SCREEN - Nucbox G10 integrates AMD Radeon Vega 8 1200 MHz GPU to deliver powerful graphics processing power to easily handle video editing, and playback, or casual gaming. And it can connect to 3 display screens simultaneously via HDMI 2.1 TMDS/ DPv1.4/ TYPE-C
- FAST WIRELESS INTERNET WIFI 5 + BT5.0 - Enjoy blazing WiFi 5 & Bluetooth 5.0 alongside a powerhouse selection of ports - dual USB 3.2, USB 2.0, stunning 4K@60Hz HDMI 2.1 TMDS, Full Function USB-C (PD/DP/Data), dedicated DisplayPort, 3.5mm audio, and PD Power Supply for seamless multitasking and premium connectivity
| Resolution and frame rate | Video codec | Minimum bitrate | Recommended bitrate |
|---|---|---|---|
| 1080p at 30 fps | H.264 | 5 Mbps | 14 Mbps |
| 1080p at 30 fps | AV1 or H.265/HEVC | 4 Mbps | 10 Mbps |
| 720p at 30 fps | H.264 | 3 Mbps | 8 Mbps |
Choose a bitrate that fits the selected resolution, frame rate, codec, and reliably available upload capacity. YouTube recommends running a speed test, testing with representative audio and video motion, and monitoring stream health. See YouTube’s encoder settings, bitrates, and resolutions for its full guidance.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Direct-to-YouTube FFmpeg is a separate architecture
If your aim is simply to loop a file on YouTube and you do not need SRS as an intermediate server, publish from FFmpeg directly to the YouTube server URL and key in Live Control Room. YouTube documents encoder-based streaming, but the sources cited here do not establish a tested, copy-paste FFmpeg command for a particular file, codec, or YouTube account setup. Configure the encoder for YouTube’s ingest settings and the media you actually have; do not substitute the SRS RTMP address for YouTube’s server URL.
For a self-hosted architecture that does use SRS, first verify the separate outbound forwarding step for your exact SRS version and deployment. Until that relay is configured and tested, you can confirm local SRS ingest or playback, but not the complete SRS-to-YouTube path.
Free tools Windows power users keep installed
One-click scans. No signup required.
Best Value
Troubleshoot the connection that is failing
- YouTube reports an SSL or secure-connection problem: Confirm that you copied the RTMPS server URL shown under the Live Control Room lock icon and that the scheme is
rtmps, notrtmp. YouTube says to try port 443 if needed and compatible with the provided URL. - The stream does not appear in YouTube: Identify where FFmpeg is publishing. A successful publish to
rtmp://127.0.0.1:1935/live/livestreamproves that FFmpeg reached SRS; it does not prove an outbound connection to YouTube exists. Check the encoder’s destination, key, and YouTube stream health, or verify the separately configured SRS relay. - SRS works locally but not from a remote machine: Check that the remote process uses the Ubuntu server’s reachable address rather than its own
localhost, and check Docker port publishing, firewall rules, and the listener address. Networking varies by host and container configuration. - The video loops but ingest fails or stream health is poor: Read FFmpeg’s logs and YouTube’s stream-health information. Check that the file’s codecs and timestamps are acceptable, that the selected encoder settings match the media, and that upload capacity is sufficient for the chosen bitrate. The cited setup examples do not establish compatibility for every input file.
Or let it run in the cloud
If maintaining an Ubuntu host and verifying an SRS relay is more work than you want, StreamNeo is a cloud service for keeping a YouTube channel live from uploaded videos. Upload a recording or build a playlist, add your YouTube stream key once, and go live. StreamNeo loops uploaded video from the cloud; it does not broadcast a live camera feed. Nothing has to stay on at home, it supports any uploaded quality up to 4K 60fps at one flat price per slot, and it automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly billing is $9.99 per month. Start your free day with StreamNeo.
For a self-hosted route, YouTube’s encoder setup guidance also lists software alternatives, including OBS and Gyre; the listing does not establish current pricing for those services.
Quick 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.

