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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

You can loop a local film file indefinitely with FFmpeg and send it to YouTube Live using the RTMPS server URL and stream key from YouTube Studio. The setup requires an enabled YouTube Live account, a compatible video file, enough sustained upload capacity, and a computer that stays on. First verify that the exact film version is cleared for your channel and audience’s territory: a public-domain label does not necessarily cover a restoration or a later soundtrack.

Before you stream: check rights and prepare the film

Clear the exact version, not just the title

Public-domain status can depend on the specific print, soundtrack, restoration, and territory. Internet Archive cautions that rights labels on its site are supplied by uploaders and are not guaranteed to be accurate. Its guidance says that, for U.S. films, works completed in 1923 or earlier are generally public domain, but that generalization does not clear a later restoration or soundtrack, and it does not settle rights in other territories or for foreign works. Treat those notes as screening leads, not legal clearance. See the Internet Archive’s guide to movies and videos, and verify the precise copy and territory before broadcasting.

Use a local file that FFmpeg can read

Download a file you have the right to stream and confirm it plays and decodes locally. A local copy avoids relying on a browser player during continuous playout, but it does not establish that the film is rights-cleared. Internet Archive notes that some formats cannot be streamed in its player and suggests using download links in those cases. Keep the media on storage that remains available throughout the stream; an external drive is optional, and the capacity you need depends on your library.

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

Enable YouTube Live and get the ingest details

  1. Enable live streaming. Sign in to YouTube and enable live streaming for the channel. YouTube says first-time enablement can take up to 24 hours, so do this before the planned start.
  2. Create an encoder stream. In YouTube Studio, open Live Control Room and create a stream for encoder software. Copy the server URL and stream key shown in the live setup details.
  3. Protect the stream key. Treat it like a password: do not publish it or include it in screenshots. If it is exposed, replace it in YouTube Studio and update the FFmpeg destination.

Use the exact ingest URL supplied by YouTube rather than guessing or reconstructing it. YouTube recommends RTMPS, the encrypted extension to RTMP. Its instructions for creating a stream are at Create a YouTube live stream with an encoder; transport details are in FFmpeg’s protocols documentation.

Loop a film file with FFmpeg

For one compatible local file, this is a starting configuration template—not a tested command. Replace the destination with the RTMPS URL and stream key copied from YouTube Studio. Confirm your FFmpeg build supports the chosen codecs and test privately or as an unlisted stream before scheduling a public broadcast.

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"

What the important options do

  • -re reads the file at real-time pace. Put it before the input’s -i.
  • -stream_loop -1 tells FFmpeg to loop the input indefinitely. This is an input option, so put it before -i as shown.
  • -c:v libx264 encodes video as H.264; -pix_fmt yuv420p selects a commonly supported pixel format.
  • -r 30 sets output frame rate to 30 fps. Match the source and your chosen YouTube settings where possible rather than assuming 30 fps fits every film.
  • -b:v sets target video bitrate; -maxrate and -bufsize constrain rate variation and buffering.
  • -g 60 sets a 60-frame keyframe interval. At 30 fps, that is two seconds.
  • -c:a aac -b:a 128k -ar 44100 encodes AAC audio at 128 kbps and 44.1 kHz.
  • -f flv selects the muxing format used for this RTMP-family ingest workflow.

Choose bitrate and keyframes for the actual source

YouTube’s current encoder settings table lists H.264 1080p30 video at 5 Mbps minimum and 14 Mbps recommended. It recommends a two-second keyframe interval and says not to exceed four seconds. The example’s 5 Mbps target is therefore a starting point at the listed minimum, not a universal best setting. Match resolution, frame rate, and bitrate to the source and to upload capacity that can be sustained continuously; check YouTube’s current table for other formats before going live. See YouTube’s encoder settings, bitrates, and resolutions.

Test the stream and keep it running

Run a representative test

Before making the stream public, test with audio and motion similar to the film you intend to broadcast. In Live Control Room, confirm that YouTube receives the signal and watch stream health and any messages while the encoder runs. Check that sound is present, motion is smooth, and the picture is not unexpectedly cropped or degraded.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Plan for a continuous process and connection

With this method, the computer, network connection, and media storage must stay available. A shutdown, network interruption, full disk, or FFmpeg process failure can end the feed. Plan how you will detect and restart the process; YouTube’s encoder instructions explain how to stop a stream but do not promise unattended recovery for a local FFmpeg process. A home setup and hosted compute should be compared on sustained encoding capacity, upload stability, uptime and restart handling, and access to the media files. The cited guidance does not establish one best hardware configuration.

Do not count on an automatic archive beyond 12 hours

YouTube automatically archives streams only when they are under 12 hours. A stream left live longer is not guaranteed a complete automatic VOD. If you need an archive, plan shorter sessions and preserve the original film files and any separately captured recordings. YouTube’s encoder setup guidance covers the archive condition and stream management: Create a YouTube live stream with an encoder.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

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 issue a warning; if the content remains, YouTube may interrupt or terminate the stream. YouTube also says that licensed third-party content may require the rights owner to add your channel to its Content ID allowlist, even when you have a license. A public-domain belief or a license alone does not prevent a match from disrupting the broadcast. See YouTube’s guidance on copyright issues with live streams.

Or let it run in the cloud

If you do not want a home computer, connection, and storage to remain on, StreamNeo is a cloud service for keeping a YouTube channel live from uploaded videos. The setup is: upload the film file, add your YouTube stream key once, and go live. It loops uploaded videos and playlists from the cloud; it does not stream from a camera.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Nothing has to stay on at home for the stream to continue.
  • Each slot streams the file as uploaded, up to 4K 60fps, at one flat price per slot, with no re-encode or quality tiers.
  • It can recover automatically if YouTube drops the stream.
  • The first day is free with no card required; it is one free day per account.
  • Monthly: $9.99 per month.

Each slot includes one always-on stream, 10 GB storage per slot pooled across active slots, looping and playlists, and support from the StreamNeo team. The service is for YouTube only. Regardless of the streaming method, confirm you have the right to broadcast the exact film copy and soundtrack.

Quick Recap

Bestseller No. 1
Bestseller No. 2
Bestseller No. 3

Start your free StreamNeo day.

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.