When audio and video drift out of sync in an FFmpeg YouTube playlist, first find whether the mismatch is already inside a source clip, begins at a join, or grows as playback continues. The right remedy depends on that pattern: a timestamp shift can address a fixed offset, while incompatible streams or unreliable segment timing call for a different concat workflow.
Do not treat the concat demuxer as a general sync repair. It joins files under particular stream and duration assumptions; if those assumptions do not hold, inspect and normalise the inputs before rebuilding the playlist.
Determine when the sync problem begins
Make a short diagnostic pass through the playlist before changing the command. Listen and watch near the beginning, near the end, and on both sides of every join that seems suspect. If the playlist is long, note the time of each visible or audible mismatch. The point is to establish the shape of the problem rather than guess at a filter.
Three patterns are useful:
| What you observe | Likely area to inspect first | What it suggests |
|---|---|---|
| The same audio lead or lag is present from the start of one source clip | That clip's own tracks and timestamps | A fixed offset may exist within the source; rebuilding the playlist alone will not remove it |
| Each clip plays in sync, but the mismatch appears just after a join | The concat list, stream layout, and reported segment duration | The join may be placed using unsuitable timing or incompatible inputs |
| Sync is initially acceptable, then the gap grows during playback | Track durations, frame rate, timestamps, and segment boundaries | A single global shift is unlikely to correct a changing timing relationship |
This is a diagnostic framework based on FFmpeg's documented timing behaviour, not a claim that any particular file has been tested. A playlist can have more than one fault. For example, one source may begin with a fixed offset while a later join adds a second discontinuity. Record each observation separately so that correcting one does not hide another.
A practical test is to inspect a short section that contains a clear event: a spoken syllable, a drum hit, a bell strike or a door closing. Compare the event with the corresponding picture near the beginning and later in the same clip. Then repeat the check across a join. In devotional or music playlists, choose a transient such as a percussion hit; for a talk or local news loop, use a word with a visible mouth movement.
If you cannot identify a reliable cue, use a short sample from the beginning, middle and end of the affected material and note whether the gap is stable. Avoid making a series of speculative offset changes across the entire playlist. A shift can make one section look better while worsening another if the underlying error accumulates.
Check each source clip on its own
Before combining files, play each source separately and check its picture and sound at multiple points. A clip that is already out of sync needs attention before concatenation. Otherwise, the output can faithfully preserve or make harder to diagnose an existing source defect.
Also check the first and last moments of each file. A clip can appear acceptable in its middle but have a delayed audio start, trailing audio, a truncated video stream, or a small timing discontinuity at an edge. Those details matter in a playlist because the edge is where the next file is expected to follow.
Keep a simple inventory: filename, video and audio presence, duration as reported by your inspection tool, frame rate, and any observed offset. FFprobe is commonly used alongside FFmpeg for reading media metadata; consult the FFmpeg documentation for the options and version-specific details relevant to your installation. Metadata is evidence to investigate, not proof that the tracks are actually in sync.
Do not assume that files exported from the same editor have identical timing characteristics. One may have a different frame rate, audio sample rate, stream layout, or a variable-frame-rate video track. A mix of sources downloaded from different places may also include different start timestamps. The symptom can therefore be specific to one clip or one transition rather than a defect in every item.
If one file is at fault, make a corrected copy and verify that copy on its own before rebuilding the playlist. Keep the original as a fallback. When an offset is constant from start to finish, you can investigate an input timestamp shift; when it changes over time, inspect the relative timing and duration of the tracks instead. An offset option is not a substitute for correcting an uneven or damaged source.
Inspect stream compatibility and file durations
The concat demuxer is intended for files whose streams match. FFmpeg's documentation says that files need the same streams, codecs and time bases. In practical terms, compare which audio and video streams each file has, the order and properties of those streams, and whether the relevant timing bases are compatible. A playlist entry with no audio is not equivalent to one with an AAC audio stream simply because both files play normally on their own.
The demuxer also relies on file duration to place the next segment. If the duration reported for a file is inaccurate, the following segment can be assigned timestamps that do not match the content's real end. FFmpeg notes that duration estimates can be affected by bitrate or truncated files, and supports a duration directive in the concat list when you know the correct value. Do not enter a guessed duration to make a join look tidy; establish the actual timing first.
Inspect duration at both the container and track level where your tools expose it. Audio and video can have different end points, even when the overall file duration looks plausible. YouTube's upload troubleshooting advises that audio and video track durations should match when addressing a sync issue. That is a useful delivery check, though it does not by itself diagnose how a particular concat output became misaligned.
A concise inventory helps decide whether stream-copying is reasonable:
| Check | Demuxer-friendly sign | Warning sign |
|---|---|---|
| Stream layout | Each file has the same required streams | A file lacks audio or has an extra or differently arranged stream |
| Codec and time base | Relevant streams use matching properties | Codec, time base or other stream properties differ |
| Duration | Segment durations reflect actual usable content | Metadata is inaccurate, or tracks end at materially different times |
| Sync pattern | No source defect and joins remain aligned | Offset starts in a clip or grows through the assembled output |
This table is a decision aid, not a certification checklist. If the inputs do not meet the demuxer's requirements, either make the inputs compatible first or use the concat filter and re-encode consistently. For a playlist built from many existing uploads, keeping a record of how old videos are prepared for a live loop can also help distinguish a bad source from a changed export process.
Understand what the concat demuxer can and cannot do
The concat demuxer reads a list of files and adjusts timestamps so that each file follows the previous one. This can be useful when you want to avoid re-encoding and the files are suitable for stream-copy concatenation. It does not repair an offset inside a source, make different stream layouts compatible automatically, or guarantee that a file's reported duration matches the point where its content really ends.
Use it only after checking the files. If the stream properties match and durations are known to be sound, a demuxer workflow may be appropriate. If the join causes a discontinuity, revisit the duration used for that entry and the point at which its audio and video actually end. If stream properties vary, a direct copy workflow is not a reliable normalisation strategy.
A common mistake is to use a fixed timestamp shift as though it were a general concat correction. FFmpeg's -itsoffset adds an offset to an input's timestamps, so it can be relevant when evidence points to a fixed start-time difference. It will not fix a gap that grows over time, unequal track durations, or incorrect relative timing inside a source clip. Similarly, -isync uses the difference between input start times and is meant for inputs derived from the same clock source. Check the FFmpeg input options for precise semantics and supported syntax in your FFmpeg build.
Avoid copying a command from an unrelated playlist and changing only filenames. The option order and stream selection matter, and the correct choice depends on the files. The FFmpeg FAQ's concat guidance distinguishes the demuxer route from the filter route: stream copying can be suitable when the sources fit the requirements; re-encoding is the route when inputs need conversion or normalisation.
If you use a concat list, keep the list and the file inventory together while troubleshooting. That makes it possible to associate a problematic join with the relevant source and duration rather than making a blind change to the whole sequence. Once you have a working output, repeat the checks around the same joins and at the end of the programme.
Use the concat filter when inputs need re-encoding
The concat filter is the more suitable path when you need to re-encode or normalise sources before joining them. It lets the workflow bring the relevant streams into a consistent format, but it does not excuse skipping diagnosis. You still need to establish which source or join is wrong and make deliberate choices about how to handle each stream.
This matters when playlist entries differ. If one clip has no audio and another does, the workflow needs a consistent audio plan, such as supplying an appropriate silent track for the clip without sound, where that is what the programme requires. A community example has discussed adding silence or using filters in such cases, but treat that as an illustration rather than a universal fix. The intended output should determine whether silence, a retained audio track, or another treatment is appropriate.
When preparing filter inputs, decide on a consistent output frame size, pixel format, frame rate policy, audio sample rate and channel layout. Do not blindly force every source to a frame rate that differs from its recording without considering the effect on motion and timing. YouTube recommends maintaining the recorded frame rate for uploads. Re-encoding provides a way to make mismatched inputs more consistent, but it can introduce generation loss and takes processing time; retain originals and inspect the result.
Use a filter workflow if the sources have different codecs or time bases, if you need to create or normalise audio streams, or if stream-copy concatenation is otherwise unsuitable. It is not necessarily preferable for a collection whose streams already match and whose durations are reliable: in that case, re-encoding adds work without addressing a demonstrated fault. For a channel that alternates between a devotional programme and an ambience loop, a stable export profile and a consistent aspect-ratio check help keep the prepared files predictable, though aspect ratio itself does not solve sync drift.
After filtering, do not judge the output only by watching its first few seconds. Recheck the sections where the original problem occurred and the late portion where accumulated drift would be most visible. If the audio and video still depart from each other, revisit the source timing and filter choices rather than adding another arbitrary shift.
Apply offsets only when the timing evidence fits
A fixed offset is a narrower problem than drift. If a source begins with the audio consistently ahead of or behind the picture, and that relationship remains stable through the clip, shifting timestamps may be a reasonable experiment. Make the change on a copy, note the offset you applied, and compare the start, middle and end. If the mismatch changes, undo the global shift and investigate track duration or frame timing.
-itsoffset changes the timestamps for an input; it does not move content independently in a way that repairs all possible track relationships. The option's placement relative to an input matters, so use the official documentation rather than a remembered command fragment. -isync is specifically about aligning input start-time offsets where inputs share a clock source. It should not be treated as a generic audio-delay control for unrelated files.
For a playlist, make the smallest change that matches the evidence. A correction applied to one faulty clip is different from a shift applied to the entire playlist. If the mismatch first appears after a specific join, changing every input can conceal the point of failure and introduce errors elsewhere. Keep a clean baseline output so you can compare each attempt.
Validate the assembled file before YouTube Live
Validate the finished file as a programme, not just as a successful FFmpeg process. Check the beginning, the end, and each join that was suspect. Use the same kinds of identifiable audio and picture cues used during diagnosis. Listen on the device and connection you normally use for review; visual playback alone can miss a sound problem, and audio alone cannot reveal a lip-sync mismatch.
Compare the audio and video end points as well as their start. YouTube Help's upload sync troubleshooting calls out matching audio and video durations. If those durations differ, find out whether the file has a trailing track, an early stop, or an incorrect duration report before sending it to a live workflow.
YouTube's general recommended upload encoding settings include MP4, H.264 video, AAC-LC or Opus audio, and a 48 kHz audio sample rate. These are delivery recommendations, not proof that a file is synchronised. Follow the recorded frame rate where practical, and do not change frame rate simply to match an arbitrary preset if the resulting timing has not been checked.
Finally, test the same output through the path you will use for the live playlist. A file that plays locally but has a different ingest or playlist configuration deserves a short monitored test before it becomes the overnight source. If your process is running prerecorded videos as a YouTube Live stream, keep the validated file and the precise version of the playlist together so that a later re-export is not mistaken for the known-good one.
If keeping a personal computer switched on to replay and monitor a corrected file is the part of the workflow that causes trouble, StreamNeo can take the uploaded video and run it as a YouTube live stream while your computer is off. That addresses the continuous playback task; it does not inspect or repair an out-of-sync source, so validate the file before using it.
Before committing, compare the operating options on the pricing page. When the file and channel are ready, start free — 24-hour trial, no card.
FAQ
Will the concat demuxer fix audio and video sync automatically?
No. It joins files by adjusting timestamps and depends on compatible streams and usable duration information. First establish whether the mismatch is inside a source, appears at a join, or accumulates over time.
Should I use -itsoffset when audio is out of sync?
Only consider it when the evidence shows a stable, fixed timestamp offset for the relevant input. A global shift will not repair drift that grows, mismatched track durations or bad timing inside a clip.
When is the concat filter a better choice?
Use it when you need to re-encode or normalise inputs, such as when their stream layouts or properties differ. Plan consistent handling for missing audio and inspect the re-encoded output at the original fault points.
What should I check before sending the playlist to YouTube Live?
Confirm that audio and video remain aligned near the start, at joins and near the end, and compare their durations. Keep the recorded frame rate where practical and treat YouTube's encoding recommendations as delivery guidance, not a sync guarantee.