The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
You can loop a recorded sermon on YouTube Live by having FFmpeg read the video repeatedly, encode it to YouTube’s live-stream settings, and send it to a YouTube Live stream using RTMPS. On a Raspberry Pi 5, treat the setup as something to test—not as a guaranteed 24/7 encoder: the available Raspberry Pi performance paper does not establish that a particular Pi, video, resolution, cooling setup, or network will sustain your church’s stream.
How the loop-to-live setup works
This setup retransmits a recording as a new live encoder input. FFmpeg reads a sermon file, loops it, and sends the resulting live output to YouTube. It is different from replaying an earlier YouTube broadcast: the Pi is encoding and delivering a stream while the broadcast is live, rather than asking viewers to watch a past broadcast.
The basic chain is sermon file → FFmpeg loop and encode → RTMPS → YouTube Live. YouTube documents supported ingestion protocols and recommends RTMPS for secure delivery. See YouTube’s ingestion protocol comparison and RTMPS delivery guidance.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Prepare the video, YouTube stream, and Pi
Check the sermon file
Use a local video file that FFmpeg can read. Before configuring the stream, identify its resolution, frame rate, audio stream, and duration. Choose an output frame rate and resolution deliberately; avoid assuming that a Pi 5 will encode any file at any setting just because it can run FFmpeg.
#1 Best Overall
- Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
For a continuous loop, use a file with a deliberate beginning and ending. FFmpeg can repeat the file, but looping does not remove an abrupt cut, silence, or mismatched audio at the boundary. Watch a full pass and the transition back to the beginning before using it for a service.
Create and configure the YouTube Live stream
- In YouTube Studio, create or select the live stream for the broadcast and open its encoder or stream settings.
- Copy the RTMPS server URL and stream key supplied by YouTube. Use the RTMPS endpoint, not a guessed or copied endpoint from an unrelated tutorial.
- Keep the key private. Do not paste it into a public script, chat, or repository. If it is exposed, replace or reset it in YouTube Studio before streaming again.
- Configure the intended stream visibility and scheduling in YouTube Studio, then use its preview and stream-health messages during testing.
Install and verify FFmpeg
Install FFmpeg using the package or build appropriate to your Raspberry Pi OS, then check that it is available with ffmpeg -version. Option names and available encoders can vary by installed build; the FFmpeg documentation is at ffmpeg.org/ffmpeg.html. This example uses software H.264 encoding with libx264; verify that your FFmpeg build includes it before relying on the command.
Rank #2
- Includes Raspberry Pi 5 16GB with 2.4Ghz 64-bit quad-core CPU (16GB RAM)
- Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
- CanaKit Turbine Black Case for the Raspberry Pi 5
- CanaKit Low Noise Bearing System Fan
- Mega Heat Sink - Black Anodized
Choose YouTube-compatible output settings
YouTube’s current encoder guidance calls for constant bitrate (CBR), supports H.264, H.265/HEVC, and AV1 video, and lists AAC or MP3 audio. It recommends a two-second keyframe interval and says the interval should not exceed four seconds. For H.264, its recommended bitrate is 5 Mbps for 1080p30 and 3 Mbps for 720p30. These are YouTube recommendations, not proof that a particular Pi or church internet connection can sustain the chosen stream. Consult YouTube’s encoder settings, bitrates, and resolutions.
| Example output | YouTube H.264 bitrate recommendation | Keyframe interval at 30 fps | What to verify |
|---|---|---|---|
| 1080p30 | 5 Mbps | 2 seconds: 60 frames | That the Pi sustains the encode and the church upload has dependable headroom. |
| 720p30 | 3 Mbps | 2 seconds: 60 frames | That the Pi sustains the encode and the church upload has dependable headroom. |
Do not select a bitrate solely because it appears in the table. YouTube recommends a constant bitrate, while actual upload capacity can vary. Test at the location and on the connection that will be used for the broadcast. If you choose a different frame rate, calculate the keyframe interval in frames for the intended two-second interval, and check the installed encoder options.
Rank #3
- CanaKit Raspberry Pi 5 Essentials Starter Kit
Run a looping FFmpeg stream
The following is a starting example for a 1080p30 H.264 stream at YouTube’s recommended 5 Mbps video bitrate. It assumes the input file is already 1920×1080, has usable audio, and can be encoded by the Pi at 30 frames per second. It re-encodes video and audio to set predictable output parameters; it is not a claim that every Pi 5 installation will sustain this workload.
- Set shell variables to the local video path and the RTMPS server URL and stream key copied from YouTube Studio. Keep the key out of shared files and shell-history logs where possible.
VIDEO="/path/to/sermon.mp4"
YOUTUBE_RTMPS_URL="<RTMPS server URL from YouTube Studio>"
YOUTUBE_STREAM_KEY="<stream key from YouTube Studio>" - Run FFmpeg with
-stream_loop -1before the input so the input repeats indefinitely. Replace the placeholders before running; do not include the angle brackets literally.ffmpeg -re -stream_loop -1 -i "$VIDEO" -c:v libx264 -preset veryfast -b:v 5M -minrate 5M -maxrate 5M -bufsize 10M -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -pix_fmt yuv420p -c:a aac -b:a 128k -ar 44100 -f flv "$YOUTUBE_RTMPS_URL/$YOUTUBE_STREAM_KEY" - Open the live stream preview in YouTube Studio. Confirm that video and audio arrive, inspect stream health, and read any warnings or errors before making the stream public or relying on it for a service.
- Watch the stream across a complete file loop, including the transition between repetitions. Check for freezes, dropped frames, audio gaps, or a Pi that becomes unstable under sustained load.
The -stream_loop -1 option is illustrated in a community FFmpeg discussion, not an official guarantee for every input or FFmpeg build; confirm behavior with your installed version and actual file. The example uses -re to read at a real-time pace and -f flv for YouTube’s RTMP-family ingestion. A different source frame rate, aspect ratio, resolution, or audio layout may need different filtering and encoder settings rather than a blind copy of this command. FFmpeg’s documentation is the reference for the installed version.
Rank #4
- All-in-One Complete Kit: This SANOOV RPi 5 bundle comes with Raspberry Pi 5 4GB RAM single board, active cooler, durable ABS case and screwdriver. No extra parts needed, ready to use right out of the box for beginners and hobbyists
- Powerful Single Board Computer: Equipped with 4GB RAM and high-performance processor, delivers fast running speed for 4K playback, AI projects, programming and daily computing tasks. SANOOV for raspberry pi 5 4GB is equipped with broadcom 64 quad-core Arm Cortex A76 processor with gigabit ethernet and upgraded with IEEE 802.11ac Wi-Fi, Bluetooth 5.0 dual-band 2.4Ghz and 5Ghz and Power Over Ethernet (POE). Upgrading delivers 2-3 x speed vs Pi 4, redefining the experience
- Efficient Active Cooler: Effectively lowers operating temperature and prevents performance throttling. Runs quietly even under long-time heavy load, ensures stable operation all day long. SANOOV RPi 5 4GB kit offer an active cooler, which combines an aluminium heatsink with a high-performance PWM fan. Active cooler is fully compatible with the Pi OS, which can effectively reduce the temperature of RPi5 and ensure its good performance during long-term high load operation
- Sturdy ABS Protective Case: Well-fitted for Raspberry Pi 5 board, can be secured with 4 screws to effectively protect the Pi 5 motherboard from damage, reserves full access to all ports and buttons. SANOOV uses ABS material to produce the case, which has a softer texture and feel. Meanwhile, SANOOV case adopts a layered design for easy disassembly and installation. (Tip: The Case cannot install M.2 HAT Add on Board and Solid State Drive!)
- Wide Application & Full Compatibility: Seamlessly compatible with official OS and mainstream peripheral accessories for Raspberry Pi 5. Whether you are a beginner, student, electronics hobbyist or professional developer, this all-in-one kit meets your diverse needs. It excels in IoT projects, robotics design, retro gaming devices, home media servers and other DIY creations. Backed by a large global community, you can easily find guides, technical support and shared projects online
For a 720p30 output
If you deliberately choose 720p30 and the source needs scaling, use a 1280×720 scale filter and YouTube’s 3 Mbps H.264 recommendation, then test the Pi and upload path again. For example, replace the video bitrate options with -b:v 3M -minrate 3M -maxrate 3M -bufsize 6M and add -vf "scale=1280:720". Keep the 30 fps, 60-frame keyframe settings only if the output is in fact 30 fps. Scaling, frame-rate conversion, and encoding all affect workload; do not treat this as a measured Pi 5 benchmark.
Rehearse before using it for a service
YouTube advises testing with audio and movement similar to the planned stream, monitoring stream health during the event, and reviewing messages. For a church sermon, make the rehearsal representative: use the actual media, output settings, Pi, network connection, and intended duration. A short preview can establish that the key and URL work, but it cannot establish that the system will remain stable throughout a long broadcast.
Best Value
- 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
- 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
- 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
- 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
- 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.
- Listen for clean audio at the start, during playback, and across the loop point.
- Watch for stable video, freezes, dropped frames, or encoder lag in YouTube Studio.
- Check FFmpeg’s output for errors and watch the Pi for sustained instability during the rehearsal.
- Test upload headroom at the church’s actual streaming location, not just on another network.
- Review YouTube Studio stream-health messages and address warnings before depending on the setup.
The Raspberry Pi H.264 paper describes software libx264 encoding on Raspberry Pi 5-series computers, but it does not validate a specific resolution, frame rate, cooling arrangement, or all-day runtime for your church’s media. See Raspberry Pi’s H.264 encoding performance paper. Base the go/no-go decision on a representative rehearsal of your own setup.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common failures
| Symptom | Likely area to check | Next action |
|---|---|---|
| YouTube receives no video | RTMPS URL, stream key, stream state, or FFmpeg output errors. | Re-copy the RTMPS server URL and key from the correct YouTube Studio stream, verify the stream is ready to receive an encoder, and inspect FFmpeg’s error output. |
| Stream connects but video is unstable or drops frames | Encode load or insufficient/variable upload capacity. | Check the Pi and YouTube stream health during a representative rehearsal. Try a lower output such as 720p30 only if it suits the service, then retest. |
| Audio is missing or unreliable | Input audio stream, selected audio codec, or loop boundary. | Confirm the file has an audio stream, check FFmpeg’s messages, listen to the preview, and inspect the transition between file repetitions. |
| Playback stops after one sermon | Loop option placement or input handling. | Confirm -stream_loop -1 appears before -i, and verify loop behavior with the installed FFmpeg version and file. |
| The test works briefly but fails during a longer run | Sustained performance, system conditions, or network variation. | Run a rehearsal for the planned duration on the real setup. A brief successful connection does not establish all-day reliability. |
Copyright and YouTube policy checks
Only stream recordings and music the church has the rights or permissions to use for this purpose. A sermon recording can include separately copyrighted music, readings, video clips, or other material; permission to use one part does not automatically cover everything in the recording. Review YouTube’s notices and stream status during tests, and use the copyright safety checklist as a pre-stream reminder. Do not assume that repeating a recording changes its rights status or guarantees monetization. Also consider whether a continuous rerun is appropriate for the channel and audience; a live loop does not by itself establish compliance with YouTube’s channel monetization policies.
Or let it run in the cloud
If you want the YouTube stream to continue without keeping the Pi or another home computer running, StreamNeo runs uploaded videos from the cloud. Upload the sermon recording or build a playlist, add your YouTube stream key once, and go live. It plays uploaded videos to YouTube; it is not a camera stream.
- Nothing has to stay on at home for the stream to keep running.
- Uploaded video streams as made, up to 4K 60fps, at one flat price per slot, with no re-encode or quality tiers.
- Automatic recovery is provided if YouTube drops the stream.
- The first day is free, with no card required; one free day is available per account.
Monthly pricing is $9.99 per month. The service also offers daily, weekly, six-month, and yearly billing; UPI and cards are available in India, and card checkout is available worldwide. Every slot includes 10 GB of storage, pooled across active slots, and the same features; five or more slots can be discussed with support. See the StreamNeo pricing page. Start your free StreamNeo day.
Estimate upload time and compare the setup cost
For a recording that must be uploaded to a cloud service, estimate transfer time before planning a launch or schedule. For a cost comparison between a cloud stream and keeping a PC running, use the upload-time calculator and cloud-versus-PC cost calculator. For the Pi method, account for the equipment and dependable internet you already have, and test rather than assuming a particular Pi workload will work continuously.
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.

