October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Content ID

How to Run a 24/7 YouTube Stream of Public Domain Films with FFmpeg

A practical FFmpeg setup for looping a local film file to YouTube Live, with encoder settings, rights checks, testing, and recovery limits.

By VGSources Team 6 min read
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can keep a YouTube stream of a film running by looping a local video file with FFmpeg, encoding it for YouTube Live, and sending it to the RTMPS ingest address and stream key shown in YouTube Studio. The computer, network connection, and media storage must remain available while FFmpeg runs; first verify the exact film copy and soundtrack are cleared for the territory where you broadcast.

Before you stream: check the film and the copy

“Public domain” is not a blanket guarantee for every copy of a film. Check the exact film version, restoration, soundtrack, and intended territory, and keep a record of where you obtained the file. Internet Archive cautions that rights labels are supplied by uploaders and may be inaccurate. Its U.S.-specific guidance says films completed in 1923 or earlier are generally public domain, but this does not automatically clear later restorations, added soundtracks, or other enhancements; foreign works and later date ranges need particular care. Treat those notes as screening guidance, not a legal clearance ruling. Internet Archive’s film and video guide explains these limitations.

Download a file you have the right to broadcast and test that local file from beginning to end, including its audio. A local file avoids depending on a browser player during playout, but downloading it does not establish that it is cleared for streaming. Preserve the original file and note any separate rights information for its soundtrack or restoration.

Enable YouTube Live and get the encoder details

  1. Enable live streaming for your YouTube channel. YouTube says first-time enablement can take up to 24 hours, so do this before your planned launch.
  2. In YouTube Studio, open Live Control Room and create an encoder stream.
  3. Copy the server URL and stream key displayed for that stream. Treat the key like a password: anyone who obtains it may be able to send video to your broadcast.
  4. Use the current destination shown in Studio rather than guessing an ingest URL. YouTube recommends RTMPS, which encrypts the connection between your encoder and YouTube.

For the current interface and setup details, see YouTube’s guide to creating a live stream with an encoder. FFmpeg’s protocol documentation describes RTMPS: FFmpeg protocols.

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.

Install FFmpeg and prepare a loop

Use an FFmpeg build that includes the H.264 encoder libx264. Confirm it is available in your installation before relying on the example; build options vary. The following is a starting template for one compatible local MP4 file, not a tested command. Replace the filename, ingest URL, and key with your own values. Keep the RTMPS URL and key private; avoid saving a command containing the key in a shared script, log, or screenshot.

ffmpeg -re -stream_loop -1 -i "film.mp4" 
  -c:v libx264 -preset veryfast -pix_fmt yuv420p 
  -r 30 -b:v 5000k -maxrate 5000k -bufsize 10000k -g 60 
  -c:a aac -b:a 128k -ar 44100 
  -f flv "rtmps://YOUR_YOUTUBE_INGEST_URL/YOUR_STREAM_KEY"
  • -stream_loop -1 tells FFmpeg to loop the input indefinitely. It is an input option, so place it before -i.
  • -re, also before -i, reads the file at approximately real-time speed instead of processing it as fast as possible.
  • -c:v libx264 selects H.264 video encoding; -pix_fmt yuv420p is a widely compatible pixel format. -preset veryfast trades some compression efficiency for lower encoding demand.
  • -r 30 sets the output to 30 frames per second. Match the source and your intended broadcast rather than assuming 30 fps is right for every film.
  • -b:v sets the target video bitrate; -maxrate and -bufsize constrain rate variation. The sample values are a starting point for H.264 at 1080p30, not universal settings.
  • -g 60 sets a 60-frame GOP, which is a two-second keyframe interval at 30 fps. YouTube recommends a two-second interval and says not to exceed four seconds.
  • -c:a aac -b:a 128k -ar 44100 encodes AAC audio at the shown bitrate and sample rate. Check the actual source audio and YouTube’s current requirements before publishing.
  • -f flv selects the container used for this RTMP-family ingest workflow. The destination must be the RTMPS server URL and stream key supplied by YouTube Studio.

YouTube’s current encoder table lists 5 Mbps minimum and 14 Mbps recommended video bitrate for H.264 at 1080p30; those figures apply to that resolution and frame-rate combination, not every stream. Use YouTube’s current table to choose settings for your actual resolution and frame rate, and make sure your sustained upload capacity can carry the stream. See YouTube’s encoder settings, bitrates, and resolutions. FFmpeg documents input options and looping in its command-line documentation.

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.

Test, launch, and supervise the stream

  1. Start with a private or unlisted test stream. Confirm that YouTube receives both picture and sound and that the film’s motion and audio behave as expected.
  2. Watch YouTube Live Control Room’s stream health and messages during the test. Resolve warnings before switching to a public broadcast.
  3. When ready, start FFmpeg with the stream details from Studio and verify that the live preview is receiving the intended file.
  4. Keep the computer, network connection, and media storage running continuously. Plan how you will detect a stopped FFmpeg process or network failure and restart it; the command above does not provide unattended process recovery.
  5. Do not assume a very long broadcast will create a complete YouTube archive. YouTube automatically archives streams only when they are under 12 hours. If a full VOD matters, plan shorter sessions and retain the original media and any separate recording.

YouTube recommends testing with audio and motion similar to the real stream and monitoring stream health and messages during the event. Its encoder setup guide covers stopping an encoder stream and other live setup details: Create a YouTube live stream with an encoder.

Understand copyright and Content ID interruptions

YouTube scans live streams for third-party content. If it detects a match, it may replace the video with a placeholder and warn the creator; if the content remains, YouTube may interrupt or terminate the live stream. A film that appears to be public domain can still trigger a match because a restoration, soundtrack, or other element may have separate rights. YouTube also says that licensed third-party material may require the rights holder to add your channel to its Content ID allowlist, even if you have a license. Review YouTube’s copyright guidance for live streams and resolve rights issues before relying on a broadcast as continuous programming.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • 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.

Troubleshoot common failures

  • YouTube does not receive the stream: Check that live streaming is enabled, the stream is active in Live Control Room, and the server URL and stream key were copied correctly. Do not substitute an address from an old command or infer a URL.
  • FFmpeg reports an unknown encoder: Your build may not include libx264. Use a build with that encoder or adjust the command for an encoder actually available in your installation.
  • The file will not open or has no audio: Test the local file with a media player and inspect whether its video and audio streams decode. Choose a compatible local file and verify both tracks before launching.
  • Video buffers, drops frames, or stream health degrades: Compare actual sustained upload capacity with the selected output bitrate, and check YouTube’s current recommended settings for the chosen resolution and frame rate. A brief speed-test result does not by itself establish stable capacity over a continuous broadcast.
  • The stream stops after a network or process failure: The loop option only repeats the input while FFmpeg is running. It does not restart FFmpeg after a crash or restore a broken connection; you need monitoring and a restart plan.
  • The live picture is replaced or the broadcast ends: Check Live Control Room notifications and investigate Content ID or other rights claims for the exact film version, restoration, soundtrack, and territory. A public-domain label on a download page is not proof that every element is cleared.
  • No complete archive appears: A stream longer than 12 hours is not automatically archived by YouTube. Use shorter sessions if the platform archive is essential, and keep independent copies of the source and any recording you need.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or let it run in the cloud

If you want continuous YouTube playback without leaving a home computer on, StreamNeo is a cloud option: upload your recording or build a playlist, add your YouTube stream key once, and go live. It loops uploaded videos from the cloud, not a live camera feed. Nothing has to stay on at home; the stream plays the file as uploaded up to 4K 60fps at one flat price per slot, with automatic recovery if YouTube drops the stream. The first day is free with no card (one free day per account). Monthly is $9.99 per month. See StreamNeo or pricing and plan details. Start your free day on StreamNeo.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 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.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • 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

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from Patch Notes

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.