The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →If YouTube says your RTMP publish was rejected with error code 2, first refresh the stream key and update your encoder, then verify the active stream URL and protocol in YouTube Live Control Room. The exact phrase “publish rejected with error code 2” is not defined in the public YouTube help pages cited below, so the code alone does not establish whether the problem is credentials, connection, or stream format. Use the encoder log and Live Control Room message to choose the right fix.
What does YouTube RTMP publish error code 2 mean?
YouTube’s public help pages do not assign a documented meaning to the exact message “publish rejected with error code 2.” Do not assume it always means a bad stream key, blocked port, or codec mismatch. The wording may come from the encoder or another part of the connection path rather than a YouTube-defined error code.
Start by distinguishing three situations: the encoder cannot connect to YouTube’s ingest endpoint; it connects but YouTube rejects the publishing attempt; or the stream reaches YouTube but Live Control Room reports an ingest or stream-health problem. The exact log line and dashboard message determine which branch to follow. YouTube’s guide for encoder startup errors recommends getting a new stream key in Live Control Room and updating the encoder. YouTube Help: Troubleshoot your YouTube live stream.
Troubleshoot the rejection in order
1. Capture the full error and its context
Before changing settings, record the complete error text, the encoder or app and its version, and whether it reports a connection failure or a publish rejection. Check the matching message in Live Control Room as well. Keep stream keys private: redact them from screenshots, logs, and support requests you share publicly.
#1 Best Overall
- 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box. Note: Video input supports 4K30/60Hz and 1080p120/144Hz. Does not support 4K120Hz/144Hz. Output supports up to 2K30Hz.
- 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
- 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
- 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
- 【Support Mic-in for Commentary】Rybozen capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.
2. Refresh the stream key
- Open YouTube Studio and enter the Live Control Room for the stream you are setting up.
- Open the Stream setup and copy the stream key for that stream.
- Replace the key in your third-party encoder, then try starting the stream again.
This is YouTube’s recommended first fix for an error when starting a third-party encoder. Do not post the new key or include it in an unredacted log. YouTube Help’s startup troubleshooting steps.
3. Verify the ingest URL and protocol
Copy the stream URL from the active Live Control Room setup; do not rely on a URL saved from an older session or another stream. If you select RTMPS, reveal and copy the RTMPS URL and make sure your encoder supports RTMPS. YouTube suggests port 443 for certain SSL errors, but that guidance applies when the actual error points to SSL—not as a universal fix for code 2. YouTube Help: Fix live stream errors.
Rank #2
- High-Quality Video Capture, 4K HDMI Capture Card Ready: Capture smooth and vibrant video with this 4K HDMI capture card, engineered for gamers and content creators who demand crisp 1080P 60FPS video quality. Whether you're streaming to Twitch or recording gameplay for YouTube, your footage will look professional and detailed
- Plug-and-Play USB Capture Card, No Drivers Needed: Designed as a USB capture card for streaming, this device works instantly out of the box, just plug into your PC or laptop and start capturing. Fully compatible with popular software like OBS Studio, Streamlabs, and XSplit, making setup quick and stress-free for beginners and pros alike
- Universal Compatibility PS5, Xbox, Switch & More: Stream or record gameplay from virtually any HDMI-enabled device including Nintendo Switch, PS5, Xbox Series X, DSLR cameras, and PCs. The video capture card for gaming supports seamless passthrough so you can play without lag while your audience watches every frame in real time
- Low-Latency Performance for Smooth Streaming: This capture card for streaming minimizes delay between gameplay and broadcast, so you get reliable, low-latency capture that works well for competitive gaming, live broadcasts, and podcast sessions. Suitable for those building their channel with high-quality, engaging content
- Compact & Portable Design for Content Creators: Lightweight and portable, this USB 3.0 capture card works well for creators who travel or switch gaming setups often. Throw it in your bag and stream or record wherever you are, at home, events, LAN parties, streaming or studio sessions
4. Determine whether YouTube received the stream
- No connection established: Check the copied endpoint, selected protocol, network path, and encoder compatibility first. The encoder’s detailed connection log can help identify where setup fails.
- Connected, then rejected: Confirm the key and active stream setup, then use the exact rejection text in the encoder log and Live Control Room to narrow the cause.
- Stream appears, but Live Control Room reports ingest errors: Follow the dashboard’s specific message. YouTube lists format and stream-health issues involving codec, container, bitrate, video settings, and keyframe frequency; these are categories to investigate when indicated, not proof that they caused every publish rejection. YouTube Help: live encoder settings and error guidance.
5. Check encoder and outbound network health
Update the encoder, inspect its local output, and check its dashboard for errors and CPU load. If the encoder appears healthy but the stream is not reaching YouTube reliably, test the outbound internet connection. YouTube also suggests trying another encoder as a diagnostic; if the outbound connection is faulty, contact your internet service provider. YouTube Help: Troubleshoot your YouTube live stream.
Check stream settings only when the evidence points to ingest
Once connected, compare the encoder output with YouTube’s current guidance and the particular Live Control Room warning. YouTube supports RTMP and RTMPS and documents supported video and audio options. Its recommended keyframe interval is two seconds and should not exceed four seconds. These settings matter when the stream reaches ingest or the dashboard identifies a format problem; changing them is not a substitute for checking the key and endpoint when the encoder cannot publish. YouTube Help: live encoder settings and error guidance.
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 matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rank #3
- 4K60 Capture: Record in cinematic quality with crisp detail and vivid colors
- HFR Support: Play and capture in 1440p120 or 1080p240
- HDR10 Support: Capture brilliant HDR content with tone mapping on Windows
- Cross-Platform Compatible: Works with PS5, Xbox Series X/S, Switch 2, and more
- Analog Audio In: Capture in-game chat or commentary with 3.5mm input
Why an OBS “-2” log is not the same diagnosis
An OBS forum thread from 2020 described a macOS connection log ending in -2: Connection to rtmp://a.rtmp.youtube.com/live2 failed: -2. An OBS forum administrator suggested disabling bind-to-IP and network optimizations; the user later reported that, in that case, a socket-loop setting carried over from an imported Windows profile was responsible. That historical, case-specific connection failure does not define YouTube’s “publish rejected with error code 2” or prove that the two messages share a cause. OBS forum thread.
Common symptoms and next actions
| What you see | What to check next |
|---|---|
| Encoder reports a startup error before connecting | Refresh the stream key and update the encoder; verify the active stream URL and protocol. |
| Connection or SSL error | Copy the endpoint and protocol from Live Control Room. For a reported SSL error, check YouTube’s RTMPS guidance, including its port 443 suggestion for certain SSL errors. |
| Encoder connects but Live Control Room reports a stream error | Use the dashboard message to inspect the relevant codec, container, bitrate, video settings, or keyframe frequency. |
| Encoder looks healthy, but delivery is unreliable | Check encoder errors and CPU load, test outbound internet, and try another encoder as a diagnostic. Contact your ISP if the outbound connection appears faulty. |
| OBS log ends in “-2” | Treat it as an OBS connection log, not a documented decoding of YouTube’s publish-rejection code. Inspect the exact OBS configuration and log context. |
Or let it run in the cloud
If the goal is to keep uploaded videos running as a 24/7 YouTube stream, StreamNeo is a cloud option: upload a recording or build a playlist, add your YouTube stream key, and go live. Nothing has to stay on at home; it streams the uploaded video at its original quality up to 4K 60fps for one flat price per slot, and it automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly pricing is $9.99 per month. StreamNeo is for YouTube streams from uploaded videos, not camera broadcasts. Learn more at StreamNeo, or start your free first day.
Quick Recap
Best Value
- Network Source to USB UVC Output – Decodes one NDI, NDI HX2/HX3, H.264 or H.265 stream over Ethernet and outputs it via USB as a standard UVC webcam device up to 1080p60.
- Wide Protocol Compatibility – Supports NDI High Bandwidth, NDI HX2/HX3, RTSP, RTMP, SRT, HTTP, RTP, and UDP streams for flexible IP-video integration.
- USB-C 3.0 Interface – Outputs video and audio through USB as a driver-free UVC/UAC device on Windows, macOS, and Linux — works instantly with most software.
- High-Quality Video & Audio – Decodes and outputs uncompressed YUY2/NV12 at 1080p60 or MJPEG at 1080p30, with 2-channel, 16-bit 48 kHz audio for reliable conferencing or streaming.
- PTZ Control & Remote Management – Supports PTZ control via NDI or VISCA over UDP, plus a web-based configuration interface and HTTP API for remote administration.
Rank #4
- 【1080P 60FPS Smooth Capture】Record and stream crystal-clear HDMI video at full HD 1080p 60fps with low latency. Perfect for live gaming, video conferencing, and online teaching
- 【Real-Time HDMI Loop-Out】Play without delay thanks to the HDMI loop-out port, allowing you to enjoy your gameplay on an external display while capturing simultaneously
- 【Support Mic-in for Commentary】Audio capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset
- 【Easy to Use & Plug and Play】No need to install any drivers, no need to provide external power, the usb capture card is plug and play, easy to use. You can use any third-party software(OBS) to capture or stream your HD gameplay, or other HD video source
- 【Wide Compatibility】Works with Windows, macOS, and Linux. Compatible with OBS, VLC, Zoom, and more. Compatible with PS4, PS5, Xbox, Switch, DSLR cameras, and set-top boxes
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.




