Skip to content
streamneo.
Setup Guides11 min read

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

Loop public-domain film files to YouTube Live with FFmpeg, check rights and stream health, and plan for YouTube’s long-session archive limits.

sn.
StreamNeoPublished 5 October 2026
Worth sharing?

To run a 24/7 YouTube stream of public domain films with FFmpeg, prepare a local film file, loop it at real-time speed, encode it in a YouTube-supported format, and send it to the ingest address shown in YouTube Studio. Before you leave it running, check the exact film version and soundtrack, test the stream privately, and plan for the fact that YouTube does not automatically archive a session that runs longer than 12 hours.

This guide uses FFmpeg for a single-file loop and explains where an OBS or VLC playlist workflow differs. A locally playable file makes playout less dependent on a web player, but it does not establish that you have the right to broadcast that film or that YouTube will leave the stream uninterrupted.

Check the film and the copy before playout

“Public domain” is not a magic property that applies uniformly to every file labelled with those words. Verify the particular film, the version you downloaded, any restoration, accompanying music or soundtrack, and the territories in which you intend to stream. Keep a note of the source and the evidence you relied on. This is a practical record, not a legal ruling.

Internet Archive’s guidance says its rights labels are provided by uploaders and are not guaranteed to be accurate. It also warns that a restored print or later soundtrack can have separate rights. Its discussion of US works offers screening guidance, not a conclusion about every film, territory or later enhancement. Use the Internet Archive’s guide to movies and videos as a starting point, then check the rights information for the precise copy and consult an appropriate rights professional if the position is unclear.

YouTube may identify third-party content in a live broadcast. Its guidance on copyright issues with live streams explains that a match can lead to a warning, a placeholder replacing the stream image, or interruption or termination if the issue persists. A licence does not necessarily prevent an automated interruption; YouTube says that a rights holder may need to add a licensed channel to its Content ID allowlist. Check current official guidance and resolve uncertainty before scheduling a long broadcast.

Prepare local film files for continuous playback

Download a copy you have a right to stream and make sure it is available on the machine that will run FFmpeg. Play the file locally from beginning to end, or at least inspect its opening, a point in the middle, and its final section. Confirm that picture and sound are present, the audio is at a usable level, and the file does not fail when seeking or decoding. A file that plays only through an online archive’s web player is not yet ready for this workflow.

FFmpeg reads the file while it is available, so consider how storage will behave over a continuous run. A drive that disconnects, fills up, or goes to sleep can interrupt playback even if the stream encoder itself is functioning. Keep enough free space for the operating system and logs, and avoid moving or renaming the source file while the job is running. An external drive can be useful for a larger library, but its capacity and reliability should suit your collection; there is no single hardware size that fits every film archive.

For a one-file loop, make a stable, descriptive path and test the exact file with the FFmpeg build you will use. If you plan to switch films manually, label them clearly and keep a record of the order. If you need a sequence of titles, a playlist workflow may suit you better than restarting a separate command for each film. For approaches to changing a queue without ending a broadcast, see this guide to updating an FFmpeg playlist without stopping the stream.

Loop one film with FFmpeg

FFmpeg’s -stream_loop -1 input option tells it to repeat an input indefinitely. Put it before the corresponding -i; -re also belongs before -i when reading a file at its natural, real-time pace. The following is a starting template for a compatible local file, not a tested command for every file or FFmpeg build:

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"

Replace the file name and destination placeholders with your actual values. Do not paste a real stream key into a public script, screenshot, support post or shared document. Treat it as a password: anyone who obtains it may be able to send a broadcast to your stream. If it is exposed, use YouTube Studio’s current controls to replace or reset it.

The sample video settings describe an H.264 1080p30 starting point. YouTube’s current encoder settings table lists 5 Mbps as the minimum and 14 Mbps as the recommended video bitrate for that resolution and frame-rate combination. It recommends a 2-second keyframe interval and says not to exceed 4 seconds. Those are platform settings, not a promise that your source, computer or connection can sustain them. Match output dimensions and frame rate to the actual material and your upload capacity, then consult the current table before publishing. At 30 frames per second, -g 60 sets a 60-frame keyframe interval, corresponding to 2 seconds.

YouTube recommends RTMPS, which encrypts the connection to the ingest service. Copy the server URL from the live setup details rather than guessing it from a sample command. FFmpeg’s protocol documentation describes its supported protocols; verify that your build and command can use the destination YouTube provides. Begin with an unlisted or private test rather than assuming a command is correct because it starts without an immediate error.

Use OBS or a VLC playlist when you need a queue

FFmpeg’s command-line loop is direct when you want one file repeated. If you want to arrange several films in a visible queue, OBS with VLC Video can make it easier to inspect the order and manage playback. This is a different workflow from the FFmpeg command above: choose one playout path for the test rather than sending two encoders to the same stream key at once.

In OBS, create a scene for the film broadcast and add a VLC Video source. VLC Video is not guaranteed to appear in OBS by default: install VLC on the computer first, then reopen or configure OBS as needed and confirm the source is available. Add local media files to the playlist, set the source to loop if you want the queue to repeat, and preview the scene. Confirm that the next item follows the current one and that the end of the playlist does not leave a blank scene. Menu names can vary by software version, so check the installed OBS and VLC documentation if the source is missing or behaves differently.

The queue is only as reliable as the files and storage it reads. Test transitions between files with different resolutions, frame rates, audio layouts and aspect ratios. Decide whether OBS should scale each film to the output canvas or preserve its original shape with bars; inspect the result in preview rather than letting the first live viewers discover a cropped title card. If a film has long silent sections or a different audio level, account for that in your review of the playlist.

For a single loop, FFmpeg has fewer visible controls to manage once configured, while OBS offers a graphical preview and playlist handling. Neither choice removes the need to keep the playback process and media available. If your stream depends on a home computer, compare its sustained capacity, network stability, storage access and restart plan before making it the unattended playout machine. This low-power mini PC checklist covers relevant considerations without assuming one device suits every channel.

Connect the encoder to YouTube Live

You need live streaming enabled on your YouTube channel and an encoder stream created in YouTube Studio. YouTube notes that first-time enablement can take up to 24 hours, so do not leave setup until the evening you intend to start. In Live Control Room, create or select the stream and copy the current server URL and stream key into the encoder configuration. The precise fields differ between FFmpeg and OBS, but both use the destination details supplied by YouTube.

Follow YouTube’s encoder setup instructions for the current Live Control Room flow. Confirm that you have selected the intended channel and stream before starting. If you use an existing key, verify that it belongs to the right broadcast; if you create a new one, store it securely and do not include it in command examples that others may copy.

Start the encoder and watch Live Control Room until YouTube reports that it is receiving the stream. The encoder process running on your computer is not proof that viewers can see a healthy broadcast. Check the preview, audio, title and visibility setting, then use an unlisted test to catch a wrong source, silent soundtrack, bad crop or ingest error before making the stream public.

If you want to avoid maintaining a computer, file and encoder process continuously, consider the operational trade-offs rather than assuming a particular arrangement is right for you. StreamNeo removes the need to keep your own computer running for a file-based stream by taking an uploaded video and broadcasting it to YouTube, but it is YouTube-only and does not settle rights clearance, content review or YouTube’s archive behaviour.

Test picture, sound and stream health

YouTube advises testing with audio and motion similar to the real broadcast and monitoring stream health and messages during the event. That matters for films: a static opening card, quiet dialogue and a sequence with fast motion can exercise the encoder differently. Test representative parts of the actual material, not just a short unrelated clip. Look at the YouTube preview as well as the local output so you can spot ingest or scaling problems.

Check that the audio stays in sync with the picture and that it does not disappear at a file boundary. Listen for clipped peaks, abrupt silence, a soundtrack that is too quiet, or a channel layout that the encoder does not handle as expected. A test that starts cleanly may still expose trouble later in a feature or when a playlist changes files. If you observe drift, use this audio and video sync troubleshooting guide to work through the likely causes.

Pay attention to YouTube’s stream-health messages and the encoder’s own output. A stable-looking local preview cannot reveal every problem between your encoder and YouTube. If warnings appear, reduce the cause rather than repeatedly restarting without diagnosis: check the source file, output settings, sustained upload capacity and whether another process is using the connection. YouTube’s current encoder settings are a reference point, not a substitute for testing on the connection and machine you will actually use.

A 24/7 run also needs a response plan. Decide who will notice if the process exits, the machine reboots, the connection drops or the drive becomes unavailable. FFmpeg does not promise unattended recovery just because it can loop a file. You can arrange process supervision and alerts on your own system, but test the recovery path and understand what happens to the YouTube event when you restart the encoder. For examples of issues specific to continuous FFmpeg playback, see troubleshooting audio and video interruptions.

Plan for sessions and archives separately

Do not design the schedule on the assumption that one very long live session will become a complete replay. YouTube says streams under 12 hours are automatically archived; a session that runs longer than 12 hours is not automatically archived. If having a complete VOD matters, plan shorter sessions and preserve your original film files. You can also arrange a separate recording process, but test it independently and confirm that you have the storage and rights needed for the resulting copy.

Shorter sessions involve more than stopping and starting an encoder. Set an end time, decide whether the next session should begin with the same film or a new item, and allow time to verify the new event in Live Control Room. Avoid assuming that reconnecting an encoder recreates a clean archive boundary or retains the same viewer experience. Review YouTube’s current help pages before setting a schedule, because platform behaviour and controls can change.

The trade-off is straightforward: a continuous session reduces the need for frequent manual starts, while shorter sessions give you more deliberate boundaries for archiving and checks. If you operate a channel that must stay live, preserve source files and keep a recovery plan even when a replay is not the priority. This guide to ending and restarting a YouTube live loop can help you plan the hand-off between sessions.

Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.

FAQ

Can FFmpeg loop a film forever?

FFmpeg’s -stream_loop -1 requests infinite looping of an input file. It does not make the computer, storage or network immune to failures, so test the exact input and plan how you will detect and recover from a stopped process.

Does a public-domain label guarantee that YouTube will accept the stream?

No. The label may not cover a particular restoration, soundtrack, territory or copy, and YouTube may still identify third-party content during a live stream. Check the exact rights position and YouTube’s current copyright guidance before broadcasting.

Will YouTube save the full archive of a 24/7 stream?

Do not rely on that. YouTube’s automatic archive condition applies to streams under 12 hours, so plan shorter sessions or a separate recording if a complete replay is important.

Should I use FFmpeg or OBS with a VLC playlist?

Use FFmpeg when a simple, repeatable loop of one file is enough and you are comfortable configuring a command. OBS with VLC Video can be more convenient for a visible multi-file queue, but VLC must be installed and the playlist and transitions still need testing.

YOU’VE REACHED THE END

Keep the ideas coming.

More guides, useful tools and a little help for your next broadcast.

Back to the journal ↗
YOUR NEXT READ

A little more to explore.

More Setup Guides guides ↗ · All topics ↗