Keep one FFmpeg output running across clip boundaries, and choose the join method that matches your files. Use the concat demuxer when the clips have compatible streams and accurate durations; use the concat filter when you need to normalize or re-encode them. Neither method guarantees gap-free audio for every set of files: mismatched audio and video lengths, bad duration metadata, timestamp problems, or YouTube ingest and network issues can all cause trouble.
First identify what kind of gap you hear
A pause between clips can come from the media join itself, but a viewer may also hear a dropout caused later in the encoding or delivery path. These require different fixes. FFmpeg’s concat demuxer relies on stream timing and calculated file durations; YouTube’s ingest checks address audio format and stream configuration, not faulty source timestamps.
As an Amazon Associate I earn from qualifying purchases.
- A gap at the same point in a local output or archive: inspect the source clips, their audio/video end times, and the concat method.
- A gap only in the live preview or for viewers: check encoder messages, YouTube stream health, and the outbound connection as well as the source.
- A pause that is actually part of the sound: decide whether to keep it or intentionally blend the clips with an audio crossfade.
There is no universal command that can diagnose the cause without the media and logs. Test with representative clips before the scheduled stream.
Free tools Windows power users keep installed
One-click scans. No signup required.
Inspect the clips before joining them
For each file, check that the expected audio and video streams are present, and compare their codecs, time bases, sample rates, channel layouts, and actual durations. Pay particular attention to whether audio and video end together. The concat demuxer requires matching streams, including codecs and time bases, and its timestamp placement depends on file duration information.
#1 Best Overall
- 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
One practical way to inspect stream and format metadata is:
ffprobe -hide_banner -show_streams -show_format clip1.mp4
Repeat for each clip. This displays metadata; it does not prove that every timestamp is correct or that the sound will be seamless. Listen to the boundaries in a test output too.
Choose the right FFmpeg joining method
| Method | Use it when | Main constraint |
|---|---|---|
| Concat demuxer | The clips have compatible streams and you want to avoid re-encoding. | It relies on accurate durations and matching stream parameters. Streams ending at different times can create gaps. |
| Concat filter | You need to process or re-encode the inputs. | Each segment must start at timestamp zero. For non-final segments, the filter uses the longest stream duration and pads shorter audio with silence. |
acrossfade |
You want an intentionally blended audio transition. | It changes the transition’s sound; it does not repair incorrect timestamps. |
FFmpeg’s FAQ recommends the concat filter when re-encoding and the concat demuxer when its compatibility requirements are met. Setting -c copy cannot make incompatible streams compatible or correct bad duration metadata. See the FFmpeg FAQ.
Recommended Free Tools
Rank #2
- 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
Use the concat demuxer for compatible clips
- Create a text file list. Put the entries in playback order. For example:
ffconcat version 1.0 file 'clip1.mp4' file 'clip2.mp4' - Check stored durations. The demuxer moves each subsequent file to the calculated end of the preceding file. If a stored duration is inaccurate, use a
durationdirective for the preceding file, expressed in seconds:ffconcat version 1.0 file 'clip1.mp4' duration 123.456 file 'clip2.mp4'Replace the example duration with the correct duration for that file; do not copy it as a general setting. A duration override is useful only when you know the right value.
- Join without re-encoding as a test. For compatible inputs, a local test output can be made with:
ffmpeg -f concat -safe 0 -i list.txt -c copy joined.mp4Use
-safe 0only when the list contains paths that require it, and only use trusted list-file contents. If FFmpeg reports parameter incompatibilities or the output has a bad boundary, do not assume stream copying can fix it; normalize or re-encode using the concat filter instead. - Listen and inspect the join. Check the output around each boundary, including the last seconds of one clip and first seconds of the next. Also compare local output with the live preview during a separate test.
The FFmpeg Project documentation warns that duration-based timestamp adjustment is global and “may cause gaps if all streams do not have exactly the same length.” Read the concat demuxer documentation for its compatibility and duration rules.
Rank #3
- 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.
Use the concat filter when you need to normalize or re-encode
The concat filter is the better fit when the files need processing or do not satisfy the demuxer’s stream compatibility requirements. Before joining, make sure each segment starts at timestamp zero. The filter aligns a non-final segment to its longest stream; if its audio ends first, the shorter audio is padded with silence. That behavior can sound like a gap even though the filter is following its duration rule.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesA two-input filter graph has this general shape when both clips contain one video and one audio stream:
ffmpeg -i clip1.mp4 -i clip2.mp4
-filter_complex "[0:v]setpts=PTS-STARTPTS[v0];[0:a]asetpts=PTS-STARTPTS[a0];[1:v]setpts=PTS-STARTPTS[v1];[1:a]asetpts=PTS-STARTPTS[a1];[v0][a0][v1][a1]concat=n=2:v=1:a=1[v][a]"
-map "[v]" -map "[a]" -c:v libx264 -c:a aac joined.mp4
This is a template, not a universal repair command. It assumes two inputs with both audio and video, and the streams still need compatible properties for the intended output. If a clip lacks audio, has multiple audio tracks, or needs different normalization, the graph must be adjusted. The example uses re-encoding; choose output encoding settings suitable for the content and destination.
Rank #4
- 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
Consult the FFmpeg filters documentation for concat filter input requirements and padding behavior. Check the resulting file at each boundary rather than treating a successful command exit as proof of seamless sound.
Add an audio crossfade only if you want a blend
FFmpeg’s acrossfade filter can blend adjacent audio inputs, with a chosen duration and curves; it can also be configured to disable overlap. For example, the documentation illustrates acrossfade=d=10. That is an example, not a recommended default: select a duration that suits the material and decide whether the clips should overlap.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →A crossfade changes the audible transition. It does not correct bad timestamps or establish that the underlying streams line up. Use it for an intended musical or ambient blend, not as a substitute for diagnosing a silence or dropout.
Best Value
- 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
Match the audio settings expected by YouTube
For RTMP or RTMPS ingest, YouTube lists AAC or MP3 as audio codec options. Its current encoder settings guidance recommends 44.1 kHz for stereo and 48 kHz for 5.1 audio, with recommended advanced audio bitrates of 128 Kbps for stereo or 384 Kbps for 5.1. Those are platform recommendations, not fixes for mismatched source-file timing. See YouTube’s encoder settings.
- Send only one audio stream to the ingest endpoint.
- If you configure primary and backup streams, use matching audio sample rates.
- For video encoder configuration, YouTube recommends a 2-second keyframe frequency and says not to exceed 4 seconds. This affects the video stream configuration, not the source audio join.
YouTube’s live streaming error guidance covers audio-stream count and sample-rate errors. Correcting those settings will not repair a gap already present in a joined file.
Test the whole path and isolate the fault
- Test before the event. Use clips representative of the planned stream, including the transitions most likely to expose the problem. YouTube advises: “Make sure to test before you start your live stream.”
- Check the preview and stream health. Watch for YouTube messages or encoder warnings around the time of a dropout.
- Inspect the local output or archive. If the gap is present there too, focus on the source files, stream lengths, concat settings, and encoder output.
- Check system and connection conditions. When the local encoder output sounds healthy but viewers still hear a problem, investigate outbound internet connectivity and the ingest path. YouTube’s live stream troubleshooting guidance recommends checking outbound connection strength when encoder output is healthy.
Keep a note of the exact clip boundary and timestamp. That makes it easier to compare the source, joined file, encoder output, and live preview without guessing which segment caused the issue.
Common symptoms and fixes
| Symptom | Likely area to check | Next step |
|---|---|---|
| Gap repeats at the same clip boundary in a local joined file | Duration metadata, unequal audio/video lengths, or concat timing. | Compare stream durations and timestamps; correct a known inaccurate duration or use a filter workflow. |
| Concat demuxer rejects a clip or stream-copied output behaves badly | Inputs may not have matching streams, codecs, or time bases. | Inspect each file and use a filter/re-encode path if normalization is needed. |
| Silence appears after a shorter audio stream in a non-final segment | Concat filter padding to the longest stream duration. | Make audio and video segment lengths intentional before concatenating; verify boundaries in the output. |
| Audio error appears in YouTube Studio or encoder messages | Ingest audio codec, multiple audio streams, or mismatched primary/backup sample rates. | Use a supported audio codec, send one audio stream, and match sample rates where primary and backup are used. |
| Local output sounds correct, but the live stream drops audio | Encoder, outbound connection, or ingest path. | Review stream health and encoder output, then check outbound connection strength. |
Or let it run in the cloud
If the goal is to keep uploaded videos playing as a 24/7 YouTube stream rather than operate an FFmpeg machine yourself, StreamNeo is a cloud option: upload a recording or build a playlist, add your YouTube stream key once, and go live. It plays uploaded videos, not a camera feed, and streams to YouTube.
- Nothing has to stay powered on at home; the stream runs from the cloud.
- Each slot streams the uploaded quality, up to 4K 60fps, at one flat price per slot, with no re-encode or quality tiers.
- It automatically recovers if YouTube drops the stream.
- The first day is free with no card. Monthly billing is $9.99 per month.
Check that you have the rights to stream your uploads and follow YouTube’s applicable live-stream rules; neither a concat command nor a cloud service grants content rights. To try the cloud workflow, start a StreamNeo free day.
Quick Recap
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.

