October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
DocumentaryTube
Admit one · Blog

How to Send FFmpeg to YouTube’s Primary and Backup RTMP URLs

Use FFmpeg’s tee muxer to send mapped audio and video to YouTube’s primary and backup ingest URLs, then validate the event and its failover behavior in Live Control Room.
Opened Runtime5 min Written byDocumentaryTube Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use FFmpeg’s tee muxer to send the same encoded audio and video to YouTube’s primary and backup ingest addresses at once. Get both addresses—and the stream name/key—from the specific YouTube stream, map the intended streams explicitly, and test the event in Live Control Room. Sending to both addresses is concurrent redundant delivery; it does not by itself guarantee seamless failover for viewers.

Get YouTube’s primary and backup addresses

YouTube provides ingest details for each live stream. Its LiveStreams resource identifies the primary and backup addresses separately, along with the stream name. For RTMPS, use the RTMPS-specific fields; do not assume that changing an RTMP URL’s scheme produces a valid RTMPS endpoint. YouTube LiveStreams API documentation

  1. Open the stream’s encoder or ingestion details in YouTube, or retrieve its cdn.ingestionInfo fields through the API.

  2. Copy the primary address and backup address for the protocol you intend to use. For RTMP, use ingestionAddress and backupIngestionAddress; for RTMPS, use rtmpsIngestionAddress and rtmpsBackupIngestionAddress.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    #1 Best Overall
    ZowieBox, 4K HDMI NDI Video Encoder/Decoder, HDMI NDI
    • Compact but Powerful Design: ZowieBox is smaller than a phone, featuring a tally light and LCD screen for streaming status. Capture console gameplay in up to 4K with zero-lag HDMI passthrough, while the built-in video encoder converts video for IP streaming. The IP stream can also be decoded back to a 4K HDMI signal.
    • Standalone Game Streaming: Just plug and play—ZowieBox enables PC-free live gaming without affecting gameplay. As an RTMP hardware encoder and HDMI streamer, it delivers stable streaming directly from your source, making it ideal for gaming, live events, and professional broadcasting.
    • NDI|HX3 Converter Technology: ZowieBox converts HDMI signals to NDI|HX3/HX2/HX, functioning as an NDI video encoder, or NDI Video Decoder for flexible IP workflows. Certified NDI technology enables low-latency gameplay streaming through OBS/vMix. Note: Encoder and decoder modes cannot run simultaneously; full NDI signals are not supported.
    • UVC to HDMI Conversion: Supporting up to 4K@30fps and 1080p@60fps decoding, ZowieBox enables flexible conversion for webcam and video workflows. As a video decoder and HDMI to IP converter, it expands connectivity options for professional video devices. Note: USB capture card functionality is not currently supported.
    • All-around Configuration Options: Control ZowieBox through its web UI on a PC, phone, or tablet. Manage connected PTZ cameras, tally light, video/audio, OSD, work mode, streams, network, and system settings. Support for VISCA over IP encoder workflows enables flexible PTZ control, while the dashboard provides video preview and system status.
  3. Copy the matching streamName as well. Depending on how the encoder accepts credentials, YouTube’s URL and stream name may need to be entered separately or combined as STREAM_URL/STREAM_NAME. Use the values supplied for your stream rather than a generic example.

Treat the stream name/key like a password: do not share it in a public command, screenshot, tutorial, or log. YouTube live stream settings

Send both destinations with FFmpeg’s tee muxer

The tee muxer encodes the input once and distributes the resulting output to multiple destinations. Because tee does not choose streams automatically, specify the audio and video maps. Its destinations also need an output format, such as FLV for RTMP. FFmpeg tee muxer documentation

ffmpeg -re -i INPUT 
  -map 0:v -map 0:a 
  -c:v libx264 -c:a aac 
  -f tee 
  '[f=flv]PRIMARY_URL|[f=flv]BACKUP_URL'

Replace INPUT, PRIMARY_URL, and BACKUP_URL with your input and the complete YouTube destinations, including the stream name/key wherever the selected interface requires it. This is a schematic example, not a live-channel-tested command. Confirm that your FFmpeg build includes the selected encoders and muxer, and check shell quoting and special characters in the URLs for your operating system and FFmpeg version.

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

The tee muxer separates outputs with |; per-destination options appear in square brackets. If your stream has no audio, remove -map 0:a and the audio encoder option. If it has multiple audio or video streams, select the intended stream indices rather than blindly mapping all streams.

Choose what happens when one destination fails

By default, tee uses onfail=abort: failure of one output can stop the process. You can set onfail=ignore on an output so its failure is ignored while another output continues. That changes FFmpeg’s process behavior; it does not make YouTube switch viewers seamlessly to the other ingest.

FFmpeg also documents FIFO processing for isolating outputs with different latency or reliability and for supporting recovery. These options add operational complexity; use them only after reviewing the installed FFmpeg version’s tee/FIFO options and testing your configuration. FFmpeg FIFO muxer documentation

Choose RTMP or RTMPS deliberately

Use the address pair that matches the chosen protocol. YouTube describes RTMPS as RTMP carried through an SSL connection and recommends it for ordinary user content. Its requirements include a valid RTMPS endpoint and path, port 443, and the server hostname in the TLS SNI handshake. Your FFmpeg build and network path must support that TLS connection. YouTube RTMPS ingestion guide

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

Do not turn an RTMP destination into RTMPS merely by replacing rtmp with rtmps. Copy YouTube’s RTMPS primary and backup addresses for the stream, preserving their hostnames and paths. This is particularly important where TLS SNI is required.

Set encoder parameters and protect the key

YouTube’s general RTMP/RTMPS encoder guidance lists H.264 video, AAC or MP3 audio, constant bitrate, and a recommended two-second keyframe interval that should not exceed four seconds. Choose resolution and bitrate for the source material and available upload bandwidth; no single bitrate fits every feed. YouTube encoder settings

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

Test both ingests before relying on them

  1. Start the FFmpeg command and check that it remains running without output-specific errors.

  2. Open the event preview in YouTube Live Control Room and verify that the expected audio and video arrive.

  3. Test the backup behavior under controlled conditions before depending on it. YouTube advises testing backup encoder failover by stopping the primary encoder; for a dual-destination FFmpeg setup, perform an equivalent end-to-end test and verify what viewers actually see.

    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.
    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.
  4. Repeat after changing the URLs, stream key, FFmpeg build, network, or relevant encoding configuration.

YouTube’s guidance recommends previewing and testing the setup rather than assuming it behaves as intended. The fact that the backup address can receive the same content simultaneously as the primary does not establish a guarantee of automatic, seamless viewer-side failover. YouTube streaming tips

Troubleshooting common failures

Symptom Likely area to check Next step
FFmpeg reports that it cannot open an output Address, stream name/key, protocol, or URL quoting Re-copy the correct primary and backup addresses for the selected protocol, confirm how the stream name is supplied, and check shell escaping for URL characters.
One destination fails and FFmpeg exits Tee’s default failure policy Review whether the default onfail=abort is appropriate. Consider onfail=ignore only if continuing on the other output is intended, then test the result.
RTMPS connection fails TLS support, port, endpoint, path, or SNI hostname Use YouTube’s RTMPS-specific address, verify port 443 connectivity and hostname/SNI handling, and confirm the FFmpeg build supports the required TLS connection.
Video arrives but audio does not Input stream mapping or audio encoder Check that the input contains audio, that -map 0:a selects it, and that the build supports the selected audio encoder.
Preview does not match the intended feed Wrong input, stream selection, or event destination Inspect the input and maps, verify both destination URLs belong to the intended YouTube stream, and check the Live Control Room preview.
Backup receives data but viewers do not switch as expected Ingest redundancy is not proof of viewer failover Test the event’s actual failover behavior with a controlled primary interruption; do not infer seamless viewer switching from successful dual delivery alone.

Or let it run in the cloud

If your goal is to keep a prerecorded YouTube stream live continuously rather than configure and maintain FFmpeg outputs yourself, StreamNeo runs uploaded videos or playlists from the cloud. Upload the recording, add your YouTube stream key, and go live. Nothing has to stay on at home; it streams the upload as made, up to 4K 60fps, at one price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly: $9.99 per month. Start a free StreamNeo trial.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

More from the Screening Room

  1. How to Migrate a 24/7 YouTube Stream to a New VPSAdmit one · BlogHow to Migrate a 24/7 YouTube Stream to a New VPSOpened04 OCT 2026Runtime6 min
  2. How to Run a YouTube Playlist on a Headless Linux Server—and Broadcast It LiveAdmit one · BlogHow to Run a YouTube Playlist on a Headless Linux Server-and Broadcast It LiveOpened04 OCT 2026Runtime6 min
  3. How to Make a 24/7 Indian Music YouTube Stream Restart After a Server RebootAdmit one · BlogHow to Make a 24/7 Indian Music YouTube Stream Restart After a Server RebootOpened04 OCT 2026Runtime6 min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.