What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
When MP4 files have different audio codecs, sample rates, or channel layouts, do not concatenate them as-is with FFmpeg’s concat demuxer. First re-encode each file to the same stream profile, then put those matching files in an ffconcat playlist and loop that playlist into YouTube Live. If you want to avoid creating normalized copies, use FFmpeg’s concat filter, which is designed for concatenation that requires re-encoding.
Why mixed-audio MP4 files can break a concat playlist
An MP4 is a container; it does not guarantee that the video and audio streams inside it match those in another MP4. One file may contain AAC stereo audio at 44.1 kHz, while another contains a different codec, sample rate, or channel layout. Explicitly selecting streams with -map determines which tracks FFmpeg uses, but it does not make incompatible tracks compatible.
As an Amazon Associate I earn from qualifying purchases.
The concat demuxer expects every input file to have the same streams, including the same codecs and time bases. It is useful for compatible files, including stream-copy workflows, but it is not a format converter. When inputs differ and need re-encoding, FFmpeg’s FAQ recommends the concat filter instead.
Inspect the files before choosing stream maps
Run this for each file and note its video and audio streams, dimensions, frame rate, channel layout, and duration:
#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
ffmpeg -i "part1.mp4"
FFmpeg prints the stream information and exits when it reaches the end of the input. Look for lines beginning with Stream, and identify the intended video and audio tracks. A file can contain multiple audio tracks or no audio track at all, so do not assume that 0:a:0 is present or is the track you want.
- Use
-map 0:v:0to select the first video stream in the input. - Use
-map 0:a:0to select the first audio stream when that track exists and is the one you want. - If the desired track has a different stream index, adjust the map after inspecting the file. Explicit maps prevent FFmpeg’s automatic stream selection from choosing an unintended track.
Normalize the MP4 files to a common profile
For a simple, repeatable playlist, encode each source file to the same video dimensions, frame rate, video codec, audio codec, sample rate, and channel layout. The example below targets 1080p, 30 fps, H.264 video, and AAC stereo audio at 44.1 kHz. It assumes every input has a video stream and a usable first audio stream. Change the input map or profile to fit your material and intended output.
ffmpeg -i "part1.mp4"
-map 0:v:0 -map 0:a:0
-vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,fps=30"
-c:v libx264 -pix_fmt yuv420p -r 30 -g 60
-c:a aac -ar 44100 -ac 2 -b:a 128k
"part1-normalized.mp4"
Repeat the command for every source, using the same output settings and a different output filename. Check that your installed FFmpeg build includes libx264. The scale-and-pad filter fits each video into a 1920×1080 frame without changing its aspect ratio; the resulting padding may be visible on sources with a different shape. If you want another resolution or frame rate, choose it consistently for all files.
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
The example uses a 60-frame GOP (-g 60). At 30 fps, that is a two-second keyframe interval. YouTube’s current live-encoder guidance recommends a two-second interval and says it should not exceed four seconds. If you change the frame rate, adjust the GOP to keep the intended interval: for example, 60 frames at 60 fps is also two seconds.
Files without the selected audio track
If a file has no audio, the example’s -map 0:a:0 will fail. If every item should have audio, add a silent audio stream to that file before using it in the playlist, matching the same AAC, sample-rate, and channel settings. Alternatively, build the sequence with a concat filter graph that handles each input deliberately. Do not silently omit a wanted track or assume that unmatched stream layouts will work in the demuxer.
Create the ffconcat playlist
Save a plain-text file named playlist.ffconcat. Its first line must be exactly ffconcat version 1.0, with no blank line or other text before it. Add one file directive per normalized video:
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.
ffconcat version 1.0
file 'part1-normalized.mp4'
file 'part2-normalized.mp4'
file 'part3-normalized.mp4'
Keep the paths valid from the directory where you will run FFmpeg. If paths contain characters that need quoting, follow FFmpeg’s ffconcat escaping rules. The command below uses -safe 0 so the playlist can include paths that the default safe-path check would reject; only use a playlist you trust.
The demuxer places each file after the previous one by adjusting timestamps. If the video and audio streams in a file have different actual lengths, a boundary can contain a gap. Incorrect duration metadata can also cause timing artifacts. Inspect durations and playback at the joins before relying on the playlist for a long broadcast.
Send the looping playlist to YouTube Live
In YouTube Live Control Room, copy the ingest server address and stream key for the broadcast. Use the RTMPS address when YouTube provides it; YouTube recommends RTMPS because it encrypts the connection in transit. Treat the stream key as a password: do not publish it, commit it to a shared script, or show it in a screenshot.
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
This is a template, not a universal tested command. Replace the bitrate placeholder with a bitrate appropriate for the selected resolution and YouTube’s current encoder guidance. Replace the output address with the ingest address and key YouTube gives you. Keep output options before the output URL.
ffmpeg -re -stream_loop -1
-f concat -safe 0 -i playlist.ffconcat
-map 0:v:0 -map 0:a:0
-c:v libx264 -pix_fmt yuv420p -r 30 -g 60 -b:v <chosen_video_bitrate>
-c:a aac -ar 44100 -ac 2 -b:a 128k
-f flv "<YouTube_RTMP_or_RTMPS_ingest_address_and_stream_key>"
-re reads the file-based input at its natural rate rather than sending it as fast as possible; -stream_loop -1 repeats the input indefinitely. The -map options state which video and audio streams to send. Because the playlist was normalized, the final encode should see a consistent profile. Check that your FFmpeg build supports the requested encoders and that the output settings match the resolution and frame rate you actually intend to stream.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteYouTube’s current RTMP/RTMPS guidance lists H.264, H.265, or AV1 video; AAC or MP3 audio; constant bitrate (CBR); and frame rates up to 60 fps. For stereo audio, it recommends 44.1 kHz and 128 kbps; for 5.1 audio, 48 kHz and 384 kbps. The sample command is an H.264/AAC stereo example, not a requirement to use those settings for every stream. Test with representative video movement and audio before going live, then monitor YouTube’s stream health.
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
Choose between the concat demuxer and concat filter
| Approach | When it fits | What to expect |
|---|---|---|
| Concat demuxer | Inputs already have matching streams, codecs, and time bases, or you normalize them first. | Can avoid re-encoding when inputs are compatible. The playlist uses an ffconcat script and the demuxer adjusts timestamps; mismatched stream lengths can leave gaps. |
| Concat filter | Inputs differ and you want one filter-and-encode workflow. | Suitable when concatenation requires re-encoding. Explicitly map and normalize the resulting output streams for the YouTube encoder profile you choose. |
Use the demuxer workflow above when you prefer to normalize files once and reuse a playlist. Choose a concat filter graph when it is more convenient to process the inputs together in a single re-encoding command. Neither choice removes the need to inspect the streams and select the intended tracks.
Troubleshooting common failures
- Concat reports mismatched parameters or the output glitches at a join: the demuxer is seeing incompatible streams. Re-encode the inputs to a common profile, or switch to a concat-filter workflow that re-encodes.
- There are audio gaps or audio/video drift at boundaries: compare actual stream lengths and file durations. The demuxer adjusts timestamps globally, and unequal stream lengths can leave gaps. Verify the files’ duration metadata; if a stored duration is wrong, the demuxer supports a
durationdirective in the playlist. - The wrong audio track or video appears: inspect the input streams and set explicit
-mapoptions for the intended tracks. - FFmpeg says an encoder is unavailable: check the installed build for the requested encoder, such as
libx264, or choose a supported encoder and confirm its output is accepted by YouTube. - YouTube rejects the stream or reports poor stream health: compare the outgoing codec, bitrate mode, frame rate, keyframe interval, and audio settings with YouTube’s current ingest guidance. Run a test with representative motion and audio, then check stream health.
- The stream stops when the command exits or the computer sleeps: this file-based FFmpeg method depends on the machine running FFmpeg and maintaining its network connection. Keep the host and process available for the full broadcast, or use a cloud service instead.
Or let it run in the cloud
If you do not want a computer or home connection to stay on, StreamNeo keeps an uploaded-video YouTube stream running from the cloud. Upload your recording or build a playlist, add your YouTube stream key once, and go live. It loops uploaded videos (not a camera feed), and automatically recovers if YouTube drops the stream.
- There is one flat price per slot for any uploaded quality up to 4K 60fps, with no re-encoding or quality tiers.
- Each slot includes one always-on stream, 10 GB of storage per slot pooled across active slots, 24/7 looping and playlists, automatic recovery if YouTube drops, and support from the StreamNeo team.
- The first day is free with no card, one free day per account. Billing options are a day, a week, a month, 6 months, or a year; cancel any time. UPI and cards are available in India, with card checkout worldwide.
Monthly: $9.99 per month. To start the free first day, create a StreamNeo account.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.




