Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
DocumentaryTube
FFmpeg

YouTube Live Stream Settings for a Raspberry Pi FFmpeg Playlist

A practical starting profile and setup guide for looping compatible video files from a Raspberry Pi to YouTube Live with FFmpeg.

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

For a practical first attempt, send H.264 over RTMPS using constant bitrate (CBR), a two-second keyframe interval, and a resolution/bitrate your Pi and upload connection can sustain. YouTube’s H.264 guidance gives 5–14 Mbps for 1080p30 and 3–8 Mbps for 720p30; those are YouTube recommendations, not Raspberry Pi performance guarantees. The playlist also needs compatible media files: FFmpeg’s concat demuxer is not a way to make arbitrary clips match.

Recommended settings to start with

Use YouTube’s settings as the ingest target, then test the complete setup on the specific Raspberry Pi, FFmpeg build, files, and network you intend to use. YouTube recommends RTMP or RTMPS ingest, H.264, CBR, and a two-second keyframe interval (with four seconds as the maximum). RTMPS encrypts the connection with TLS/SSL; use it when supported by your FFmpeg build and select the matching RTMPS server URL in YouTube Live Control Room.

Output profile YouTube H.264 bitrate guidance When to consider it
720p30 3 Mbps minimum; 8 Mbps recommended A cautious initial profile when upload capacity or encoding headroom is uncertain.
720p60 3 Mbps minimum; 8 Mbps recommended More motion detail than 30 fps, if the Pi and connection sustain it.
1080p30 5 Mbps minimum; 14 Mbps recommended More image detail than 720p at a lower frame rate than 60 fps.
1080p60 6 Mbps minimum; 17 Mbps recommended Higher detail and smoother motion, with greater demands on encoding and upload.

These figures are YouTube’s published H.264 guidance; the page does not state a publication year. They do not establish what a particular Pi can encode or what a particular internet connection can sustain. Choose a profile below your measured, stable upload capacity rather than treating the recommended bitrate as a target the network can barely reach. If either encoding capacity or upload headroom is in doubt, begin at 720p30 and test before moving up.

Audio and picture parameters

YouTube lists AAC or MP3 audio and recommends 44.1 kHz stereo at 128 kbps. For SDR, its advanced guidance includes progressive scan, square pixels, CABAC, and Rec. 709. The command below sets AAC audio to 128 kbps and 44.1 kHz stereo; the video filter produces progressive square-pixel output. It does not force a color-space conversion, so ensure your source and intended output color are appropriate rather than applying color tags blindly.

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.
#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.

Check the Pi’s encoder before choosing a profile

Do not infer live encoding capacity from the board name alone. Raspberry Pi’s H.264 comparison uses software libx264 configurations for Pi 5 and includes a Pi 4 hardware-encoder configuration using h264_v4l2m2m. These are example configurations, not a universal promise that every installation can sustain a given resolution, frame rate, or quality preset. The paper’s surfaced material does not provide numeric benchmark results suitable for predicting your workload.

Check what your installed FFmpeg actually supports, then test sustained operation on the target board. Encoder availability can depend on the OS, FFmpeg build, and drivers. The example command later uses libx264; it will fail if that encoder is absent or the Pi cannot keep up. A hardware encoder may reduce CPU use, but its availability and options are build-specific.

Build a compatible playlist for FFmpeg

The concat demuxer reads a text file and opens each listed media file sequentially. It adjusts timestamps using the files’ durations; it does not normalize mismatched streams into one consistent output. FFmpeg documents that inputs should have the same streams, codecs, and time base. Inaccurate duration metadata can create timestamp artifacts or gaps. If durations are known and reliable, a duration directive can override the stored duration, but it is not a fix for incompatible media.

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.

Write the concat list

Create a text file such as playlist.txt, with paths to the files in the desired order:

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

file '/home/pi/videos/film-01.mp4'
file '/home/pi/videos/film-02.mp4'

Use paths that exist from the directory where FFmpeg will run, or use absolute paths as above. A filename containing a quote or other special character may need escaping according to FFmpeg’s concat syntax. Keep the source files in a consistent format and inspect them before relying on a long stream. If one file has different audio, video, or timing characteristics, test the transition; do not assume stream-copy concatenation will work cleanly.

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.

Loop the playlist and encode a common output

For a playlist that needs to repeat indefinitely, use the concat input with -stream_loop -1. A software-encoding starting command is:

ffmpeg -re -stream_loop -1 -f concat -safe 0 -i /home/pi/playlist.txt -vf "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:(ow-iw)/2:(oh-ih)/2,setsar=1,fps=30" -c:v libx264 -preset veryfast -tune zerolatency -b:v 4500k -minrate 4500k -maxrate 4500k -bufsize 9000k -g 60 -keyint_min 60 -sc_threshold 0 -pix_fmt yuv420p -c:a aac -b:a 128k -ar 44100 -ac 2 -f flv "rtmps://YOUR_SERVER_URL/YOUR_STREAM_KEY"

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

This example targets 720p30, uses a 4.5 Mbps video bitrate within YouTube’s 720p30 H.264 range, and sets a 60-frame GOP (two seconds at 30 fps). It is a starting configuration, not a tested Pi benchmark. The scale-and-pad filter preserves aspect ratio within a 1280×720 frame; check the resulting picture and adjust for your source material. If your source files have no audio, or inconsistent audio layouts, the command may need an audio mapping or silence track appropriate to those files.

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

-re reads input at its native rate rather than as fast as possible; -stream_loop -1 repeats the input sequence. -f concat selects the concat demuxer, while -safe 0 allows the absolute paths shown in the playlist. Since the command re-encodes, it can create a common output format from compatible inputs, but it cannot cure corrupt files or guarantee gapless transitions. FFmpeg options and encoder behavior vary by release; check the installed version’s documentation and help output if an option is rejected.

Choosing another profile

For 1080p30, change the scale and pad dimensions to 1920×1080, set the frame rate to 30, and choose a video bitrate within YouTube’s 5–14 Mbps guidance range. At 1080p60, use 60 fps, a two-second GOP of 120 frames, and a bitrate within 6–17 Mbps. At 720p60, use a two-second GOP of 120 frames and remain within 3–8 Mbps. These figures describe YouTube’s H.264 recommendations, not a guarantee that the Pi can sustain the encode. Adjust -b:v, -minrate, and -maxrate together for the chosen CBR target, and make -g and -keyint_min match twice the output frame rate. Do not exceed a four-second keyframe interval.

If libx264 overloads the CPU, test a lower resolution or frame rate before trusting a higher profile. If using a hardware encoder such as h264_v4l2m2m, verify the encoder and supported controls on that system; options for one encoder do not necessarily apply to another.

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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Connect FFmpeg to YouTube Live safely

  1. In YouTube Live Control Room, create or open the scheduled stream and retrieve its server URL and stream key. YouTube’s encoder setup instructions use these values to connect an external encoder.
  2. Choose RTMPS if your FFmpeg build supports it, and retrieve the RTMPS URL specifically. YouTube notes that the ordinary RTMP URL may be displayed by default; do not pair an RTMPS client with the ordinary RTMP endpoint.
  3. Replace the unmistakable placeholder in the example URL with the matching server address and key using a secure method. Do not publish a real key in scripts, screenshots, logs, or shared terminals. If the key is exposed, reset it in Live Control Room.
  4. Start FFmpeg, then confirm that YouTube receives the signal and reports stream health before relying on the stream. YouTube advises testing with representative audio and movement and monitoring stream-health messages during the event.

For a long-running process, avoid putting a reusable key in a world-readable script. Restrict file permissions and access to the account or device that runs FFmpeg. Protect the Pi and its power and network connection as well: local playback and encoding stop if the device loses power or connectivity.

Test the entire chain before going live

Test the actual playlist, audio, resolution, and frame rate on the actual Pi and network. YouTube Help says, “Make sure to test before you start your live stream.” During a test, check both the encoder’s output and YouTube’s Live Control Room stream-health indications; a process that remains running is not proof the platform is receiving a healthy stream.

  • Measure upload capacity at the location and time the Pi will stream, and leave headroom above the total stream bitrate for variation and other network traffic.
  • Watch for CPU saturation, dropped frames, temperature-related throttling, and audio/video sync changes through multiple playlist transitions.
  • Confirm the stream reaches the intended resolution and frame rate, and that sound is present at the beginning and after each file change.
  • Test a realistic period, including a playlist loop if the stream will run continuously. Verify that the repeat boundary does not introduce an unwanted gap or timestamp jump.

Choose latency and viewer controls for the format

YouTube’s live settings include latency and DVR controls. Lower latency can increase playback buffering; DVR allows viewers to pause and resume. For a documentary playlist where viewers may want to pause or catch up, DVR can be useful. If near-real-time interaction matters more, choose latency accordingly and test playback behavior rather than assuming the lowest setting is always best.

Copyright and monetization checks for a documentary playlist

Only stream footage, music, narration, and other material you have the right to broadcast on YouTube. A video being available online or described as a documentary does not itself establish permission for a live rebroadcast. Check licenses for both picture and sound, including background music and third-party clips, and retain documentation for permissions. YouTube may restrict or interrupt a stream when rights claims apply. Separately, meeting live-stream technical requirements does not establish eligibility for monetization or compliance with YouTube’s reused-content rules; review the rules applicable to your channel and content before building a continuous schedule.

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

Common problems and fixes

Symptom Likely cause What to check
FFmpeg says an encoder is unknown or unavailable The installed build lacks the selected encoder, or required driver support is absent. Inspect encoders available in that build and choose a supported software or hardware path. Recheck options because encoders expose different controls.
Encoding falls behind or frames are dropped The Pi cannot sustain the chosen output profile, or the workload is constrained. Reduce resolution or frame rate, test a less demanding encoding configuration, and monitor sustained performance on the actual board.
YouTube reports unstable stream health Upload capacity is inadequate or variable, or the outgoing bitrate/profile is too demanding. Measure upload capacity during representative conditions, reduce the profile, and leave network headroom.
Concat input fails or transitions glitch Files have incompatible stream layouts/codecs/time bases, paths are wrong, or duration metadata is inaccurate. Verify every listed path and inspect media streams and durations. Make inputs consistent or re-encode into a common format; test transitions and the loop boundary.
RTMPS connection fails The client lacks RTMPS support, or the URL and protocol do not match. Confirm FFmpeg supports the protocol and retrieve the RTMPS server URL in Live Control Room rather than using the ordinary RTMP URL.
YouTube receives video but no usable audio Audio is absent, mapped incorrectly, or inconsistent between playlist files. Inspect each source’s audio streams and test the output after every transition. Add suitable mapping or silence handling if the playlist requires it.
Stream starts, then stops when the Pi or home connection fails The workflow depends on the local host and its power and internet access. Stabilize the local setup or use a cloud-based service that runs the uploaded playlist independently of a home computer.

Or let it run in the cloud

If you want a YouTube playlist to continue without keeping a Pi or home connection running, StreamNeo is a cloud service for looping uploaded videos to YouTube. Upload a recording or build a playlist, add your YouTube stream key once, and go live. It does not stream from a camera or to other platforms.

  • Nothing has to stay on at home: the stream runs from the cloud.
  • One flat price per slot for any uploaded quality up to 4K 60fps; the video streams as made, without re-encoding or quality tiers.
  • Automatic recovery if YouTube drops the stream.
  • The first day is free with no card, once per account.

Monthly is $9.99 per month. See StreamNeo for the service details, then start the free first 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.