For clips with different codecs, use FFmpeg’s concat filter and re-encode the result. A playlist file only sets clip order; it does not make incompatible codecs match. The concat demuxer with -c copy is appropriate only when the inputs have compatible streams and parameters.
Choose the right FFmpeg concatenation method
| Approach | What it does | When to use it | Trade-off |
|---|---|---|---|
Concat demuxer with -c copy |
Joins packets without decoding or encoding them. | Inputs have the same streams, codecs, time bases, and compatible parameters. | Fast and avoids generation loss from re-encoding, but cannot convert codecs or normalize mismatches. |
| Concat filter with encoding | Decodes segments, concatenates their audio/video, then encodes the output. | Inputs use different codecs or need normalization before joining. | Allows filtering and format conversion, but encoding takes time and may affect quality. |
FFmpeg’s FAQ says of the concat filter: “This operation is recommended if you need to re-encode.” Read the FFmpeg concat FAQ.
Inspect the clips before building the filter
Check each file’s streams and properties before choosing the filter graph. In particular, confirm that every clip has the video and audio streams the example below expects, and note differences in resolution, pixel format, frame rate, sample rate, and channel layout.
ffprobe -hide_banner clip-one.mp4
ffprobe -hide_banner clip-two.mov
The example filter graph assumes every input contains one video stream and one audio stream. If a clip lacks audio, this graph will not work as written: create silent audio for that segment or build separate audio and video concatenations. Other differences may require filters such as scale, setsar, fps, or aresample. Normalize deliberately rather than forcing a frame rate or aspect ratio without checking the source.
#1 Best Overall
- Legend perfected: Modern design with a matte basalt black finish in an optimized chassis with customizable AlienFX lighting zones, including the striking stadium lighting.
- Game changing graphics: Step into the future of gaming and creation with the NVIDIA GeForce RTX 5070 graphics, powered by NVIDIA Blackwell architecture.
- Marathon gaming unlocked: This high-performance technology ensures clean energy is consistently available, unleashing the top-level power of Intel Core Ultra 7 265F processor as you game, livestream, and multi-task for hours on end.
- Total command: Alienware Command Center software allows you to create and edit AlienFX lighting across the ecosystem, choose and monitor your performance mode across distinct power states, and create custom gaming profiles for your whole library.
- Dell Services: 1 Year Onsite Service provides support when and where you need it. Dell will come to your home, office, or location of choice, if an issue covered by Limited Hardware Warranty cannot be resolved remotely.
Create the playlist file
A concat playlist is a plain-text manifest. Put one file entry per line, in the order you want the clips to appear, and save it as inputs.txt:
file 'clip-one.mp4'
file 'clip-two.mov'
file 'clip-three.mkv'
Use paths relative to the playlist’s directory where possible. The manifest controls order; it does not reconcile differences among the files.
Rank #2
- Model: Dell OptiPlex 7050 Small Form Factor (SFF)
- Processor: Intel Core i7-7700 3.60 GHz
- Memory: 32GB DDR4 Ram
- Storage: 1TB Solid State Drive (SSD) Fast Boot + Storage
- Operating System: Windows 11 Pro (64-bit)
Use the concat filter for different codecs
For two clips that each contain one video and one audio stream, this is a starting point for decoding, concatenating, and encoding an MP4:
ffmpeg -i clip-one.mp4 -i clip-two.mov
-filter_complex "[0:v:0][0:a:0][1:v:0][1:a:0]concat=n=2:v=1:a=1[v][a]"
-map "[v]" -map "[a]"
-c:v libx264 -crf 18 -preset medium -pix_fmt yuv420p
-c:a aac -b:a 192k -movflags +faststart output.mp4
The filter inputs are listed in segment order: video then audio for the first clip, followed by video then audio for the second. The output labels [v] and [a] are mapped to the encoded video and audio streams. This illustrative command is not universal or guaranteed to work unchanged on arbitrary files. If streams or parameters differ, adapt the filter graph after inspecting the inputs.
Rank #3
- 【POWERFUL PERFORMANCE】 – AMD Ryzen 5 5500 6-Core 12-Thread Desktop Processor (up to 4.2GHz). Effortlessly handle 3A games, 4K video editing, and multitasking.
- 【SMOOTH GAMING】 – Equipped with GeForce RTX 3050 6GB GDDR6 Graphics Card. Experience high-frame-rate 1080P gaming with ray tracing.
- 【FAST & AMPLE STORAGE】 – 16GB DDR4 3200MHz RAM + 1TB NVMe SSD. Enjoy rapid game loads, quick file transfers, and ample space for your entire library.
- 【KEEP COOL】 – Advanced ARGB air cooling system with multiple fans. Maintains stable performance and low noise even during marathon gaming sessions.
- 【READY TO USE】 – Features built-in Wi-Fi, multiple USB ports, HDMI and DisplayPort (DP) outputs for flexible monitor connectivity. A complete prebuilt gaming computer, plug and play right out of the box.
The command encodes video as H.264 with CRF 18 and the medium preset, and audio as AAC at 192 kbps. CRF is a quality-oriented encoding setting rather than a fixed output bitrate; the resulting bitrate depends on the content. Re-encoding creates a new generation, so retain the original files if you may need to make a different output later.
When the concat demuxer and stream copy are suitable
If the clips already have compatible streams—including codecs and time bases—you can use the demuxer with stream copy. The concat demuxer’s requirements are stricter than simply having files that play successfully on their own. File duration metadata is used to adjust timestamps for the next file, so inaccurate durations can cause artifacts.
Rank #4
- Intel Core i9-14900KF CPU, B760 chipset motherboard, 32GB DDR5 6000MT/s RGB Memory, 1TB NVMe M.2, WiFi, Windows 11
- NVIDIA GeForce RTX 5070, Display Port/HDMI
- Closed Loop Liquid Cooling with 240mm Radiator
- 2x USB 3.0, 1x Headphone, 1x Mic
- PSU Power cover with Filtered Ventilated Vertical Side mount Radiator support
ffmpeg -f concat -safe 0 -i inputs.txt -c copy joined.mp4
Use -safe 0 only when the playlist contents are trusted; it permits paths that would fail the demuxer’s safe-path checks. Most importantly, do not use -c copy as the solution to mixed codecs. Stream copy copies packets as they are and does not decode or transform one codec into another. See FFmpeg’s concat demuxer documentation and stream-copy documentation.
Prepare the output for YouTube
YouTube’s recommended upload settings list MP4, H.264 video, progressive scan, and AAC-LC audio, among other recommendations. Its SDR video bitrate recommendations include 8 Mbps for 1080p at standard frame rates and 12 Mbps for 1080p at high frame rates. These are recommendations, not mandatory minimums. YouTube advises uploading at the same frame rate as the recording; check the current guidance and the actual source properties before setting output filters or bitrates.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesBest Value
- Content Creation Workstation PC: Powered by the Intel Hexa-Core i5 (8th Gen) processor with 32GB DDR4 RAM and NVIDIA's Quadro K1200 4GB Graphics Card, this Workstation PC Computer is built for creative environments
- NVIDIA's Quadro K1200 4GB Graphics Card: Graphic support built to be an efficient workstation for creative applications like photo and video editing, 3D Design, AutoCAD, and much more
- Software Compatibility: Workstation PC for use with independent software vendors (ISV) and certified for use with modeling, rendering, and engineering software from Adobe, AutoCAD, 3DS Max, and many more
- Massive Storage Solutions: An ultra-fast 1TB Solid State Drive (SSD) setup as the primary boot device; Boot and load programs with little to no lag; An additional 4TB Hard Disk Drive (HDD) is installed for additional storage; Never run out of storage
- Connectivity for Creative Projects: USB 3.0 (x5) | USB 2.0 (x4) | USB Type-C (x1) | DisplayPort (x2) | Serial Port (x1) | VGA Port (x1) | Audio Combo Jack (x1) | Audio In (x1) | Audio Out (x1) | RJ-45 Ethernet (x1) | Internal SATA (x3)
For this example, H.264, AAC, and MP4 are aligned with common YouTube upload recommendations, but -crf 18 does not guarantee an 8 or 12 Mbps bitrate. If you need to target a bitrate, choose an encoding strategy based on the sources and the desired output, then inspect the resulting file. YouTube’s page also covers color-space and audio recommendations: YouTube recommended upload encoding settings.
Troubleshoot common failures
- The demuxer reports mismatched streams or parameters: The files are not compatible for packet-level concatenation. Use the concat filter and encode, or normalize inputs first.
- The filter reports missing audio or video: The example assumes one of each stream in every input. Identify the missing stream and supply silent audio where appropriate or build separate audio and video graphs.
- The output has a jump, glitch, or timing problem at a boundary: Compare stream properties and durations. In demuxer workflows, inaccurate recorded durations can shift subsequent timestamps. For filtered output, normalize relevant timing or format differences as needed.
- Resolution, aspect ratio, or frame rate changes unexpectedly: Check each input with
ffprobe. Apply deliberatescale,setsar, orfpsfilters only when the output needs a common format. - Audio is distorted, silent, or changes level: Check for missing streams, sample-rate differences, and channel-layout mismatches; consider
aresampleand a graph that handles each input’s actual layout. - The output is not accepted or looks wrong after upload: Verify the encoded file’s container, codecs, scan type, frame rate, aspect ratio, and audio. Compare them with YouTube’s current upload recommendations rather than assuming a successful FFmpeg exit guarantees the intended presentation.
Or let it run in the cloud
For a YouTube channel that needs an uploaded video or playlist to loop continuously, StreamNeo runs the stream from the cloud; your home computer and connection do not have to stay on. Upload the prepared video, add your YouTube stream key once, and go live. It streams the uploaded file, not a camera feed, and streams to YouTube only.
Quick Recap
- Each slot streams the uploaded quality up to 4K 60fps at one flat price, with no re-encode or quality tiers.
- If YouTube drops the stream, StreamNeo automatically recovers it.
- The first day is free with no card required. Monthly is $9.99 per month.
See StreamNeo for details, or start your free 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.

