Bonum Certa Men Certa

Adding, Seaming Together, Merging, or Concatenating Videos From the Command Line With FFMPEG (Scripting for Streamlining of Workflows)

Video download link



Summary: In order to enrich the looks of videos with almost no extra time/effort (all scripted, no GUIs should be needed) use ffmpeg with the concat operator; but there are several big gotchas, namely lack of sound and need for consistency across formats/codecs and even sampling rates

TODAY we focused on some site 'logistics' and especially dealt with video and sound. The goal is to automate some tasks and/or improve the presentation of multimedia using Free software. Free as in freedom...



Frankly, the tool we used to generate some video segments was an "online" thing called Canva (never heard of it before, but it seems powerful enough and doesn't require downloading anything, logging in etc. -- not even an E-mail address). On the face of it, problem solved! But no... it gets trickier from then on. I spent many hours working around barriers.

Well, ffmpeg is very powerful and extremely versatile. However, as it turns out, ffmpeg will first need to convert .mp4 files downloaded from there (Canva) so as to incorporate sound, even if it's just mute (inaudible sound track).

For this reason and for that purpose, as per people who had similar issues concatenation tracks that lack sound (merged or combined with some that do have sound), run a command as follows (depending on the sampling rate, 48000 in my case, or else the sound/pitch will be funny).

ffmpeg -i "file.mp4" -f lavfi -i anullsrc=cl=mono:r=48000 -shortest -y "file-new.mp4"

Assuming you now have a track that is compatible with what you'd merge it with, ensure that the original is moreover re-encoded for it to be applied consistently. As I always record as WebM, I need to then run (for a video like the above):

ffmpeg -i video-ffmpeg-concat.webm -c:v libx264 -preset slow video-ffmpeg-concat.mp4

This yields something suitable as it must be strictly compatible in sampling, codec type, and other factors. That's a limitation in ffmpeg. This is a common issue for a lot of people and it took me hours to overcome (many trials and errors). I wished to document this as other people too got stuck (many forum posts).

Depending on which files you wish to concatenate with (and the order), write down the 'recipe', e.g. recipe.txt, containing

file file-new.mp4
file testing-6.mp4
file outro-new.mp4


Relative paths too can be prepended (e.g. file Videos/outro-new.mp4). The ffmpeg documentation explains the syntax better. There's a lot more about concat [1, 2].

Then run everything as follows:

ffmpeg -f concat -i recipe.txt output.webm

The reason the assembly of files is done with .mp4 files (to yield a WebM) is the insistence of Canva that downloaded videos are either MP4 or GIF. There must be some better ways and I'll improve this over time (this is all still very fresh in the mind; I've spent a lot of time on this).

From now on we have the ability to make videos that are 1) smaller in size because of re-encoding with strong compression and 2) have a little bit of extra context. We'll improve this over time and push to git.

Update: This is what the outcome can look like (mind start and end of clip).

Video download link

Recent Techrights' Posts

Social Control Media and GAFAM as National Security Threats (Domestically and More So Abroad)
"Algorithms control messages, swayed 2024 presidential election"
 
Links 09/05/2026: "Grand Theft Oil Futures" and Mass Layoffs at Verizon
Links for the day
Gemini Links 09/05/2026: Inkscape "Copy Text Style" and NomadNet
Links for the day
The Corrupt Lecture the Non-Corrupt - Part XVII - European Patent Office (EPO) Management Not Sharing Responsibility for Financial Resources
For those who wonder, EPO strikes are still going on
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, May 08, 2026
IRC logs for Friday, May 08, 2026
Gemini Links 08/05/2026: Slop Falsely Marketed to Greedy Administrators and New Official Maintainer of Antenna Confirmed
Links for the day
Links 08/05/2026: French Prosecutors Seek Charges Against MElon, Europe Wants Young People Without Skinnerboxes (Smartphones)
Links for the day
2,000-4,000 More Layoffs Expected at IBM's Kyndryl, Some Say Over 10,000 Layoffs
They use euphemisms like "restructuring" or "rebalancing"
Gemini Links 08/05/2026: Dissociated Pride and Prejudice, Smallnet Protocols Roundup
Links for the day
Links 08/05/2026: Slop Profiteer NVIDIA (and Circular Financing/Accounting Fraud Leader) May Be Liable for Mass Copyright Infringement, Kyndryl (IBM) Layoffs
Links for the day
Outgoing OSI Chief Was Paid by Microsoft to Advocate for GPL Violations (Using the OSI's Name). Now, Inside OIN, He Says GPL Violations Are 'Freedom'.
It seems like only compromised people can be "allowed" to run today's OSI
SLAPP Censorship - Part 70 Out of 200: Microsoft's Graveley Injunction Request 100% the Same as Garrett's (Pure 'Copy-paste', Not Even a Word or Single Character Changed!)
Not so funny at all
Over 97% of the 'Linux' Foundation's Budget Goes Not to Linux
There is a term for this: mission creep
Cloudflare is a Giant Pile of Debt, Now There Are Mass Layoffs and Media Coverage About This is Churnalism, Sometimes by Slopfarms (False Excuses)
If Cloudflare goes under, it'll be great news
NDAs as a Price Tag on Criticism (or Honest Expressions of Opinion)
What ever happened to accountability? Suppressed by reverse bribes (via NDAs)?
Internal Microsoft Communications Confirm: "Buyout" Offer Worse Than a Year's Salary and Microsoft Offers "Retirement" to Young People Who Cannot Retire
Does that sound like a good offer or marching orders?
It's Not a GAFAM World Anymore and There Are Far More Operating Systems Than Google's, Apple's, and Microsoft's
we're not getting the full picture of what's happening
Site Overhauls at Cybershow and at analognowhere.com (Less is More!)
They seem to be replacing the heavy PHP backend with static HTML pages
Microsoft's XBox is Going Away Like Microsoft's Skype (Slowly But Surely, Then All at Once)
XBox is dying rapidly
Codecs and Software Patents - Part IV - Things Got So Bad That Some Laptop Sales Got Banned in the EU (Over Software Patents!)
If software patents lead to such severe outcomes, shouldn't the media pay closer attention to the problem?
The Corrupt Lecture the Non-Corrupt - Part XVI - EPO Had Data Breaches, Covered Them Up, Now Lectures Staff That Didn't Do It and Didn't Cover It Up
Imagine what would happen to staff if (non-anonymously) blowing the whistle on management leaking and then covering up EPO data breaches
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, May 07, 2026
IRC logs for Thursday, May 07, 2026
Mass Layoffs at IBM's Kyndryl, Slop Won't Save Kyndryl
Kyndryl is a "done deal". It's done. It's finished.
Kyndryl Holdings Inc Falls Almost 15% in 2 Days, What Does That Tell Us About IBM?
The "Big Blue" 'shell game' isn't working
Companies That Say They Are "Hey Hi" (AI) Leaders Don't Really Do Well, They Have Mass Layoffs Because Hype and Storytelling Won't Live Up to Shareholders' Expectations
Microsoft's investment in slop is not going well
Gemini Links 07/05/2026: Unicode and "RSS 4 Noobs (Getting Started)"
Links for the day
During IBM's Annual Event/Bash IBM's Stock Fell to (Almost) Lowest Level in a Year, Insiders Explain "IBM is on the Brink of Collapse."
Anthropic - like IBM - pays the media for puff pieces, exaggerations, and obvious vapourware
Servers Became "Cloud", VR Became "Metaverse", Now Bots Become "Agents" (of Slop)
Changing the name of things won't prevent rejection, only delay the negative reaction some more
Links 07/05/2026: "The ‘Perfect Storm’ Hanging Over Britain’s Public Debt" and "Internet Shutdowns Spread in Africa"
Links for the day
OSI Partners With Microsoft to Help Pretend Proprietary (GitHub) 'Celebrates' Open Source
And a Microsoft operative announced this as well
Links 07/05/2026: "Most Vibe-coded (Slop) Tools Are Not for You" and "Prepare for the PCB Shortage"
Links for the day
SLAPP Censorship - Part 69 Out of 200: Microsoft's Graveley Strangles, Gets Arrested, Charged, Then Asks for Apology From Those Who Reported It by Recycling Garrett's Plea for Apology
Garrett realised that his "funny" lawsuit wasn't so funny anymore
Codecs and Software Patents - Part III - AOMedia Video 1 (AV1) and Antitrust Issues
As we'll show in later parts, this already results in bans of some hardware sales in Europe
The Corrupt Lecture the Non-Corrupt - Part XV - Talking About Responsibility and Accountability While Failing to Hold Themselves Accountable
what outlet is there for justice or for the Rule of Law?
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, May 06, 2026
IRC logs for Wednesday, May 06, 2026
Gemini Links 07/05/2026: Dissociated Jekyll And Hyde, New Antenna 2.0.0
Links for the day