October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
DocumentaryTube
Admit one · Blog

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

Loop a local film file with FFmpeg and stream it to YouTube Live. Learn the setup, encoding settings, rights checks, testing steps and archive limits.
Opened Runtime6 min Written byDocumentaryTube Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can run a continuous YouTube stream by looping a local film file with FFmpeg and sending the encoded video to the RTMPS server URL and stream key shown in YouTube Studio. The computer, network connection and media storage must remain available, and the film’s rights must be checked for the exact print, soundtrack and territory—not just assumed from a “public domain” label.

Before you start

  • A cleared film file: Use a local file you have the right to stream. Check the film, the particular restoration or print, its soundtrack and the countries where you plan to broadcast. An archive’s rights label is not a guarantee that every element is clear.
  • FFmpeg: Install a build that can read your file and encode H.264 video and AAC audio. Confirm the file plays and decodes before scheduling a long stream.
  • YouTube Live access: Enable live streaming and create an encoder stream in YouTube Studio. First-time enablement can take up to 24 hours, according to YouTube’s encoder setup guidance.
  • Continuous local resources: The computer, stable internet connection and the storage containing the film need to stay available for the entire broadcast. Plan how you will detect and restart a failed FFmpeg process or network connection.

Check the film’s rights before streaming

“Public domain” is not a universal clearance for every copy or country. The Internet Archive says its rights information is supplied by uploaders and may be inaccurate. Its U.S.-specific guidance says films completed in 1923 or earlier are generally public domain, but that generalization does not settle rights in later restorations, new soundtracks or other enhancements; it also flags uncertainty around later dates and foreign works. See its film and video guide for context, not as a definitive legal ruling.

Check the precise version you intend to broadcast, including its soundtrack and restoration, and consider the territories where your stream will be available. A local download solves a playout dependency on a browser player; it does not establish that the file is cleared for broadcast.

Enable YouTube Live and get the ingest details

  1. Open YouTube Studio and enable live streaming if you have not already. Allow up to 24 hours for first-time activation.
  2. In YouTube Studio’s Live Control Room, create an encoder stream and open its stream setup details.
  3. Copy the server URL and stream key exactly as displayed. Treat the key like a password: do not publish it or include it in screenshots or logs you share.
  4. Use YouTube’s RTMPS destination from the setup details. YouTube recommends RTMPS, and FFmpeg documents the protocol in its protocol documentation. Do not infer the ingest URL from a placeholder or another stream.

Loop and encode one film with FFmpeg

This template loops one compatible local file indefinitely, reads it at real-time speed and sends H.264 video with AAC audio to YouTube. Replace the input filename and the destination with the exact values for your setup:

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 -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"

This is a starting configuration, not a tested command for every FFmpeg build, file or machine. Confirm your installed build and input first, then run a private or unlisted test before broadcasting publicly. FFmpeg documents -stream_loop -1 as infinite looping; because it is an input option, place it before -i. The -re option also belongs before -i when pacing file reading to real time. See the FFmpeg documentation.

Match bitrate and keyframes to the video

The example’s video settings are for H.264 at 1080p30: YouTube’s current encoder table lists 5 Mbps as the minimum and 14 Mbps as the recommended video bitrate for that resolution and frame rate. It recommends a 2-second keyframe interval and says not to exceed 4 seconds. At 30 fps, -g 60 requests a keyframe every 60 frames, or two seconds. These figures come from YouTube’s encoder settings guidance; check its current table and match resolution, frame rate and bitrate to your source and sustained upload capacity before publishing.

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.

The example sets a 5 Mbps target and maximum video bitrate with a 10 Mbps buffer. If you change the frame rate or resolution, revisit the bitrate and keyframe settings instead of assuming the 1080p30 values still fit. The audio options encode AAC at 128 kbps and 44.1 kHz. Ensure the source has the audio you intend to carry; a file without an audio stream may require different handling.

Looping one file versus building a schedule

-stream_loop -1 repeats the input file indefinitely. It does not create a playlist or schedule transitions between multiple films. For a multi-film broadcast, plan and validate the playout order separately; make sure every file is available and decodes correctly, and check rights for every film and version. The YouTube ingest settings and stream key still need to match the encoder stream you created.

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.

Test the stream and supervise it

  1. Start with a private or unlisted test and check that YouTube receives the feed.
  2. Test representative motion and audio—not only a static opening frame—and inspect the image, sound and stream-health messages in YouTube Studio.
  3. Confirm the video is paced in real time, the audio is present and synchronized, and the feed remains stable at the intended settings before making it public.
  4. Keep the computer, network and media storage running. Set up a way to notice a process exit or connection failure and restart FFmpeg. YouTube’s encoder instructions describe stopping an encoder stream but do not promise unattended FFmpeg recovery.

Copyright and Content ID can interrupt a stream

YouTube scans live streams for third-party content. If it detects a match, it may replace the video with a placeholder and issue a warning; if the content remains, it may interrupt or terminate the stream. YouTube also says that a license may not by itself prevent a live interruption: the rights owner may need to add the channel to its Content ID allowlist. Review YouTube’s live-stream copyright guidance and resolve rights with the relevant owner before going live.

Plan for streams longer than 12 hours

YouTube automatically archives streams only when they are under 12 hours. A stream left live beyond that duration is not guaranteed a complete automatic archive. If you need a dependable VOD, plan shorter sessions and preserve the original film files; arrange any separate recording you require rather than relying on YouTube to archive a longer broadcast. This archive condition is described in YouTube’s encoder setup guidance.

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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common problems and fixes

Symptom What to check Practical fix
YouTube does not receive the stream Live access, stream setup details, destination URL and key. Confirm live streaming is enabled, copy the current server URL and key from the Live Control Room, and check that the destination uses RTMPS.
FFmpeg cannot open or decode the film Filename, path, file accessibility and whether your FFmpeg build supports the input’s format. Test the exact local file before starting a long session; use a playable file you have rights to stream.
The picture stutters or YouTube reports poor stream health Sustained upload capacity and whether your bitrate, resolution and frame rate match the source and connection. Use YouTube’s current encoder table to choose settings the connection can sustain; test with representative motion and watch stream-health messages.
The stream ends when the computer or connection stops Whether the machine, network and media storage are continuously available, and whether FFmpeg exited. Keep those resources running and establish a way to detect a failure and restart the process. FFmpeg’s loop option repeats the input; it does not itself guarantee recovery after a process or network failure.
Video is replaced, warned or interrupted despite a public-domain label The exact print, restoration, soundtrack, territory and any Content ID match. Review the rights for the exact version and contact the rights holder where needed; a rights owner may need to allowlist your channel for Content ID.
No automatic archive appears for a long broadcast Whether the stream exceeded YouTube’s 12-hour automatic-archive condition. Use sessions under 12 hours when relying on automatic archiving, and make separate recording arrangements if needed.

Or let it run in the cloud

If you want the film to keep looping without leaving a computer on at home, StreamNeo is a YouTube-only cloud service for uploaded videos. Upload the recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; each slot streams the video as uploaded at any quality up to 4K 60fps for one flat price, with automatic recovery if YouTube drops the stream. The first day is free with no card. The monthly option is $9.99 per month. See StreamNeo or its 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.

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.

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

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 the Screening Room

  1. What Was the “Harry Potter by Balenciaga” AI Video—and Was It a Real Ad?Admit one · BlogWhat Was the “Harry Potter by Balenciaga” AI Video-and Was It a Real Ad?Opened02 OCT 2026Runtime5 min
  2. YouTube’s Erase Song Tool Removes Claimed Music Without Silencing Your Whole VideoAdmit one · BlogYouTube's Erase Song Tool Removes Claimed Music Without Silencing Your Whole VideoOpened23 SEP 2026Runtime8 min
  3. ‘I, Robot’ Director Alex Proyas Calls Out Elon Musk Over Tesla DesignsAdmit one · Blog'I, Robot' Director Alex Proyas Calls Out Elon Musk Over Tesla DesignsOpened05 SEP 2026Runtime4 min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair 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.