Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
Mountain View desk7 min

How to Fix Audio Going Out of Sync in an FFmpeg YouTube Loop Stream

A fixed delay, growing drift, and a sync jump at each loop have different causes. Measure the error first, then troubleshoot timestamps, loop boundaries, and output timing.

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.

First, check whether the audio-video gap stays about the same, grows as the stream runs, or changes suddenly at each loop. A steady offset, gradual drift, and a loop-boundary jump point to different causes. Note the mismatch near the start and again after several minutes or several repetitions before changing the command; without the command, input timestamps, loop method, and FFmpeg build, there is no one reliable fix.

Identify what kind of sync problem you have

Use a clear cue—a clap, a spoken syllable with a visible mouth movement, or a flash paired with a sound—and compare it near the beginning and later in the stream. Record whether audio leads or lags video, and whether the gap stays steady, grows, shrinks, or resets.

As an Amazon Associate I earn from qualifying purchases.

What you observe What it suggests Where to investigate
The gap is roughly the same throughout. A fixed timestamp or start-time offset is plausible. Input start times and, if appropriate, a small timestamp shift.
The gap steadily grows or shrinks. A fixed delay is unlikely to solve the underlying problem; timing, duration, or rate may differ. Packet timestamps, actual stream durations and rates, and output frame-rate handling.
Sync changes abruptly at a repeat. The loop may be repeating audio and video on different boundaries or timelines. How the input or filter loops, and whether both streams repeat together.

A 2020 FFmpeg-user mailing-list discussion included a question about avoiding out-of-sync outputs or setting a video delay. That report involved a YouTube Live input split into separate video and audio outputs, not an FFmpeg file-loop stream, so it is an example of the problem description—not proof of a particular cause for your setup. Read the mailing-list exchange.

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

Inspect the media and the command before changing timing

Check stream starts, durations, and timestamps

Use FFmpeg’s probing tools to inspect the source and, if possible, a short output from the loop. For a first look at stream properties, run:

#1 Best Overall
Focusrite Scarlett Solo 3rd Gen USB-C Audio Interface | 1 XLR Mic Preamp, 1 Hi-Z Instrument Input, 24-Bit/192kHz, 56dB Gain Range, Air Mode, macOS/Windows/iPadOS Compatible
  • Pro performance with great pre-amps - Achieve a brighter recording thanks to the high performing mic pre-amps of the Scarlett 3rd Gen. A switchable Air mode will add extra clarity to your acoustic instruments when recording with your Solo 3rd Gen
  • Get the perfect guitar and vocal take with - With two high-headroom instrument inputs to plug in your guitar or bass so that they shine through. Capture your voice and instruments without any unwanted clipping or distortion thanks to our Gain Halos
  • Studio quality recording for your music & podcasts - Achieve pro sounding recordings with Scarlett 3rd Gen’s high-performance converters enabling you to record and mix at up to 24-bit/192kHz. Your recordings will retain all of their sonic qualities
  • Low-noise for crystal clear listening - 2 low-noise balanced outputs provide clean audio playback with 3rd Gen. Hear all the nuances of your tracks or music from Spotify, Apple & Amazon Music. Plug-in headphones for private listening in high-fidelity
  • Everything in the box: Includes Pro Tools Intro+, Ableton Live Lite, Cubase LE, and Hitmaker Expansion: a suite of essential effects, powerful software instruments, and easy-to-use mastering tools
ffprobe -show_streams input.mp4

To inspect packet timestamps, run:

ffprobe -show_packets input.mp4

Replace input.mp4 with the relevant file. Compare audio and video start times, durations, packet timestamps, and sample or frame rates. Packet output can be extensive; inspect the beginning and the area around a suspected loop boundary. This is a diagnostic workflow, not a substitute for knowing what your particular command does.

Find out what “loop” means in your command

A loop can mean different things in FFmpeg. The video loop filter repeats video frames; looping an input repeats a media input that may contain both audio and video. Concatenating files or feeding audio and video from separate inputs creates other timing relationships. Check which method your command uses, and compare both streams across every repeat. If only video frames repeat while audio continues on a different timeline—or if audio and video have different effective repeat durations—a discontinuity can appear at each boundary. FFmpeg documents the video filter in its filter reference.

Rank #2
Focusrite Scarlett Solo 4th Gen USB-C Audio Interface | 1 XLR Mic Preamp, 1 Hi-Z Instrument Input, 24-Bit/192kHz, 120dB Dynamic Range, Air Modes, PC/Mac/iPad Compatible
  • The new generation of the songwriter's interface: Plug in your mic and guitar and let Scarlett Solo 4th Gen bring big studio sound to wherever you make music
  • Studio-quality sound: With a huge 120dB dynamic range, the newest generation of Scarlett uses the same converters as Focusrite’s flagship interfaces, found in the world's biggest studios
  • Find your signature sound: Scarlett 4th Gen's improved Air mode lifts vocals and guitars to the front of the mix, adding musical presence and rich harmonic drive to your recordings
  • All you need to record, mix and master your music: Includes industry-leading recording software and a full collection of record-making plugins
  • Everything in the box: Includes Pro Tools Intro+, Ableton Live Lite, Cubase LE, and Hitmaker Expansion: a suite of essential effects, powerful software instruments, and easy-to-use mastering tools

Separate a source-timestamp issue from output frame-rate conversion

Input timestamps describe when media packets belong on the timeline; output frame-rate settings can change video frame timing. FFmpeg documents output -r as a way to achieve a constant output frame rate by duplicating or dropping frames, and -fps_mode controls per-stream frame-rate and synchronization behavior. Review these only if your command uses them or the output frame timing is suspect. Their effects are not a general fix for mismatched audio timestamps. Check the documentation for the installed FFmpeg version rather than copying an old command example blindly.

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

Choose a remedy that matches the observed pattern

If the offset is stable, test a small input timestamp shift

FFmpeg’s -itsoffset shifts timestamps for the corresponding input. A positive value delays that input’s streams. Input options apply to the following input, so placement in a multi-input command matters. The sign that helps depends on which stream is early or late and how the inputs are arranged: test a small change on a short local output and measure it rather than guessing.

Rank #3
SABRENT USB External Stereo Sound Card Adapter, Plug & Play (AU-MMSA) | USB audio adapter; no drivers needed; for Windows & Mac; 3.5mm headphone & mic jacks; usb to 3.5mm jack audio adapter
  • PLUG IN AND HEAR SOUND IN SECONDS - USB Type-A connector with a 3.5mm stereo headphone output and a separate 3.5mm mono microphone input. No drivers, no software, no external power - the adapter is USB bus-powered and is recognized as a standard USB audio device.
  • WORKS ON WINDOWS, MAC AND LINUX - Driverless on Windows 98SE/ME/2000/XP/Server 2003/Vista/7/8, Linux and Mac OSX, and compliant with the USB Audio Device Class 1.0 specification, so any system that supports class-compliant USB audio will see it. Select it as the sound output and input device after plugging it in.
  • TWO JACKS, TWO JOBS - The green jack is stereo OUT for headphones or powered speakers; the pink jack is mono microphone IN for a 3.5mm mic. It does NOT support 4-pole headsets on a single combo plug, it does NOT power passive speakers, and it does NOT add surround sound - it is a stereo 2-channel adapter.
  • FOR LAPTOPS AND DESKTOPS THAT NEED AN AUDIO PORT BACK - Adds a headphone and mic port to a laptop, desktop, or mini PC whose onboard jack has failed or was never there. Managed and work-issued computers can block new USB audio devices by policy - check with your IT department before ordering for a company machine.
  • SABRENT SUPPORT AND WARRANTY - What is in the box: one USB audio sound adapter. Backed by a 1-year limited warranty, extended to 2 years when you register within 90 days on the manufacturer's website.
ffmpeg -itsoffset 0.10 -i input.mp4 ...

This is only an illustrative placement. It is not a complete loop-stream command, and the example value is not a recommended correction. Apply the shift to the input whose timing needs adjustment, then verify the result at the beginning and later in the output. A fixed offset can move a steady mismatch; it cannot by itself correct drift that continues to grow.

If the mismatch grows, investigate rate and duration

Compare audio and video packet timestamps and actual durations first. Check whether the source has irregular or unsuitable timestamps, whether audio and video span different durations, and whether the loop repeats them at matching points. A constant timestamp shift does not correct a clock-rate mismatch or a repeated-duration mismatch. Retiming or normalizing may be needed if the media itself has a rate or timestamp defect, but the appropriate filter depends on what measurement shows; do not add one speculatively.

Rank #4
M-AUDIO M-Track Duo USB Audio Interface | Dual XLR, Line and DI Inputs, Professional Software Suite for Recording, Streaming, and Podcasting
  • Podcast, Record, Live Stream, This Portable Audio Interface Covers it All - USB sound card for Mac or PC delivers 48kHz audio resolution for pristine recording every time
  • Be ready for anything with this versatile M-AUDIO interface - Record guitar, vocals or line input signals with two combo XLR / Line / Instrument Inputs with phantom power
  • Everything you Demand from an Audio Interface for Fuss-Free Monitoring - 1/4" headphone output and stereo 1/4" outputs for total monitoring flexibility; USB/Direct switch for zero latency monitoring
  • Get the best out of your Microphones - M-Track Duo’s transparent Crystal Preamps guarantee optimal sound from all your microphones including condenser mics
  • The MPC Production Experience - Includes MPC Beats Software complete with the essential production tools from Akai Professional

If the error jumps at each repeat, align the loop boundaries

Inspect the last audio and video samples or frames before the repeat and the first ones afterward. Confirm that the command repeats the intended material, that both streams use a coherent timeline, and that neither stream has extra or missing duration at the boundary. A frame-loop filter and a whole-input loop are not interchangeable approaches. Fix the repeat structure that measurement identifies instead of masking each jump with an arbitrary delay.

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

If audio and video come from separate inputs, consider whether start-time alignment is valid

FFmpeg’s -isync adjusts for differences in input start times; it is not a general repair for audio and video in one file. The FFmpeg documentation says, “The source timestamps of the two inputs should derive from the same clock source for expected results.” It also cautions that no adjustment is made if either input lacks a start time. Use it only when you have separate inputs with usable start timestamps based on the same clock source, and consult the official option documentation for the installed build.

Best Value
Focusrite Scarlett 2i2 4th Gen USB-C Audio Interface | 2 Mic Preamps, 2 Hi-Z Instrument Inputs, 24-Bit/192kHz, 120dB Dynamic Range, Auto Gain, Clip Safe, Air Modes
  • The new generation of the artist's interface: Connect your mic to Scarlett's 4th Gen mic pres. Plug in your guitar. Fire up the included software. Start making your first big hit
  • Studio-quality sound: With a huge 120dB dynamic range, the newest generation of Scarlett uses the same converters as Focusrite’s flagship interfaces, found in the world's biggest studios
  • Never lose a great take: Scarlett 4th Gen's Auto Gain sets the perfect level for your mic or guitar, and Clip Safe prevents clipping, so you can focus on the music
  • Find your signature sound: Air mode lifts vocals and guitars to the front of the mix, adding musical presence and rich harmonic drive to your recordings
  • With Scarlett 4th Gen, you have all you need to record, mix and master your music: Includes industry-leading recording software and a full collection of record-making plugins
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Validate locally, then check YouTube ingest

  1. Make a short local test. Run the same loop and output settings for long enough to cover multiple repetitions. Use a visible and audible sync cue, and compare the beginning, later points, and each boundary.
  2. Change one relevant setting at a time. If you adjust an input timestamp, loop method, or frame-rate option, generate another short output and measure it. This helps distinguish an effective correction from a change that merely moves the error.
  3. Test privately or unlisted on YouTube. YouTube recommends testing with representative sound and movement and monitoring stream health. Check the encoder output and YouTube’s incoming stream separately; a problem already present in the local output is not caused by YouTube ingest.
  4. Check ingest settings without treating them as a sync diagnosis. YouTube’s encoder guidance recommends a two-second keyframe interval and says not to exceed four seconds. It recommends 44.1 kHz for stereo audio or 48 kHz for 5.1. These are platform ingest recommendations, not remedies for a timestamp bug.

Do not confuse stream latency with audio-video sync. YouTube defines latency as the time between capture at the encoder or camera and presentation to viewers. A stream may have substantial end-to-end latency and remain internally synchronized; it may also be out of sync at any latency setting. See YouTube’s latency guidance and live encoder settings and bitrates.

Troubleshoot by symptom

Symptom Likely area to check Next step
Audio is early or late by a similar amount throughout. Input start-time offset. Test a small -itsoffset on the appropriate input and verify the sign in a short output.
The gap increases as playback continues. Timestamp, duration, or rate mismatch. Inspect packet timestamps and actual stream durations; do not rely on a fixed delay.
The gap changes at each loop. Different repeat behavior or boundaries for audio and video. Identify whether the command loops the input, repeats video frames, concatenates files, or uses separate inputs; inspect each boundary.
Separate live inputs do not start together. Input start times or incompatible clock bases. Use -isync only if both inputs have usable start times derived from the same clock source.
Local output looks synchronized but YouTube playback does not. Encoder output versus platform ingest or playback conditions. Review the YouTube stream health and encoder settings, then compare with a representative private or unlisted test.

Or let it run in the cloud

If your goal is a continuous YouTube loop rather than maintaining an FFmpeg setup, StreamNeo runs uploaded videos or playlists from the cloud. The basic flow is upload, add your YouTube stream key, and go live.

  • Nothing has to stay on at home; your computer and home connection can be off.
  • Each slot streams your upload as made, up to 4K 60fps, at one price per slot rather than quality tiers.
  • StreamNeo automatically recovers if YouTube drops the stream.
  • The first day is free with no card required.
  • Monthly: $9.99 per month.

Start your free StreamNeo day.

Frequently Asked Questions

Does YouTube stream latency cause audio to drift out of sync?

Not necessarily. Latency is the delay from capture to viewer presentation; internal audio-video sync is a separate issue.

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

Can I use -isync to fix audio and video in one input file?

No. It is for aligning separate inputs with usable start times from the same clock source, not a general single-file repair.

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.

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 the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver 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.