You can stream a local video playlist from a Raspberry Pi 5 to YouTube Live with FFmpeg. The simplest route is to use FFmpeg’s concat demuxer and copy the existing audio and video streams—but only if the files have compatible streams and already meet YouTube’s ingest requirements. If they need transcoding, test the workload on your Pi first: Raspberry Pi’s documentation says the Pi 5 uses software video encoders.
Before you start: check the files and the Pi
- A Raspberry Pi 5 running an operating system with FFmpeg installed, plus a reliable internet connection with enough upload capacity for the selected stream bitrate.
- A folder of videos arranged in the order you want to play them.
- A YouTube channel able to use Live Control Room and a stream key.
- FFmpeg tools including
ffmpegandffprobe. Check your installed build withffmpeg -versionand confirm that it supports the output format and encoders you intend to use.
“MP4” describes a container, not the codecs inside it. Two MP4 files can have different video or audio codecs, stream layouts, time bases, frame rates, or other properties. FFmpeg’s concat demuxer expects the files to have the same streams, including matching codecs and time bases. Inspect the whole playlist, not just its filenames, before attempting stream copy. See the FFmpeg concat demuxer documentation.
Inspect representative files
Use ffprobe to inspect the video and audio streams in each file. For example:
ffprobe -hide_banner -show_streams -show_format "/media/videos/01-intro.mp4"
Compare each clip’s video and audio codecs, dimensions, frame rate, pixel format, stream count, and duration. Choose a representative sample, including the files most likely to differ. If streams or formats differ, do not assume that a concat list plus -c copy will make them compatible.
#1 Best Overall
- 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.
Create an explicit playlist
Use a text file to set a predictable playback order rather than relying on shell glob ordering. Save this as, for example, /media/videos/playlist.ffconcat:
ffconcat version 1.0
file '/media/videos/01-intro.mp4'
file '/media/videos/02-main.mp4'
file '/media/videos/03-outro.mp4'
Use the full path to each file and keep the list in the intended order. Paths containing apostrophes, unusual characters, or leading or trailing spaces need careful escaping and quoting; check the concat demuxer’s file syntax rather than generating a list with assumptions about simple filenames. The example command below uses -safe 0, so only use a playlist you created and trust.
Rank #2
- 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.
Choose between stream copy and encoding
| Path | Use it when | Tradeoff |
|---|---|---|
Concat demuxer with -c copy |
All clips have matching stream layouts, codecs, and time bases, and their encoded streams are suitable for the chosen YouTube ingest. | Avoids re-encoding, but cannot change codecs, resolution, frame rate, or bitrate. Incorrect duration metadata can cause artifacts or gaps. |
| Preprocess files or use the concat filter and encode | Clips differ, or you need to normalize the output’s codecs or other settings. | Provides more control over output compatibility but requires encoding work on the Pi. FFmpeg recommends the concat filter for concatenation when re-encoding is wanted; test whether the actual workload keeps up on your device. |
FFmpeg’s copy mode moves encoded streams without decoding and re-encoding them. That saves processing but does not repair an incompatible source. If the files do not meet the concat demuxer’s compatibility requirements, or do not produce a suitable YouTube feed, stream copy is not the fix. See FFmpeg’s stream-copy documentation and its FAQ on joining video files.
Build and test the FFmpeg stream
The following is a starting shape for a compatible playlist, not a guaranteed drop-in command for every FFmpeg build, file set, or YouTube endpoint. Replace the placeholder endpoint with the RTMPS URL and stream key provided in YouTube Live Control Room. FFmpeg input options apply to the input that follows; verify that your installed version accepts -stream_loop in this position for the concat input.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesRank #3
- 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.
ffmpeg -re -stream_loop -1 -f concat -safe 0 -i /media/videos/playlist.ffconcat
-c copy -f flv
'rtmps://INGEST_HOST/APP/STREAM_KEY'
- Confirm compatibility. The concat list must meet the demuxer’s matching-stream requirements, and the copied streams must be suitable for the chosen ingest. Review a representative clip with
ffprobeand test transitions between files. - Use the correct ingest endpoint. YouTube recommends RTMPS for encrypted ingest. Copy the RTMPS URL from Live Control Room; do not assume a conventional RTMP URL is encrypted.
- Test before scheduling. Start with a short representative playlist or clip and check YouTube’s preview, audio, video, and connection status before relying on a long stream.
- Watch the encoder output. Check for FFmpeg errors, dropped frames, interruptions at file boundaries, and whether the connection can sustain the selected bitrate.
The -stream_loop -1 input option repeats the playlist indefinitely. -re reads the input at its native rate, which is appropriate when sending a file as a real-time live feed. If stream copy fails YouTube’s ingest checks, choose a tested encoding configuration instead of expecting -c copy to convert the files.
Set YouTube Live ingest and stream settings
Get the URL and key
- In YouTube Studio, open Live Control Room and create or select the stream.
- Copy the stream URL and key for the encoder. Choose the RTMPS URL where available and supported by your FFmpeg build.
- Keep the key private. YouTube treats it like a password: do not expose it in screenshots, shared logs, public repositories, or scripts distributed to others. Reset it in Live Control Room if it is exposed.
YouTube’s stream key guidance explains how the key authorizes the encoder feed and how to reset it.
Rank #4
- 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
Match the feed to YouTube’s recommendations
YouTube’s current live encoder settings depend on ingest codec, resolution, and frame rate. For conventional SDR RTMP/RTMPS ingest, YouTube recommends H.264, constant bitrate (CBR), a two-second keyframe interval (not over four seconds), square pixels, progressive scan, and Rec. 709 SDR color. Its published table has separate recommended video bitrates by codec, resolution, and frame rate; for example, it lists 10 Mbps for H.264 1080p30 and 12 Mbps for H.264 1080p60. Select the row for your actual output and confirm the current table rather than treating either number as universal.
YouTube lists AAC or MP3 audio, a maximum frame rate of 60 fps, stereo audio at 44.1 kHz, and 128 kbps for stereo audio in its advanced recommendations. See YouTube’s encoder settings. With -c copy, the input retains its existing encoding settings; the command does not set or normalize these values.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallBest Value
- 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.
Preview, go live, and end cleanly
For a scheduled broadcast, wait for the encoder preview in Live Control Room, check that the event is accessible, and select Go live when it is ready. Monitor audio and video quality while the stream runs. When finished, stop FFmpeg and end the stream in the control room as appropriate. YouTube says streams under 12 hours are automatically archived; see its live streaming tips.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What Raspberry Pi 5 can—and cannot—be assumed to do
Raspberry Pi’s official camera documentation states: “Raspberry Pi 5 uses software video encoders.” Do not assume it has a dedicated hardware H.264 encoder for this workflow or that it can transcode a particular resolution and frame rate in real time.
When the files are already compatible, stream copy avoids a video encode and is the more practical starting point. If you need to transcode, performance depends on the source codec, resolution, frame rate, filters, FFmpeg build, system load, and thermal conditions. Test the actual playlist or a representative clip and confirm processing keeps pace with playback before scheduling a long broadcast. The available evidence does not establish a benchmark for this exact workflow on Pi 5.
Common problems and what to check
- FFmpeg reports incompatible streams or concat errors: Compare codecs, stream count, time bases, and other stream properties across the clips. Rework the playlist to use compatible files, or preprocess/re-encode them rather than forcing stream copy.
- Artifacts, gaps, or abrupt changes at clip boundaries: Check compatibility and the files’ duration metadata. The concat demuxer uses file durations when advancing through inputs, so incorrect durations can cause timing problems.
- YouTube does not accept the feed: Confirm that the stream URL and key came from the selected Live Control Room stream, that the key is current, that the endpoint is RTMPS if intended, and that the copied codecs/settings are acceptable to ingest. Check that the FFmpeg build supports the output format.
- The broadcast stutters or drops frames: Check available upload capacity against the bitrate for the selected codec, resolution, and frame rate. If encoding, verify that the Pi keeps up with real-time playback and is not overloaded.
- The key appears in a log or shared file: Treat it as compromised and reset it in Live Control Room before continuing.
- The stream is live but not archived as expected: YouTube’s cited automatic-archive guidance applies to streams under 12 hours; consult the current Live Control Room status and YouTube help for longer events.
Or let it run in the cloud
If the goal is a continuously looping YouTube channel rather than learning FFmpeg or keeping the Pi involved, StreamNeo runs uploaded videos from the cloud. Upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; streams play as uploaded up to 4K 60fps at one price per slot, with automatic recovery if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →StreamNeo is for uploaded videos streamed to YouTube; it does not stream from a camera. Visit StreamNeo for details, or start your free first day.
Quick Recap
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.




