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
Mountain View desk7 min

How to Run a 24/7 Classroom Stream on YouTube with FFmpeg Concat

Use FFmpeg concat and stream_loop to loop classroom videos into YouTube Live, with setup, bitrate and keyframe guidance, troubleshooting, and archive limits.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can loop a classroom video playlist into a continuous YouTube Live broadcast with FFmpeg’s concat demuxer and -stream_loop -1. First confirm livestream eligibility, prepare compatible media files, create an encoder stream in YouTube Studio, then test the feed before making it public. The method gives you control over the playlist, but the computer, network connection and FFmpeg process must remain available—and YouTube documents automatic archiving only for streams under 12 hours.

What you need before starting

This setup reads local video files in sequence, encodes them as a live feed, and sends that feed to YouTube’s ingest server. It is appropriate for a classroom schedule made from prerecorded lessons, slides or break screens; it is not a camera-based broadcast.

As an Amazon Associate I earn from qualifying purchases.

  • A YouTube channel eligible to livestream. YouTube requires a verified channel with no livestream restriction in the preceding 90 days. First-time livestream activation may take up to 24 hours, so enable it well before the planned launch. YouTube Help: Get started with live streaming
  • FFmpeg installed on a computer that can remain on, with a stable upload connection.
  • Video files with compatible stream layouts, codecs and time bases, plus enough upload capacity for the chosen output bitrate.
  • An encoder-based live stream in YouTube Studio and its ingest URL and stream key.

Keep the stream key private: treat it like a password. Do not put it in a publicly shared script, log, screenshot or classroom handout.

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

Prepare and check the playlist

Make the concat file

Create a plain-text file named classroom.ffconcat in the folder containing the videos. The first line must be exactly ffconcat version 1.0; add one file directive per item, in the order you want it played:

ffconcat version 1.0
file 'lesson-01.mp4'
file 'lesson-02.mp4'
file 'break-screen.mp4'

Use relative paths when possible. The concat demuxer’s safe option defaults to 1 and rejects unsafe paths. If you need absolute or otherwise unsafe paths and set -safe 0, do so only with a playlist you control.

Make the files compatible

The concat demuxer treats the listed files as a virtual sequence and adjusts timestamps so each follows the previous one. For reliable joins, the files need the same streams, codecs and time bases. Different layouts or timestamps can produce gaps, artifacts or a concat failure; transcode or normalize mismatched files to a consistent format before streaming. Check the transitions, including audio, rather than assuming that files which play individually will join cleanly.

Rank #2
Sale
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black | 1080p with auto-Light Correction, Built-in mic, Privacy Shutter, USB-A, Compatible with Teams, Google Meet, Zoom and More
  • Compatible with Nintendo Switch 2’s new GameChat mode
  • Auto-Light Balance: RightLight boosts brightness by up to 50%, reducing shadows so you look your best—compared to previous-generation Logitech webcams (1)
  • Privacy with a Slide: The integrated webcam cover makes it easy to get total, reliable privacy when you're not on a video call
  • Built-In Mic: The built-in microphone lets others hear you clearly during video calls
  • Easy Plug-And-Play: The Brio 101 works with most video calling platforms, including Microsoft Teams, Zoom and Google Meet—no hassle; it just works

Incorrect or estimated file durations can also create timestamp problems. If you know a file’s correct duration and need to override it, the concat format supports a duration directive. Confirm the value rather than guessing; a wrong override can shift later timestamps.

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

Create the YouTube encoder stream

  1. In YouTube Studio, create a live stream using an encoder. If the channel has not streamed before, allow time for activation, which YouTube says can take up to 24 hours.
  2. Choose a private or unlisted test first. Copy the ingest URL and stream key from the Live Control Room. Keep them confidential; insert them into the command only on the machine that will run FFmpeg.
  3. Start the feed and inspect YouTube’s preview and stream-health messages. Confirm the picture, classroom audio, pacing and transitions before starting a public broadcast. YouTube recommends monitoring stream health and reviewing messages during the event. YouTube Help: Create a YouTube live stream with an encoder

Run FFmpeg and tune the output

This command is a starting template, not a tested command for every FFmpeg build or media set. Replace the placeholder ingest address and key with the values from YouTube’s Live Control Room. Run it from the folder containing classroom.ffconcat, or adjust the playlist path.

Rank #3
Sale
EMEET C960 1080P Webcam with Microphone, 2 Mics, 90° FOV, Computer Camera | USB Type-A & A-to-C Adapter, Fixed Focus, Plug&Play for Zoom/Teams/Facetime/YouTube/Google Meet/Switch 2 Camera, 2025 Version
  • 1080P Webcam with Cover for Video Calls - EMEET computer webcam provides design and Optimization for professional video streaming. Realistic 1920 x 1080p video, 5-layer anti-glare lens, providing smooth video. C960 computer camera delivers 1920x1080 video with fixed focus (11.8–118.1 inches), so as to provide a clearer image. C960 USB webcam has a cover and can be removed automatically to meet your needs for privacy. For optimal image performance, use the webcam in a well-lit environment.
  • Built-in 2 Omnidirectional Mics - EMEET webcam with microphone for desktop features 2 built-in omnidirectional microphones, picking up your voice to create clear audio for communication. When installing the webcam, select EMEET C960 as the default microphone input device in your computer and video applications and select C960 as the default device in Zoom/Teams and ensure microphone permissions are enabled for proper use. Please note that C960 does not include built-in speakers.
  • Automatic Light Adjustment - Automatic exposure adjustment is applied in EMEET HD webcam 1080p so that the streaming webcam can deliver stable image performance. EMEET C960 camera for computer also features color adjustment and exposure optimization to help you look your best. For optimal video quality, it is recommended to use the webcam in normal or well-lit environments and select suitable video settings in your application. Proper lighting helps achieve a clearer and more balanced image.
  • Plug-and-Play & Upgraded USB Connectivity - New C960 webcam features both USB Type-A & A-to-C adapter connections for wider compatibility. For stable performance, connect the webcam directly to the computer's main USB port and ensure the device is recognized correctly. If a hub or docking station is used, please ensure it provides sufficient power and stable data transmission, as limited ports may affect performance. 90° wide-angle lens captures more participants without frequent adjustments.
  • High Compatibility & Multi Application - C960 webcam for laptop is compatible with Windows 10/11, macOS 10.14+, and Android TV 7.0+. Not supported: Windows Hello, TVs, tablets, or game consoles. It works with Zoom, Teams, Facetime, Google Meet, YouTube and more. Please select C960 webcam as the default camera and microphone device in your application and ensure camera/microphone permissions are enabled, especially on macOS. (Tips: Incompatible with Windows Hello)
ffmpeg -re -stream_loop -1 -f concat -safe 1 -i classroom.ffconcat 
  -c:v libx264 -preset veryfast -pix_fmt yuv420p 
  -r 30 -g 60 -keyint_min 60 -b:v 4000k -maxrate 4000k -bufsize 8000k 
  -c:a aac -b:a 128k -ar 44100 
  -f flv 'rtmps://INGEST_SERVER/STREAM_KEY'

-stream_loop -1 repeats the concat input indefinitely. -re reads it at its native playback rate rather than sending the files as fast as the computer can process them. The example encodes H.264 video and AAC audio at 720p, 30 fps, with a two-second GOP/keyframe interval. Its 4 Mbps video bitrate is the stated minimum for 720p at 30 fps, not YouTube’s recommended target for that format.

Choose settings for the actual classroom feed

YouTube’s encoder guidance supports H.264, H.265 or AV1 video and AAC or MP3 audio over RTMP/RTMPS. It allows up to 60 fps and recommends a two-second keyframe interval, which should not exceed four seconds. For H.264 at 720p and 30 fps, YouTube currently recommends 8 Mbps and states 4 Mbps as the minimum. Choose a bitrate appropriate to the actual resolution and motion, and make sure the available upload capacity can sustain it; do not treat the example’s minimum as a universal quality setting. YouTube transcodes incoming live video into different playback formats. RTMPS is recommended because it encrypts transport. YouTube Help: Encoder settings, bitrates, and resolutions

Rank #4
Sale
Logitech C270 720p Webcam Plug-and-Play Wide Screen Video Calling - Black
  • Compatible with Nintendo Switch 2’s new GameChat mode
  • Crisp HD 720p/30 fps video calls with diagonal 55° field of view and auto light correction. Compatible with popular platforms including Skype and Zoom.
  • The built-in noise-reducing mic makes sure your voice comes across clearly up to 1.5 meters away, even if you’re in busy surroundings.
  • C270’s RightLight 2 feature adjusts to lighting conditions, producing brighter, contrasted images to help you look good in all your conference calls.
  • The adjustable universal clip lets you attach the camera securely to your screen or laptop, or fold the clip and set the webcam on a shelf. You’re always ready for your next video call.
  • Resolution and frame rate: Match the output to the source material and the audience’s connection. The example requests 30 fps; YouTube allows up to 60 fps.
  • Keyframes: With the example’s 30 fps output, -g 60 and -keyint_min 60 request a 60-frame, two-second interval. If you change frame rate, recalculate the GOP for the recommended two-second interval.
  • Bitrate: The example uses constant-bitrate-style controls (-b:v, -maxrate, -bufsize). Set the target for the chosen resolution and confirm that the connection has stable headroom above the outgoing stream rate.
  • Audio: The template encodes AAC at 128 kbps and 44.1 kHz. Listen to the YouTube preview; source audio levels and silence between files matter as much as the encoder settings.
  • Ingest: Preserve the RTMPS scheme and complete server/key address supplied by YouTube. Do not post the completed command where others can see the key.

Test, launch and operate the 24/7 feed

  1. Run a private or unlisted test using representative lessons, motion and audio. Check the YouTube preview, transitions and stream-health messages.
  2. Correct incompatible files, timestamp issues, clipped or missing audio, and bitrate or connection problems before opening the broadcast to viewers.
  3. For the public launch, use the tested stream in YouTube Studio and monitor health messages. Keep the host awake, connected to a stable network and running FFmpeg.
  4. Supervise the FFmpeg process and rehearse what you will do if it exits or the connection fails. Decide how the local system should restart a failed process; there is no single recovery setup prescribed for every computer.
  5. Review the feed periodically. A continuous broadcast depends on the host, network, FFmpeg process and YouTube ingest all remaining available; YouTube’s encoder guidance is not a guarantee of uninterrupted service.

Plan separately for the archive

YouTube says streams under 12 hours are automatically archived. That guidance does not establish that one complete recording will be available for a 24/7 broadcast. If the classroom needs a recording, plan archive handling separately and confirm the current behavior in YouTube Studio for the channel. YouTube Help: Create a YouTube live stream with an encoder

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common problems and fixes

  • You cannot start a live stream: Check channel verification and whether a livestream restriction occurred in the preceding 90 days. If livestreaming is being enabled for the first time, activation can take up to 24 hours.
  • Concat rejects a path: Keep media beside the playlist and use relative paths with -safe 1. Only use -safe 0 for a playlist you control when unsafe or absolute paths are necessary.
  • Playback breaks or artifacts appear at joins: Compare the files’ streams, codecs and time bases. Normalize incompatible media and inspect known durations; use a duration directive only when its value is accurate.
  • YouTube preview is delayed, unstable or reports poor health: Check the outgoing bitrate against stable upload capacity, verify that the host is not sleeping or overloaded, and review YouTube’s stream-health messages. Test a suitable bitrate rather than assuming one setting fits every connection.
  • The feed stops when the computer sleeps or FFmpeg exits: Keep the machine awake and connected, supervise the process, and rehearse a restart procedure. The local setup does not continue independently of its host.
  • The public stream works but a full-day recording is missing: Do not assume a 24/7 broadcast produces one complete archive; YouTube’s cited automatic-archive guidance applies to streams under 12 hours.

Or let it run in the cloud

If you want a prerecorded YouTube classroom feed without keeping a computer and home connection running, StreamNeo runs the loop from the cloud. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It plays uploaded videos, not a camera feed, and streams to YouTube.

Best Value
HUE HD Pro USB Document Camera/Visualizer for Teachers/Classroom, Red
  • FULL HD 1080p streaming, built-in LED lights, and a microphone with noise reduction. Use as a document camera in a classroom with interactive TVs and smartboards. Durable and covered by a 3-year manufacturer's warranty, with access to full customer support.
  • EASY TO USE without training, Plug & Play, and compatible with native Windows, Chrome OS, macOS and Linux camera apps. Portable and lightweight, the camera can be used without its base by plugging the flexible neck directly into a USB port.
  • MULTI-PURPOSE for video conferencing, homeschooling, online tutoring, home working, remote monitoring, making instructional videos, animating, gaming, and giving live demos. Trusted and loved worldwide in education, offices, and homes.
  • MANUAL FOCUS AND WIDE-ANGLE LENS perfect for capturing a US letter/A4 page or a demonstration without constantly adjusting like an autofocus lens. With a focal range of 1cm to infinity, the camera can also be used as a simple microscope. Maximum capture area: A3.
  • OPTIONAL SOFTWARE for Windows and macOS included. HUE Intuition is a camera management app for capturing and annotating images, recording video with sound and flipping or mirroring the live feed. Included is a perpetual single user license for installation on multiple devices.

Every slot includes one always-on stream, 10 GB of storage per slot pooled across active slots, looping and playlists, automatic recovery if YouTube drops the stream, and StreamNeo team support. Uploads stream as made, up to 4K 60fps, with no re-encode and no quality tiers. The first day is free with no card; there is one free day per account. UPI and cards are accepted in India, and card checkout is available worldwide.

Monthly: $9.99 per month. The same product is on every plan; only the billing length changes. Other available terms are Daily $0.99 per day · Weekly $2.99 per week · 6 months $49.99 for 6 months · Yearly $89.99 a year. Plans can be cancelled any time; for five or more slots, contact support.

To try the cloud workflow, start with StreamNeo’s free first day.

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.

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 *

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

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.