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

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

To play church sermons from a folder in random order on YouTube Live, first shuffle the filenames into an FFmpeg concat list, then feed that list to FFmpeg and send the encoded output to the RTMPS URL and stream key from YouTube Live Control Room. This works best when the files have matching streams and compatible timestamps. The example below makes one shuffled pass; it stops when the playlist ends.

Before you begin

  • Confirm that live streaming is enabled for the church’s YouTube channel and create or schedule the Live event.
  • Install an FFmpeg build with the required encoders, including libx264 and AAC support. Confirm available encoders with ffmpeg -encoders.
  • Put the sermon recordings in a dedicated folder. Keep the generated playlist outside it so the file search does not include the playlist itself.
  • Check that the church has rights to stream all material in the recordings, including sermon video, slides, music, and other included content.
  • Allow sufficient, stable upload capacity. YouTube recommends keeping 20% upload headroom; choose a bitrate the connection can sustain.

Check whether the sermon files can be joined directly

The concat demuxer reads files in the order listed without re-encoding, but it expects matching streams, codecs, and time bases. If recordings vary in resolution, frame rate, codecs, audio layout, or timestamps, transitions may fail or the output may be inconsistent. Normalize or re-encode the archive to a consistent format first, then validate the transitions. See the FFmpeg concat demuxer documentation.

The example uses MP4, MOV, and MKV files in one directory. It assumes filenames have no line breaks or single quotes. Those characters need correct concat-list escaping; for a controlled production workflow, use a robust path-quoting implementation or rename files to a safe naming scheme.

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

Shuffle the folder and create a concat playlist

This Bash example is intended for Linux. It uses GNU find and shuf; macOS users need GNU coreutils or a platform-specific shuffle method. It is an implementation example, not a tested command, so adapt and test it with the actual archive and FFmpeg build.

#1 Best Overall
URayCoder HD HEVC H.265 MPEG4 H.264 4K HDMI to Video Streaming IPTV Encoder for HDMI to RTSP RTMP HTTP UDP HLS SRT Facebook YouTube Live Streaming Server
  • 【Innovative Product with Leading Technology】- Equipped with an advanced H.265 /H.264 dual encoding chip, supports 4K UHD (3840x2160) video input and output, with a maximum frame rate of 30fps at 4K resolution and up to 120fps at 2K and lower resolutions, delivering a smooth and detailed visual experience. It also supports HDCP 1.4 decryption, easily decoding various HDMI ultra HD video sources, delivering a cinematic visual experience for both professional live streaming and 4K ultra HD content transmission.
  • 【Multi-protocol and Multi-platform Compatibility】- Fully compatible with streaming protocols such as HTTP, RTSP, RTMP(S), SRT, HLS(M3U8), MP4, Multicast(UDP, RTP, PTL), FLV, WebRTC, TRTC, ICECAST, it can simultaneously output 4 video streams with different protocols and push them to live streaming platforms such as YouTube, Facebook, Twitch, and Vimeo with one click. Simultaneous live streaming across multiple platforms can be achieved without additional equipment.
  • 【Highly Customizable Settings to Meet Individual Needs】- It supports adding static text, scrolling captions, brand logos, and timestamps. Users can freely adjust core parameters such as video resolution, frame rate, and bitrate, and also perform personalized editing functions such as video cropping, rotation, flipping, and mirroring. It supports dual input of HDMI embedded audio and line-in audio, with adjustable sound quality, making your live stream content more distinctive and allowing you to create a unique brand live stream style.
  • 【Stable and Efficient Transmission, Easy Operation】- Employing HDMI to Ethernet core connection technology, it ensures stable and reliable network transmission with low latency and no lag, adapting to various network environments. Equipped with an intuitive user interface and detailed instruction manual, no professional technical background is required; setup can be completed quickly after connecting the device. It is also compatible with multiple terminals such as computers and mobile phones for management, and the video stream status can be viewed in real time via a URL.
  • 【Lifetime Free Warranty and Technical Supports】- All URayCoder video codecs come with a lifetime free warranty and technical supports, supporting secondary development and feature customization to meet enterprise-level personalized needs. Meanwhile, we providing many kinds of customization services such as shell pattern printing, logo addition, hardware and function development, ensuring reliable quality and worry-free after-sales service.
#!/usr/bin/env bash
set -euo pipefail

SERMON_DIR="/path/to/sermons"
PLAYLIST="/tmp/sermons-shuffled.ffconcat"

find "$SERMON_DIR" -maxdepth 1 -type f \
  ( -iname '*.mp4' -o -iname '*.mov' -o -iname '*.mkv' ) -print0 \
  | shuf -z \
  | while IFS= read -r -d '' file; do
      printf "file '%s'\n" "$file"
    done > "$PLAYLIST"

# Inspect the playlist before streaming.
sed -n '1,10p' "$PLAYLIST"

-print0 and shuf -z preserve filenames containing spaces, but the simple printf line does not safely escape every possible filename. The -safe 0 option used below permits absolute paths in the generated playlist; only generate it from a trusted folder and do not feed FFmpeg an untrusted list.

Connect FFmpeg to YouTube Live

  1. In YouTube Live Control Room, create or select the event and copy its server URL and stream key. YouTube describes stream keys as password-like; do not include a real key in a shared script, repository, chat, screenshot, or public article. If exposed, reset it in Live Control Room. See Manage live stream settings.
  2. Choose the output resolution, frame rate, and bitrate to match the source material and sustained upload capacity. YouTube’s current H.264 guidance lists 5–14 Mbps for 1080p at 30 fps and 6–17 Mbps for 1080p at 60 fps. It recommends CBR, a two-second keyframe interval (no more than four seconds), AAC or MP3 audio, and 44.1 kHz sampling with 128 Kbps stereo audio. Check the current encoder settings, bitrates, and resolutions before a broadcast.
  3. Run FFmpeg with the selected settings. Replace the placeholders with the actual RTMPS destination and stream key; do not save a real key in a shared script.
ffmpeg -re -f concat -safe 0 -i /tmp/sermons-shuffled.ffconcat \
  -c:v libx264 -preset veryfast -pix_fmt yuv420p \
  -r 30 -g 60 -keyint_min 60 -sc_threshold 0 \
  -b:v 6M -maxrate 6M -bufsize 12M \
  -c:a aac -b:a 128k -ar 44100 \
  -f flv "RTMPS_URL/STREAM_KEY"

The 6 Mbps video bitrate in this illustrative H.264 1080p30 command falls within YouTube’s listed range, but it is not a universal target: select settings appropriate to the archive and the connection. The -g 60 and -keyint_min 60 values at 30 fps set a two-second keyframe interval. The command uses FLV output for the RTMP-family ingest path; YouTube recommends RTMPS for encrypted transport. YouTube also lists H.265/HEVC and AV1 among supported video codecs, but use them only if the installed FFmpeg build and your chosen workflow support them.

Rank #2
UNISHEEN 1080P60 HDMI Video Encoder, H.265/H.264 Live Streaming Encoder, HDMI to RTSP/RTMP/SRT/HLS/WebRTC IPTV Encoder for YouTube Facebook Live, Browser Setup, No PC Software Needed
  • 【Hardware H.265/H.264 Encoding at 1080P60】Dedicated hardware encoder delivers broadcast-quality 1080P60 streams with H.265/H.264 compression. Reduces bandwidth usage by up to 50% compared to legacy H.264-only solutions, while maintaining crisp, crystal-clear video output.
  • 【Broad Protocol Support for IP Distribution】 Supports SRT, RTMP(S), RTSP, UDP, HTTP, HLS, WebRTC, TRTC, Icecast and SHOUTcast — integrate seamlessly with CDNs, surveillance NVRs, IPTV systems and browser-based monitoring dashboards. One device replaces multiple single-purpose streaming boxes.
  • 【Browser-Based Setup in Minutes】 Set up in minutes through any browser — no software, drivers or OS compatibility issues. DHCP is enabled by default to prevent IP address conflicts on your network. Note: basic networking knowledge (IP address, RTSP/RTMP configuration) is recommended for advanced streaming setups.
  • 【Compact Design with Flexible Deployment】Palm-sized form factor (approx. 90×54×29mm) fits easily behind monitors, on shelves, or in equipment racks. Low power consumption ensures reliable 24/7 operation for live events, remote monitoring, and digital signage.
  • 【Professional Audio & OSD Overlay + 1-Year Warranty】 Supports HDMI embedded audio plus external 3.5mm input. Built-in OSD generator adds scrolling text, logos, or timestamps directly to the video stream — ideal for branding, event info, or security labeling. Backed by a 1-year warranty and 24/7 online technical support.

Preview the event and check stream health

Wait for the incoming stream preview in Live Control Room and verify video, audio, transitions, and stream health before making the event available to viewers. Test with representative motion and audio. YouTube’s guidance is direct: “Make sure to test before you start your live stream.” Monitor Live Control Room messages during the broadcast and address warnings before proceeding.

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.

Make the shuffled rotation continuous

The command above plays the generated list once. It does not loop forever. For continuous rotation, use a supervisor that waits for FFmpeg to finish, generates a fresh shuffled list, and starts FFmpeg again. Test the end-of-list behavior and transition between runs; there may be a gap while the process exits and restarts. An unattended setup also needs monitoring and a recovery plan for encoder or network failures.

Rank #3
Blackmagic Design Streaming Encoder 4K – 4K Ultra HD Live Streaming via SRT & RTMP, SDI Input, Ethernet + Mobile, Includes 6ft Power Cord (BDLKWEB/D/SED4K)
  • 4K & HD STREAMING IN H.264 AND H.265 – Self-contained processor supporting H.264 and H.265 encoding in HD or Ultra HD (up to 2160p60) via SRT or RTMP, streaming directly to YouTube, Facebook, X, Twitch, Zoom, Microsoft Teams, OBS, Wowza, and many more — no encoding PC needed.
  • 12G-SDI INPUT WITH STANDARDS CONVERSION – Supports input resolutions up to DCI 4K60 with an SDI input and SDI loop output, plus Teranex-powered automatic standards conversion so any HD or Ultra HD source streams cleanly at any target resolution.
  • DUAL MONITOR OUTPUTS – Features both SDI and HDMI monitor outputs with a user-configurable standards converter on both the 12G-SDI Out and 4K HDMI Out, so you can feed a confidence monitor or downstream device at any required format independent of your streaming standard.
  • ETHERNET + 5G/4G MOBILE WITH AUTO-FAILOVER – Connect via Gigabit Ethernet (10/100/1000BASE-T) or tether a smartphone via USB-C for mobile data, with automatic switchover between connections — ensuring your stream stays on air even if the primary internet connection drops.
  • CLOSED CAPTIONS, TIMECODE & REST API – Supports embedding CEA-608 and CEA-708 closed captions in live RTMP streams, source timecode over RTMP and SRT, and offers a REST API over Ethernet for external HTTP control — ideal for broadcast automation and accessibility-compliant workflows.

This produces one continuous YouTube program, not separate video pages for each sermon. The individual files do not automatically become chapters or gain separate navigation in the live stream.

Troubleshoot common problems

  • Concat errors or broken transitions: The inputs may not have matching streams, codecs, or time bases. Inspect the files, normalize or re-encode them consistently, and test transitions before going live.
  • Playlist is empty or missing sermons: Check SERMON_DIR, confirm that files are directly inside it (the search uses -maxdepth 1), and verify that extensions match MP4, MOV, or MKV.
  • Playlist parsing fails on a filename: The sample does not escape single quotes or newlines. Rename unusual files or replace the basic writer with correct concat-demuxer escaping.
  • YouTube says stream settings are wrong: Compare codec, resolution, frame rate, bitrate, keyframe interval, and audio settings with the current YouTube encoder guidance. Confirm the FFmpeg output matches the settings selected for the event.
  • Stream health reports instability or viewers see buffering: Lower bitrate or resolution to a stable target, check sustained upload capacity, and preserve YouTube’s recommended 20% headroom. A network disruption can break a stream.
  • No preview or connection rejected: Confirm the server URL and stream key were copied from the selected Live Control Room event, and check whether the key was reset or mistyped. Treat the key as a password.
  • Copyright or policy warning: Stop or replace the affected material as appropriate. YouTube requires live content to follow its Community Guidelines and Terms of Service; active copyright strikes and matches with other copyrighted live broadcasts can restrict live streaming. Review YouTube live-streaming restrictions and verify rights to every included element before resuming.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or let it run in the cloud

If you do not want a church computer to remain on, StreamNeo keeps an uploaded-video YouTube stream running from the cloud. Upload a recording or build a playlist, add the YouTube stream key, and go live. Nothing has to stay on at home; videos stream as uploaded at any quality up to 4K 60fps for one flat price per slot, YouTube-drop recovery is automatic, and the first day is free with no card. Monthly: $9.99 per month. See StreamNeo for details, then start the free first day.

Best Value
HEVC MPEG4 H.265 H.264 HDMI to IP Network Video Encoder, 1080P HD Digital Video Audio Encoder Hardware Supports RTSP RTMPS UDP HLS SRT, for IPTV, Live Streaming, YouTube, Facebook, OBS, NVR, etc.
  • ⭐【Innovative Product with Leading Technology】- Equipped with an advanced H.265/H.264 dual encoding chip, supports 1920x1080 resolution input and output, achieving 60fps high-definition presentation with realistic and delicate color reproduction and lossless detail. It also supports HDCP 1.4 decryption, easily decoding various HDMI high-definition video sources, delivering a cinematic visual experience for both professional live streaming and high-definition content transmission.
  • ⭐【Multi-protocol and Multi-platform Compatibility】- Fully compatible with streaming protocols such as HTTP, RTSP, RTMP(S), SRT, HLS(M3U8), MP4, Multicast(UDP, RTP, PTL), ONVIF, FLV, it can simultaneously output 4 video streams with different protocols and push them to live streaming platforms such as YouTube, Facebook, Twitch, and Vimeo with one click. Simultaneous live streaming across multiple platforms can be achieved without additional equipment.
  • ⭐【Highly Customizable Settings to Meet Individual Needs】- It supports adding static text, scrolling captions, brand logos, and timestamps. Users can freely adjust core parameters such as video resolution, frame rate, and bitrate, and also perform personalized editing functions such as video cropping, rotation, flipping, and mirroring. It supports dual input of HDMI embedded audio and line-in audio, with adjustable sound quality, making your live stream content more distinctive and allowing you to create a unique brand live stream style.
  • ⭐【Stable and Efficient Transmission, Easy Operation】- Employing HDMI to Ethernet core connection technology, it ensures stable and reliable network transmission with low latency and no lag, adapting to various network environments. Equipped with an intuitive user interface and detailed instruction manual, no professional technical background is required; setup can be completed quickly after connecting the device. It is also compatible with multiple terminals such as computers and mobile phones for management, and the video stream status can be viewed in real time via a URL.
  • ⭐【Lifetime Free Warranty and Technical Supports】- All URayCoder video codecs come with a lifetime free warranty and technical supports, supporting secondary development and feature customization to meet enterprise-level personalized needs. Meanwhile, we providing many kinds of customization services such as shell pattern printing, logo addition, hardware and function development, ensuring reliable quality and worry-free after-sales service.
Rank #4
H.265 H.264 4K HDMI to IP Network Video Encoder, 1080P HD Video Audio Encoder Supports RTSP RTMPS UDP HLS SRT HTTP WebRTC ICECAST, for IPTV, Live Streaming, YouTube, Facebook, OBS, ONVIF NVR, etc.
  • ⭐【Innovative Product with Leading Technology】- Equipped with an advanced H.265 /H.264 dual encoding chip, supports 4K UHD (3840x2160) video input and output, with a maximum frame rate of 30fps at 4K resolution and up to 120fps at 2K and lower resolutions, delivering a smooth and detailed visual experience. It also supports HDCP 1.4 decryption, easily decoding various HDMI ultra HD video sources, delivering a cinematic visual experience for both professional live streaming and 4K ultra HD content transmission.
  • ⭐【Multi-protocol and Multi-platform Compatibility】- Fully compatible with streaming protocols such as HTTP, RTSP, RTMP(S), SRT, HLS(M3U8), MP4, Multicast(UDP, RTP, PTL), ONVIF, FLV, WebRTC, TRTC, ICECAST, it can simultaneously output 4 video streams with different protocols and push them to live streaming platforms such as YouTube, Facebook, Twitch, and Vimeo with one click. Simultaneous live streaming across multiple platforms can be achieved without additional equipment.
  • ⭐【Highly Customizable Settings to Meet Individual Needs】- It supports adding static text, scrolling captions, brand logos, and timestamps. Users can freely adjust core parameters such as video resolution, frame rate, and bitrate, and also perform personalized editing functions such as video cropping, rotation, flipping, and mirroring. It supports dual input of HDMI embedded audio and line-in audio, with adjustable sound quality, making your live stream content more distinctive and allowing you to create a unique brand live stream style.
  • ⭐【Stable and Efficient Transmission, Easy Operation】- Employing HDMI to Ethernet core connection technology, it ensures stable and reliable network transmission with low latency and no lag, adapting to various network environments. Equipped with an intuitive user interface and detailed instruction manual, no professional technical background is required; setup can be completed quickly after connecting the device. It is also compatible with multiple terminals such as computers and mobile phones for management, and the video stream status can be viewed in real time via a URL.
  • ⭐【Lifetime Free Warranty and Technical Supports】- All URayCoder video codecs come with a lifetime free warranty and technical supports, supporting secondary development and feature customization to meet enterprise-level personalized needs. Meanwhile, we providing many kinds of customization services such as shell pattern printing, logo addition, hardware and function development, ensuring reliable quality and worry-free after-sales service.

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.

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