A good Docker setup for a 4K 60fps YouTube Live playlist is a long-running FFmpeg container that reads a prepared playlist, encodes it using a codec your host can sustain in real time, and sends it to YouTube over RTMPS. There is no universally best Compose file: your operating system, GPU and drivers, FFmpeg build, media formats, upload stability, and transition requirements all affect the right configuration. The example below is a starting point for compatible local files—not a tested, gapless, production guarantee.
Choose the output settings before building the container
YouTube’s current encoder guidance, accessed 2026-10-03, lists 2160p (4K) at up to 60 fps. Its published 4K60 recommendations depend on the output codec:
| Output codec | YouTube minimum bitrate | YouTube recommended bitrate | Practical consideration |
|---|---|---|---|
| H.264 | 14 Mbps | 50 Mbps | Common FFmpeg choice; confirm the selected software or hardware encoder is available in your container. |
| H.265 / HEVC | 10 Mbps | 35 Mbps | YouTube lists this for 4K60; confirm both your FFmpeg encoder and YouTube’s current ingest support. |
| AV1 | 10 Mbps | 35 Mbps | YouTube lists this for 4K60; confirm the encoder, GPU or CPU capability, and FFmpeg build support. |
These are YouTube’s published encoder targets, not a measurement of your connection or hardware. The sample below uses H.264 at 50 Mbps. Choose another codec and its corresponding bitrate only after verifying that YouTube accepts it and your FFmpeg build and hardware can encode it. YouTube also specifies constant bitrate (CBR), recommends a 2-second keyframe interval, and says not to exceed 4 seconds. It accepts RTMP/RTMPS and recommends RTMPS; its encoder guidance says RTMPS encrypts delivery to Google’s servers. See YouTube’s live encoder settings and the YouTube Live Streaming API ingestion reference.
Allow for audio and network variation
A 50 Mbps video target is not the entire uplink requirement: audio adds to the outgoing stream, and a continuous stream needs stable upload capacity above the combined bitrate. YouTube’s bitrate target does not establish a universal headroom figure. Test the actual wired or hosting connection under realistic conditions; a link that only briefly reaches the target is not a dependable basis for a 24/7 stream.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- 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.
Check the host and FFmpeg image first
- Pick a platform. Establish the host OS, Docker Engine and Compose versions, and whether you can configure the required GPU drivers and container runtime. Docker’s GPU instructions describe prerequisites; Docker does not install the host driver or make GPU access identical on every platform.
- Verify the media. Check that playlist items have compatible stream layouts and codecs. The example assumes one video stream and one audio stream per file, compatible inputs, and a 60fps SDR output. Mixed formats, missing audio, HDR, or incompatible stream layouts need a separately designed and tested command.
- Verify the actual binary. Select an image whose FFmpeg build contains the needed input demuxer, encoder, FLV muxer, and RTMPS protocol support. Inside the image, inspect
ffmpeg -version,ffmpeg -protocols, and the relevant encoder help, such asffmpeg -h encoder=h264_nvenc. FFmpeg options and available encoders vary by build. Its references cover command-line media processing and protocols including RTMPS. - Decide whether to encode on GPU. GPU encoding can reduce CPU encoding work, but it requires compatible hardware, host drivers, container runtime access, and an FFmpeg build with that encoder. NVIDIA documents
h264_nvenc,hevc_nvenc, andav1_nvencintegrations; availability is not guaranteed just because the host has an NVIDIA GPU. See NVIDIA’s FFmpeg hardware-acceleration guidance.
Prepare the playlist and protect the stream key
For this starter configuration, put compatible media files and a concat-demuxer list in a host directory called media. The playlist file is plain text, with one entry per file:
file 'part-01.mp4'
file 'part-02.mp4'
file 'part-03.mp4'
Keep the list and files in the same mounted directory. The sample uses -safe 0 so the list can refer to paths that the concat demuxer otherwise treats as unsafe; use only a list you control. Prefer simple filenames without quotes or line breaks. This arrangement does not promise gapless transitions: input timestamps, differing stream parameters, and end-of-file behavior can create discontinuities. Test the exact playlist and inspect transitions before leaving it unattended.
Rank #2
- 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.
Copy the RTMPS ingest address and stream key from YouTube Studio, and keep them private. The Compose configuration below expects YOUTUBE_RTMPS_URL to contain the full ingest URL, including the key, and FFMPEG_IMAGE to name the verified image you selected. Store those values in a local .env file beside the Compose file, restrict access to it, and do not commit it or publish rendered Compose output. Because the URL is passed to FFmpeg as an argument, a host administrator may be able to see it in process or container inspection; use a secret-aware wrapper if your deployment requires stronger protection.
Start with a GPU-enabled Compose service
This example assumes a Linux Docker host with working NVIDIA Container Toolkit configuration, one compatible NVIDIA GPU, a verified FFmpeg image whose executable is named ffmpeg, and the media layout above. It is a starting point; test it against your specific image and host.
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.
services:
playlist:
image: ${FFMPEG_IMAGE:?Set FFMPEG_IMAGE to a verified FFmpeg image}
entrypoint: ["ffmpeg"]
restart: unless-stopped
volumes:
- ./media:/media:ro
environment:
YOUTUBE_RTMPS_URL: ${YOUTUBE_RTMPS_URL:?Set YOUTUBE_RTMPS_URL from YouTube Studio}
command:
- -re
- -stream_loop
- "-1"
- -f
- concat
- -safe
- "0"
- -i
- /media/playlist.txt
- -map
- 0:v:0
- -map
- 0:a:0?
- -r
- "60"
- -c:v
- h264_nvenc
- -rc
- cbr
- -b:v
- 50M
- -maxrate
- 50M
- -bufsize
- 100M
- -g
- "120"
- -c:a
- aac
- -b:a
- 192k
- -ar
- "48000"
- -f
- flv
- ${YOUTUBE_RTMPS_URL:?Set YOUTUBE_RTMPS_URL from YouTube Studio}
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
The 120-frame GOP corresponds to YouTube’s recommended 2-second keyframe interval at the configured 60 fps. The command asks for a 60fps output; it does not make lower-frame-rate source material native 60fps. The optional audio map allows FFmpeg to start if no audio stream is present, but a YouTube stream without sound may not suit your channel. Remove the question mark and require an audio stream if that is your intended behavior. Verify the selected encoder accepts these options in your image before deployment.
Compose GPU reservations require capabilities: [gpu]; use either count or device_ids, not both. See Docker Compose GPU access and Docker’s GPU access prerequisites. NVIDIA’s broader FFmpeg integration overview describes its Video Codec SDK integration.
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
CPU-only alternative
If you do not have a supported GPU, remove the deploy.resources.reservations.devices section and replace h264_nvenc with an available H.264 software encoder, commonly libx264. Then verify the chosen encoder’s CBR behavior and whether the host can sustain 4K60 encoding in real time. No universal CPU threshold is established here; workload, settings, and hardware matter. If the encode falls behind, GPU access alone is not a fix unless the container can see a compatible device and encoder.
Bring it live and decide who owns recovery
- Check YouTube first. In YouTube Studio, create or open the intended live stream and obtain its RTMPS ingest URL and stream key. Confirm the stream’s title, visibility, and any channel eligibility or live-stream restrictions in Studio before connecting.
- Validate the container. Start with a short controlled run and inspect logs for missing encoders, unsupported options, unreadable media, or RTMPS connection errors. Confirm the output is 3840Ă—2160 at 60fps and that the selected codec and bitrate match the intended YouTube settings.
- Start Compose. Run
docker compose up -d, then follow the service logs withdocker compose logs -f playlist. Check YouTube’s live preview before relying on the broadcast. - Test interruption behavior. Observe what happens at playlist end, during a network interruption, after an FFmpeg exit, and after a host restart. The Compose
restart: unless-stoppedpolicy restarts an exited container under Docker’s restart-policy behavior; it does not establish that FFmpeg will resume the right playlist position or recover every YouTube disconnect. Build and test the recovery behavior you actually require. - Monitor the service. Keep logs accessible and monitor process health, host resources, network connectivity, and YouTube’s stream status. Assign a person or system to respond to failures; neither a looping input nor a restart policy is a complete monitoring plan.
Rights and channel-policy checks
Only stream material you have the rights to broadcast, including music, footage, and any included performances. Replaying prerecorded material as a live stream does not make it exempt from copyright claims or YouTube’s channel policies. Review YouTube’s current rules for copyright, monetization, and reused or repetitive content; compliance and monetization outcomes depend on the content and channel, and are not guaranteed by this setup.
Recommended Free Tools
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.
Troubleshoot the failures most likely to stop a 4K60 playlist
| Symptom | Likely cause | What to check or change |
|---|---|---|
| FFmpeg reports an unknown encoder or option | The image lacks the encoder or uses a different FFmpeg build. | Inspect ffmpeg -version and ffmpeg -h encoder=...; use an encoder and options supported by that image. |
| GPU reservation fails or NVENC is unavailable | Host drivers, NVIDIA Container Toolkit, Compose configuration, GPU compatibility, or image support is missing. | Check Docker’s host prerequisites and device reservation; verify visibility and the encoder inside the container. For NVIDIA, review Docker’s GPU instructions and Compose GPU guidance. |
| YouTube shows an ingest or connection error | Incorrect or expired stream key, wrong ingest URL, blocked egress, or missing RTMPS protocol support. | Recheck the URL and key in YouTube Studio, verify RTMPS support in the image, and confirm outbound connectivity. Do not paste a live key into a public issue or log. |
| Playback is choppy or falls behind | The encoder cannot maintain real time, source files are difficult to decode, or the uplink is unstable. | Inspect FFmpeg logs and host utilization; test the media separately, reduce unnecessary processing, or use a compatible hardware encoder. Check sustained upload capacity against video plus audio bitrate. |
| Playlist stops or has a visible gap at a transition | File incompatibility, timestamps, end-of-file behavior, or loop handling. | Confirm list paths and input compatibility; test the same playlist repeatedly and inspect stream continuity. Do not assume looping makes transitions seamless. |
| Stream is not 4K60 despite the command | The source is lower resolution or frame rate, YouTube is still processing the preview, or output settings differ from expectations. | Check source media properties, FFmpeg output logs, and YouTube’s stream health and preview. A 60fps output setting cannot restore detail absent from the source. |
Or let it run in the cloud
If you would rather not maintain a Docker host, 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. Nothing has to stay on at home; it plays uploaded videos rather than going live from a camera. It automatically recovers if YouTube drops the stream. Videos stream as uploaded, up to 4K 60fps, at one flat price per slot rather than quality tiers. The first day is free with no card. Monthly service is $9.99 per month. To try the free first day, create a StreamNeo account.
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.




