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

Fedora is IBM and There's Hardly Any Community Left
It's more like an onboarding mechanism for unpaid labour at (and for) IBM
IBM to Announce 'Results' Shortly, Expect Lots of Chaff Like "Quantum" and "Hey Hi" (Nothing Material to Show)
We're still seeing layoffs and an exodus
 
RMS Was Right 35 Years Ago
Stallman’s viewpoints have remained the same
The Need to Understand the Projection Tactics Against RMS
There's an old and common saying (or "wisdom") about who's guilty when there's a fart in elevators (lifts)
Links 29/01/2026: Neocities Is Blocked by Microsoft, “Intellectual Freedom Centers” as the New "Intelligent Design"
Links for the day
Microsoft XBox Dying Not Only as a Console, Reveals Microsoft
Microsoft is trying to rebrand or repurpose the brand
Don't be Mistaken, Microsoft Boasts About Money That Does Not Exist and Revenue (Buying From Oneself!) Is Not Income
the company's debt grew
IBM's Financial Performance in IBM's Own Words: Money Down, Debt Up Sharply
IBM isn't a healthy company
In Dominica, GNU/Linux Has Risen to All-Time High in 2026
a lot of America is moving to Free software this year
The "Alicante Mafia" - Part XV - EPO is on Strike Tomorrow, Lots to be Angry About (Except Money)
We'll soon finish the series
Gemini Links 29/01/2026: "Lady Audley's Secret" and "The Value Of Our Fear" (Carney's Speech)
Links for the day
Emmanuel Macron on Europe's GAFAM Addiction/Dependence: "There is No Such Thing as Happy Vassalage"
Microsoft has long worked to prevent commodification
It's Official, Mass Layoffs at IBM Again (2026)
In a matter of days we'll just see how much IBM's debt has grown
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, January 28, 2026
IRC logs for Wednesday, January 28, 2026
Laos and Microsoft: About 10% Windows, 0% Bing
There are many more nations like it
EPO Technical Meetings Show no Breakthroughs, a Strike Goes Ahead This Friday
Apparently there was another (fourth) meeting today [...] The industrial actions are working already
Google News as the Sole Source of Slop About "Linux", a Feeder of Slopfarms or Serial Sloppers
At least it's no longer hard to 'contain' the slop problem, knowing which domains are the culprits and seeing that Google is their main 'feeder'
Links 28/01/2026: ChatGPT Has Financial Problems, White House Sharing Fakes (or Deepfakes) in Official Accounts/Sites
Links for the day
Gemini Links 28/01/2026: FlatCube NES Port Finished and "Why I Still Write on the Small Web in 2026"
Links for the day
Upcoming Techrights Series About the Public Appearances of Richard M. Stallman (RMS) in the United States
we plan to drop all pretences about "Open Source" and instead focus on Software Freedom
Upcoming Techrights Series About the Experiences of EPO Insiders
We'll start the new series some time next week
Links 28/01/2026: Microsoft Ordered to Stop Spying on School Children, Apple's Brand Tarnished by Its Complicity With Human Rights Abusers
Links for the day
Upcoming Techrights Series About the Failure of the Solicitors Regulation Authority (SRA) to Stop Hired Guns Who Work for Americans That Abuse Women
The SRA has demonstrated nothing but considerable incompetence at many levels
The "Alicante Mafia" - Part XIV - The EPO Vice-President Steve Rowan and the Hidden Alicante Connection is a Big Deal
We'll soon take a closer look at Ernst
Gemini Links 28/01/2026: Particle and AirMIDI
Links for the day
Amandine Jambert (EDPB/CNIL/FSFE), motive for lying, trust in blockchain and encryption
Reprinted with permission from Daniel Pocock
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, January 27, 2026
IRC logs for Tuesday, January 27, 2026
Expect More XBox Layoffs Shortly
As expected
Links 27/01/2026: Japan-China Feud Escalates Again, "Iran's Internet Blackout Persists"
Links for the day
Online 'Gathering' Held Today to Organise Industrial Actions in EPO, Strikes Will be Starting Shortly
"Online Extraordinary General Meeting on Action Plan"
It's Not About What You Know, It's About Who You Know (and Stay Quiet About the Cocaine)
This is not an organisation that exists to ensure laws are followed
FOSDEM 2026: democracy panel: FSFE uses women as stooges, gerrymander
Reprinted with permission from Daniel Pocock
Must Use Proprietary JavaScript to Submit Feedback to the European Commission About Moving From GAFAM to Free Software
Nevertheless, go tell them why Software Freedom would benefit Europe's defence and economy
Distortion of the Facts About Mass Layoffs at IBM
more layoffs are ahead
Gemini Links 27/01/2026: "Waiting Isn't a Waste", Posting from Lynx, and Bookmarks
Links for the day
Links 27/01/2026: "Oracle Debt and TikTok Transition Troubles Vex the Ellison Media Empire", Richard Stallman Quoted on Copyrights
Links for the day
Steven Field (Red Hat) Speaks of "Recent Layoff" (RA/Wave) in Red Hat
IBM really doesn't like it when people talk about "RAs"
The "Alicante Mafia" - Part XIII - Is EPO Vice-President Steve Rowan in Cahoots With the "Alicante Mafia"?
that deserves much media attention, political intervention, and condemnation
A Week Ago We Contacted the EPO's Stephen (Steve) Rowan About Cocainegate
Tomorrow we'll write some more about Rowan
“Wikilaundering” Explained
"London PR firm rewrites Wikipedia for governments and billionaires"
IBM Reports 'Results' Tomorrow, Expect More "RAs" (Mass Layoffs)
they use words like "efficiency", "optimisation", "AI", "pivot", "modernisation" and so on
Earlier This Month Microsoft Lunduke Said in Public It Was Good That Renee Good Was Murdered, Now He Mocks or Demonises People for Saying the US is Unsafe
Don't be easily conned by demagogues
Google News and "Linux" Slop
Why won't Google be interested in tackling this issue? Instead Google has been trying to participate in this issue.
IBM Kills Red Hat in the Darkness
What IBM does to Red Hat is malicious
IBM Red Hat's Goal Is Not Real Security (It Probably Never Was)
Spies and trolls are very malicious people and sometimes they're the same thing
With Absurd Lies About Slop, Which Lacks Intelligence or Financial Potential, GAFAM and IBM Will Twist Mass Layoffs as 'Efficiency Drive' or 'AI Pivot'
More layoffs are on the way
Animal Advocacy Works
All it takes is effort and determination
EPO Strike This Week
What has happened to Europe?
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, January 26, 2026
IRC logs for Monday, January 26, 2026