Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober 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 Now×
Skip to content
VGSources
audio-video sync

How to Fix FFmpeg Audio and Video Going Out of Sync on a Hetzner YouTube Stream

Measure whether sync is offset, drifting, or breaking only in YouTube playback before changing FFmpeg. Then match the correction to timestamps, clocks, frame cadence, or delivery evidence.

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

First find out whether the audio/video error is a steady offset, growing drift, a sudden jump, or a problem that appears only in YouTube playback. Those symptoms point to different causes. Measure sync near the start and again later, compare the FFmpeg output with YouTube’s preview, and then change one relevant setting at a time. A Hetzner host alone does not identify the cause.

Before changing FFmpeg, measure the problem

Record the details you will need

Save the exact FFmpeg command, but redact the YouTube stream key and any other secrets before sharing it. Also record ffmpeg -version, the relevant startup and runtime log lines, the input types, and whether audio and video come from one file or separate live sources. Record the input streams’ start times, time bases, frame rates, and audio sample rates where available; ffprobe can help inspect media streams and timestamps.

Choose a clear event visible and audible in the stream, such as a clap, and measure the audio-to-picture difference near the beginning and later. Note which leads and by how much. Do not apply a guessed delay: an arbitrary correction can make sync worse or conceal a changing clock problem.

Check where the error first appears

Compare a local capture of the FFmpeg output with YouTube’s Live Control Room preview and, if possible, the resulting playback. If the local output is already out of sync, focus on the inputs, their timestamps, and FFmpeg’s handling. If the local output is synchronized but YouTube playback is not, check YouTube stream health and delivery conditions before rewriting timestamp filters. YouTube recommends testing in advance and monitoring stream health.

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.

Classify the symptom before choosing a fix

What you observe What to investigate First response
About the same offset at the beginning and later A fixed timestamp offset between the audio and video inputs Measure the offset and shift the affected input’s timestamps
The offset grows over time Whether the sources share a clock and whether audio samples progress in step with their timestamps Inspect timestamps and test audio compensation only if the evidence points to sample/timestamp divergence
A sudden jump or discontinuity Input interruptions, timestamp discontinuities, and the logs around the jump Find which input changed; avoid masking the event with a broad reset
Uneven motion or irregular frame cadence Source frame rate and FFmpeg output synchronization mode Choose a frame-sync policy for the actual source and output needs
Local output is in sync; YouTube playback is not Ingest, stream health, and playback conditions Check Live Control Room messages and delivery before changing timestamp correction

Fix a measured, steady audio/video offset

When the measured difference stays nearly constant, FFmpeg’s -itsoffset can shift an input’s timestamps. A positive offset delays that input. Put the option before the -i for the input being shifted, and use the measured difference—not a trial value chosen without evidence. Confirm which stream leads first: delaying the leading input may correct the relationship, while shifting the other input in the wrong direction increases the error.

After changing the offset, repeat the same beginning-and-later sync check. If the difference now grows, or if the local result is still wrong, revisit the diagnosis rather than stacking more offsets. FFmpeg’s command-line documentation describes input timestamp synchronization and -itsoffset; behavior can depend on the locally installed FFmpeg build.

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.

Investigate drift that accumulates over time

Check whether the sources share a clock

FFmpeg notes that expected synchronization between two inputs relies on their timestamps being derived from the same clock source. A file containing both audio and video is different from independently captured live audio and video: with separate sources, the relationship between their clocks matters. Check how each source timestamps media and whether those timestamps track real capture time. A clock mismatch can make a correction that looks right at startup increasingly wrong later.

Consider audio resampling only when timestamps support it

The FFmpeg aresample filter can compensate for audio that does not follow its timestamps by stretching or squeezing audio, or by adding or cutting samples. This is a measured correction, not a universal lip-sync switch. Confirm that audio sample progression diverges from timestamps, then test compensation in a controlled run and listen for audio artifacts. Avoid aggressive or unexplained compensation: altering samples can degrade audio and will not repair an unrelated video-clock or delivery problem.

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

Check frame synchronization without treating it as an audio fix

FFmpeg’s output frame-sync modes make different trade-offs. Passthrough preserves demuxer timestamps. Constant frame rate (CFR) duplicates or drops frames to meet a requested rate. Variable frame rate (VFR) passes timestamps or drops frames with duplicate timestamps. If cadence is irregular, inspect the source frame rate and the configured fps_mode or related sync policy. Forcing CFR can alter motion by duplicating or dropping frames; it is not a blanket fix for audio delay.

Use the behavior that suits the source and destination rather than selecting a mode simply because sync is wrong. FFmpeg’s all-options documentation describes the available frame-synchronization behavior; check the documentation matching your installed build.

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

Separate timestamp sync from YouTube delivery problems

Check YouTube’s encoder guidance

YouTube’s current encoder guidance recommends RTMP or RTMPS ingestion, up to 60 fps, a two-second keyframe interval (not over four seconds), AAC or MP3 audio, and constant bitrate (CBR). Its recommended video bitrates depend on resolution, frame rate, and codec; for H.264, examples include 10 Mbps for 1080p30 and 17 Mbps for 1080p60, while the listed recommendation for both 720p30 and 720p60 is 8 Mbps. These are platform recommendations, not universal requirements, and YouTube may update the table. Check its live encoder settings for the resolution, frame rate, and codec you use.

Test with representative movement and audio, then monitor Live Control Room status and messages. YouTube’s encoder guidance says: “Make sure to test before you start your live stream. Tests should include audio and movement in the video similar to what you’ll be doing in the stream.”

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.

Check available outbound bandwidth

Add the bitrate of the primary and any backup stream, then compare the total with measured outbound capacity. YouTube recommends leaving 20% bandwidth headroom beyond the total stream bitrate. Check the capacity and observed throughput available to your specific Hetzner server and region; a provider name by itself does not establish the bandwidth available to your instance. Bandwidth problems can disrupt delivery, but a bandwidth check alone does not prove the cause of a timestamp offset.

Use RTMPS for transport security, not sync correction

YouTube provides RTMPS setup instructions in Live Control Room. RTMPS changes the encrypted ingestion connection; it does not correct audio/video timestamps. Treat connection setup and synchronization as separate checks.

Run controlled tests and recover safely

  1. Keep a copy of the known command and logs, with stream keys redacted from anything shared.
  2. Use a short private or unlisted test where appropriate, with a clear event such as a clap that appears in both picture and sound.
  3. Compare sync near the start and later, and compare local output with YouTube’s preview.
  4. Change one relevant offset, filter, or frame-sync setting per test. Record what changed and the measured result.
  5. Keep FFmpeg logs and YouTube stream-health messages from the same test. If the symptom changes from a fixed offset to growing drift, stop layering corrections and inspect clocks and timestamps again.

Common failures and what to do next

  • The correction makes sync worse: verify which stream leads and the direction of the measured offset. A positive -itsoffset delays the input it applies to; check that it is placed before the correct input’s -i.
  • Sync is right at startup but wrong later: treat this as drift, not a fixed offset. Check the sources’ clock relationship and audio sample progression against timestamps before testing aresample compensation.
  • Audio sounds degraded after compensation: the filter may be stretching, squeezing, adding, or cutting samples too aggressively or for the wrong cause. Return to the saved command and test with measured evidence.
  • Video motion looks uneven after a sync change: review whether CFR is duplicating or dropping frames, or whether the source timestamps should be passed through. Do not force a frame rate merely to hide audio drift.
  • Only YouTube shows the problem: compare local output, Live Control Room preview, stream-health messages, and playback before altering FFmpeg’s timestamps.
  • The stream drops or delivery is unstable: review YouTube status messages, measured outbound throughput, and bitrate headroom. Do not assume that this explains a steady sync offset.
  • A shared command or log exposes the stream key: remove the secret from the shared material. Never include a live stream key when asking for help.

Or let it run in the cloud

If your YouTube channel runs prerecorded videos on a loop, StreamNeo is an alternative to keeping an FFmpeg process and computer running at home. Upload a recording or build a playlist, add your YouTube stream key once, and go live; StreamNeo loops uploaded video from the cloud. It streams to YouTube, not from a camera, so it is not a replacement for a live camera or independently captured event.

  • Nothing has to stay powered on at home; the cloud stream can continue with your computer off.
  • Each slot uses one flat price for any uploaded quality up to 4K 60fps, with no re-encode or quality tiers.
  • StreamNeo automatically recovers if YouTube drops the stream.
  • The first day is free, with no card required.
  • Monthly pricing: $9.99 per month.

See StreamNeo or 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.

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.

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 Patch Notes

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair 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.