You can use FFmpeg to send a still image and looping music to YouTube Live continuously: loop the image, repeat the audio input, pace playback in real time, encode for YouTube, and publish to the stream’s RTMPS address with its private stream key. The command below is a starting point, not a guarantee of 24/7 uptime; the FFmpeg process, computer, network, and YouTube stream all need monitoring.
What the FFmpeg command does
This example loops one image and one music file, encodes the result as H.264 video and AAC audio, and sends it to a YouTube RTMPS ingest endpoint:
ffmpeg -re -loop 1 -framerate 30 -i image.jpg
-re -stream_loop -1 -i music.mp3
-c:v libx264 -tune stillimage -pix_fmt yuv420p -r 30 -g 60
-b:v 2.5M -maxrate 2.5M -bufsize 5M
-c:a aac -b:a 128k -ar 44100
-f flv 'RTMPS_INGEST_URL/STREAM_KEY'
Replace image.jpg and music.mp3 with your file paths. Replace RTMPS_INGEST_URL/STREAM_KEY with the RTMPS server URL and stream key supplied for your YouTube stream. Do not publish a command containing a working key.
The command is an editorial synthesis of the FFmpeg and YouTube documentation, not a tested result or a verbatim official command. FFmpeg documents -re as reading at native frame rate (equivalent to -readrate 1), useful when sending files as a live stream; -stream_loop -1 repeats an input indefinitely. The image input’s -loop 1 makes it continue producing frames. Check your installed build with ffmpeg -version and its help because option availability and input behavior can vary. See the FFmpeg documentation and FFmpeg filters documentation.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →#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.
The output dimensions follow the image’s dimensions unless you add a scaling filter. A 30 fps setting does not make the image 720p: choose an image size and output resolution intentionally, and make the bitrate appropriate for that resolution.
Set up the YouTube Live stream
- In YouTube Studio, create or schedule an encoder-based live stream in Live Control Room.
- Copy the RTMPS ingestion URL and stream key for that stream. Google’s API documentation calls these the ingestion address and stream name; some encoders combine them as
STREAM_URL/STREAM_NAME. Use the actual values YouTube provides rather than guessing a generic endpoint. See the LiveStreams API resource. - Use RTMPS for the connection. YouTube recommends RTMPS, an encrypted form of RTMP, and documents the ingestion configuration in its RTMPS ingestion guide.
- Start FFmpeg, inspect the preview and stream status in Live Control Room, then start or confirm the broadcast according to the controls shown for your stream. Test before making it public.
YouTube describes the incoming liveStream feed and the viewer-facing liveBroadcast as separate concepts. A continuing encoder feed is not itself a promise that one viewer-facing event or archive will remain uninterrupted. The YouTube guide to broadcasts and streams explains this distinction and discusses a 24/7 feed use case.
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.
Choose resolution, bitrate, and keyframes
YouTube’s current encoder settings page (accessed 2026) lists these bitrate ranges and timing guidance. They are recommendations, not guarantees of image quality or audience reach.
| Setting | YouTube guidance | How it maps to the example |
|---|---|---|
| 720p at 30 fps video bitrate | 2–6 Mbps | The example uses 2.5 Mbps, within this range, but its output is not 720p unless the image/output is configured to that resolution. |
| 480p at 30 fps video bitrate | 0.3–3 Mbps | Choose a sustainable value for your resolution and connection; the example’s 2.5 Mbps is within this range too. |
| Keyframe interval | 2 seconds recommended; do not exceed 4 seconds | -g 60 at 30 fps gives a nominal 2-second GOP. If you change frame rate, choose a GOP that preserves the intended interval. |
| Stereo audio | 44.1 kHz sample rate and 128 kbps stereo bitrate | The example sets -ar 44100 and -b:a 128k. |
YouTube’s encoder settings list RTMP/RTMPS ingestion, H.264, H.265, and AV1 video, AAC or MP3 audio, and CBR rate control. This example uses H.264 and AAC. Its bitrate options set a target and maximum, but they do not explicitly request CBR; if YouTube reports a rate-control issue, consult the current YouTube encoder settings and your FFmpeg build’s options. Pick a rate your upload connection can sustain, allow for network variation, and follow YouTube’s advice to run a speed test and test stream.
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.
Test the media and protect the stream key
- Open both files and confirm the image displays correctly and the audio contains usable sound.
- Check that your FFmpeg build supports the required image input loop, encoders, and output protocol.
- Use a deliberate output size and frame rate; do not assume an arbitrary image becomes a standard video resolution automatically.
- Inspect the Live Control Room preview for correct video and audible music. Resolve stream-health messages before promoting the broadcast.
- Keep the key private. YouTube says it identifies where the encoder sends its feed and allows YouTube to accept it; reset it if exposed. Avoid including it in public examples, screenshots, shared logs, or command history others can access. See YouTube’s live stream settings guidance.
- Use music and images that you are authorized to stream, and follow YouTube’s Community Guidelines. Whether a particular file is licensed for your channel depends on the rights and permissions for that file.
What it takes to keep a stream running 24/7
The loop options repeat media; they do not keep a failed process, computer, or internet connection alive. FFmpeg can exit, a file can be unreadable, or the network can drop. YouTube recommends testing and monitoring stream health and messages; its health status reference covers issues such as low bitrate, GOP length, unsupported audio, and missing or inconsistent streams. Its live streaming tips also recommend testing and monitoring.
For unattended operation, arrange for a supervisor to restart a failed FFmpeg process, retain logs, and alert you to failures; ensure the host has reliable power and network access. These are operational safeguards, not a YouTube or FFmpeg uptime guarantee. FFmpeg’s all-options documentation includes an RTMP FIFO muxer recovery example for temporary network failures, but it does not guarantee uninterrupted service and its options may not fit every build or RTMPS setup.
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
Common problems and fixes
| Symptom | What to check |
|---|---|
| YouTube does not receive a feed | Confirm that you copied the ingestion URL and key for the right stream, preserved the expected URL format, and selected RTMPS. Check FFmpeg output for connection or authentication errors. |
| Video is the wrong size or does not appear | Check the image’s actual dimensions and the Live Control Room preview. Add an appropriate scale filter if you need a defined output size. |
| Audio is silent or stops | Verify the music file plays locally, that FFmpeg can read it, and that the audio input is looped with -stream_loop -1. Confirm audible sound in the preview. |
| YouTube reports a bitrate or keyframe issue | Compare the output resolution and frame rate with YouTube’s current recommendations; check that the keyframe interval is two seconds where practical and never over four seconds, and that the upload can sustain the selected bitrate. |
| The stream stops after running for a while | Check whether FFmpeg exited, the host lost power or network, or YouTube reported a health issue. Use logs and a process supervisor for detection and recovery rather than assuming the media loop provides them. |
Or let it run in the cloud
If you want the still image and music to keep looping without leaving a computer running at home, StreamNeo is a YouTube-only cloud service: upload a recording or build a playlist, add your YouTube stream key once, and go live. It keeps the stream running from the cloud, supports uploaded quality up to 4K 60fps at one flat price per slot, and 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.
Quick Recap
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.
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.




