Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober 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 Scan×
Skip to content
DocumentaryTube
FFmpeg

How to Stream an Authorized Video Playlist from a Raspberry Pi 3 to YouTube Live with FFmpeg

Use FFmpeg on a Raspberry Pi 3 to send authorized local media to YouTube Live, loop one file or sequence compatible files, and test the stream safely.

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

You can use FFmpeg on a Raspberry Pi 3 to send authorized local video to YouTube Live. For one file, FFmpeg’s -stream_loop -1 input option repeats it indefinitely. A sequence of several files needs a playlist-capable input or another sequencing method; that loop option alone does not create a multi-file playlist. Set up YouTube’s encoder ingest details, choose settings your Pi and upload connection can sustain, then test and monitor the stream before relying on it.

What this setup does—and what it does not

The workflow is: prepare media you own or are authorized to rebroadcast, make it available locally to FFmpeg, encode and send it to YouTube Live using the event’s ingest URL and private stream key, and monitor the event in YouTube Live Control Room.

This is not a guide to downloading or extracting videos from a public YouTube playlist and rebroadcasting them. A video being publicly viewable or included in a playlist does not establish permission to redistribute it. YouTube’s delivery guidance says you must be the copyright holder or authorized representative for the video and audio you deliver (YouTube video and audio formatting specifications).

The available documentation does not establish a tested Raspberry Pi 3 performance ceiling for playlist playback and encoding. Treat the commands and settings below as a configuration to verify on your own Pi, FFmpeg build, media, network, and YouTube event—not as a guarantee that a particular resolution or frame rate will run reliably.

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.

Prepare the Pi, media, and YouTube event

Check your hardware and software

  • Confirm the exact Pi 3 model and revision, power supply, cooling, storage, and operating system. Watch for heat-related throttling during a long test.
  • Check that FFmpeg is installed and identify the build with ffmpeg -version. Available codecs, protocols, and input support depend on how that build was compiled.
  • Use local files in formats your FFmpeg build can read. Check each file’s streams and properties with ffprobe before constructing the stream command.
  • Measure sustained upload capacity from the location where the Pi will run. Leave headroom for network variation; do not choose a bitrate merely because YouTube lists it.

Enable YouTube Live and create the event

  1. In YouTube Studio, open Live Control Room and create or select the live event. YouTube’s encoder workflow provides the server or stream URL and the stream key there. Keep the key private: anyone who obtains it may be able to send a feed to your event.
  2. If this is the first time the channel is enabling live streaming, allow up to 24 hours for activation, as YouTube Help notes (Get started with live streaming).
  3. Choose the event settings and confirm they match the feed you plan to send. Start FFmpeg only after the event and encoder settings are ready.
  4. Use YouTube’s stream-health messages during a private or otherwise appropriate test. Include representative motion and audio; a static test image may not reveal the same issues as the real program.

Choose resolution, bitrate, and encoding settings

YouTube’s current encoder guidance supports RTMP/RTMPS ingest, H.264, H.265/HEVC, or AV1 in the listed encoder modes, and AAC or MP3 audio. It recommends constant bitrate (CBR) and a keyframe every two seconds, not exceeding four seconds. YouTube recommends RTMPS for encrypted transport. Use a codec and pixel format supported by your installed FFmpeg build and the Pi’s available encoding path; do not assume every listed YouTube codec is practical to encode on a Pi 3.

The following are YouTube-published H.264 ingest recommendations, not measurements or guarantees of Raspberry Pi 3 performance. Select a target only after testing that the Pi can produce it and the actual upload connection can sustain it.

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.
Target YouTube-recommended H.264 bitrate
480p at 30 fps 4 Mbps
720p at 60 fps 8 Mbps
1080p at 30 fps 14 Mbps
1080p at 60 fps 17 Mbps

These figures come from YouTube Help’s encoder settings guidance (Choose live encoder settings, bitrates, and resolutions). They are recommendations for ingest, not a Pi 3 benchmark. Match the output resolution and frame rate to the media, available encoding capacity, and measured upload bandwidth. If the Pi struggles or YouTube reports an unstable feed, lower the output target and retest.

Loop one local video indefinitely

FFmpeg documents -stream_loop as an input option: a value of -1 repeats the input indefinitely. Put it before the corresponding -i option (FFmpeg main options).

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.

For a local file called program.mp4, the command pattern below loops that file and sends it to an RTMPS ingest URL. Replace the example paths, ingest URL, and key with your own values. The resolution, frame rate, bitrate, and audio settings shown are examples to adapt and test, not a validated Pi 3 preset.

ffmpeg -re -stream_loop -1 -i /path/to/program.mp4 
  -c:v libx264 -preset veryfast -b:v 4M -maxrate 4M -bufsize 8M 
  -r 30 -g 60 -keyint_min 60 -sc_threshold 0 
  -c:a aac -b:a 128k -ar 44100 
  -f flv "rtmps://YOUR_INGEST_URL/YOUR_PRIVATE_STREAM_KEY"

This example uses software H.264 encoding and a two-second GOP at 30 fps. The veryfast preset is a starting point to test, not evidence that the Pi 3 will encode the source in real time. If it cannot keep up, reduce the output resolution or frame rate, test a different supported encoding path, or use a less demanding source. Confirm the output bitrate fits the connection and event settings.

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

Do not publish a command containing your real stream key in a public script, screenshot, log, or support post. If the key is exposed, replace it in YouTube Studio before streaming again. FFmpeg’s -stream_loop -1 applies to the one input shown; it does not automatically advance through a directory or a list of unrelated files.

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

Play multiple local files in sequence

A multi-file playlist is a separate problem from looping one input. FFmpeg’s input-loop option repeats a supported input, but does not itself define how to sequence several files. Use a playlist or concat approach only after validating its behavior with the installed FFmpeg build and files of the formats you intend to use.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

Use a concat-demuxer list for compatible files

When the files have compatible streams and encoding parameters, FFmpeg’s concat demuxer can read a text list in order. Create a file such as playlist.txt:

file '/media/video-01.mp4'
file '/media/video-02.mp4'
file '/media/video-03.mp4'

Then use the list as one input and loop that input:

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i /path/to/playlist.txt 
  -c:v libx264 -preset veryfast -b:v 4M -maxrate 4M -bufsize 8M 
  -r 30 -g 60 -keyint_min 60 -sc_threshold 0 
  -c:a aac -b:a 128k -ar 44100 
  -f flv "rtmps://YOUR_INGEST_URL/YOUR_PRIVATE_STREAM_KEY"

The concat demuxer expects inputs that can be joined consistently; mismatched codecs, stream layouts, timestamps, or parameters can cause errors or bad transitions. The -safe 0 option permits paths that the demuxer otherwise treats as unsafe, so use it only with a playlist file you control. Test the full sequence locally before connecting it to a live event. If files are not compatible, normalize them to a consistent format first or use a different sequencing method you have verified for your build.

Run a test and monitor the live feed

  1. Test the playlist locally first. Confirm that every file opens, plays in the intended order, and transitions without errors.
  2. Start the YouTube event and verify the selected resolution, frame rate, ingest protocol, and audio match the FFmpeg output.
  3. Start FFmpeg and watch its console output for input errors, dropped frames, encoding speed below real time, connection failures, or reconnect loops.
  4. Check YouTube Live Control Room’s stream health and preview. Verify moving video, intelligible audio, and stable delivery for long enough to reveal problems.
  5. Check the Pi’s CPU load, temperature, and network behavior while the actual playlist is running. A short idle test is not a substitute for a full-duration run.

Troubleshoot common failures

Symptom Likely cause What to check or change
YouTube receives no video Wrong ingest URL or key, event not ready, live streaming not enabled, or a connection failure. Copy the current server URL and private key from Live Control Room, check the event status and network connection, and confirm first-time activation has completed.
FFmpeg reports that it cannot open an input Incorrect path, permissions, unsupported container or codec, or a concat-list syntax issue. Check the path and file permissions, inspect the file with ffprobe, and test each list entry individually.
Playlist stops after one pass The loop option is missing, placed after the relevant input, or the multi-file input is not being read as expected. Put -stream_loop -1 before the playlist input’s -i. Confirm the concat input works once before testing the loop.
Video stutters, drops frames, or the encoder falls behind The Pi cannot sustain the selected encoding workload, or storage/network conditions are unstable. Reduce resolution, frame rate, or bitrate; check CPU and temperature; and test the same complete playlist again.
YouTube reports an unstable stream The outgoing bitrate exceeds reliable upload capacity, the connection varies, or output settings do not match expectations. Measure sustained upload bandwidth, leave headroom, lower the target bitrate if needed, and verify CBR and keyframe timing.
Audio is missing or out of sync Input audio format or timestamps are inconsistent, or output audio settings are unsupported or mismatched. Inspect audio streams with ffprobe, test a single file, and use a supported AAC or MP3 output configuration.
Stream disconnects or reconnects repeatedly Network interruption, host instability, thermal issue, or an encoder process failure. Review FFmpeg output and YouTube health messages, verify power and cooling, and test the upload connection under sustained load.

Or let it run in the cloud

If your goal is to keep an authorized pre-recorded program live on YouTube without leaving the Pi or another computer running, StreamNeo is a cloud alternative: upload your recording or build a playlist, add your YouTube stream key, and go live. It loops uploaded video to YouTube; it does not stream from a camera.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Nothing at home has to stay on for the stream to continue.
  • One flat price per slot covers any uploaded quality up to 4K 60fps, streamed as made without re-encoding or quality tiers.
  • StreamNeo automatically recovers if YouTube drops the stream.
  • The first day is free with no card required; one free day is available per account.

Every slot includes 10 GB of storage, pooled across active slots, 24/7 looping and playlists, one always-on stream, and support from the StreamNeo team. The same product is included on every plan; only the billing length changes. Monthly pricing is $9.99 per month. UPI and cards are available in India; card checkout is available worldwide. See StreamNeo for details, then start your free 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.

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

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.