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

IBM's "Next Step" Program
Apparently close to 1,000 people being laid off by IBM wasn't worth reporting
If GNU/Linux Rising is Just "Bots" (It's Not, Many Surveys Show the Same), Why Does Microsoft Rush to Lie About System Requirements of Vista 11?
The real reason is, GNU/Linux is rising
 
Improving the Static Site Generator (SSG), Fixing Bugs
Next month the site's SSG turns 3
Gemini Links 09/08/2026: Meatballs (1979), Gopher, RSS Experiment
Links for the day
2026: The Year Richard Stallman Came Back to American Campuses
There's more on the way
XBox is Rotting Away, Technical Issues for Second Time in Two Weeks
XBox is dying
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Saturday, August 08, 2026
IRC logs for Saturday, August 08, 2026
Red Hat is in Need of a 'Jolla', as an IBM-Controlled Red Hat is Becoming Like the Microsoft-Infiltrated Nokia
Dying fast, partly by design
Gemini Links 08/08/2026: Gigs, Poems, SREs, and Shared Passion
Links for the day
Kompromat Tactics in GNU and Linux
Kompromat as a concept was covered here in the past in relation to Microsoft
SLAPP Censorship - Part 143 Out of 200: After Nearly 10 Attempts to Settle With Us and Over a Million Pounds Spent on Lawyers and Barristers
We are in no particular hurry
20 Years and 43 Years
GNU/Linux is not just code, it's a philosophy, licence (copyleft), and community
GNU/Linux Turns 43 Next Month, Many Distros Actively Maintained
A lot of Debian-based distros are still actively maintained (we talk about this in IRC this evening), so the stability of the Debian Project is important
Links 08/08/2026: GAFAM Colonialism "Paved Over Protected Wetlands", Slop Companies Hoard Software Patents as Debt Soars to Trillions
Links for the day
Links 08/08/2026: "Palantir Paid No Federal Income Tax" and "Who's Responsible for This Mess?"
Links for the day
Retained: The Time IBM's Red Hat Tried to Hijack or Take Offline Site of Critics, Failed on All Grounds (Meritless Action Intended to Harass Critics)
Replicated from adrforum.com
IBM's 'Final Solution': Censor Sites Not Controlled by IBM, Sites Where Dissent is Expressed
IBM has no culture of free speech
More Mass Layoffs Coming IBM's Way (Ones IBM Cannot Hide, Cannot Convince Enough People to Leave or Unjustifiably PIP Them When They Say No)
The company that was like a "father of modern computing" is now stingy when it comes to travel. Not a good sign.
What Will it Take for Mainstream Media to Report Silent or Secret Layoffs at IBM?
"Silent" or "secret" sometimes because the media won't cover them
Is the Future of IBM Red Hat Temporary Staff, Contractors?
They want cheap, obedient lemmings
Gemini Links 08/08/2026: Tribute to Lloyd Center, Radio Amateurism, Homeworlds
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, August 07, 2026
IRC logs for Friday, August 07, 2026
Microsoft Uses Slop to Find Defects and Then Uses Slop to Replace Code, What Could Go Wrong?
Botspam is the problem, it's not a constructive approach in any shape or form
analytics.usa.gov: GNU/Linux Up Some More This Week
Days ago it said 6.4%, now it's up to 6.8%
RA-pocalypse: IBM Tells Workers "Taking a Hike" is Their "Next Step" ('Voluntary' Layoffs), Now It Prepares to Sack Lots of Contractors
There definitely is something going on
Legal Attacks on Techrights Have Made Techrights More Popular and More Widely Read
The misogynists will have plenty of work to do this summer
Kai Stephens (Barkley Walsh) & British Democrats in Clacton by-election hustings
Reprinted with permission from Daniel Pocock
Daniel Pocock 'Punching' Nazis in the UK
The so-called "cult" of so-called "Debianism" was left with nothing but massive legal bills
SLAPP Censorship - Part 142 Out of 200: GemText is Not a Webpage, Gemini Protocol is Not the Web, and Capsules Are Not Websites
our intention to appeal (escalate to the Court of Appeal)
Microsoft: Our August 2026 Layoffs Are Not Layoffs Because... Reasons
That's like IBM making "spin-offs", then pretending that no layoffs are happening
Links 07/08/2026: UMG and Anthropic in Trouble Over Copyright Infringements Sold as "Training" (Slop)
Links for the day
Links 07/08/2026: "BMW Is Showing Commercials On Their Car's Dash Screens And They Want You To Think It's A Treat", Software Patents on Drones
Links for the day
What We Said About Red Hat's Fate Under IBM Turned Out to be Right on the Money (That IBM Lacks)
There are no layoffs at IBM
IRC Networks Show No Signs of Going Away, IRC Enters Its 39th Year
That IRC daemons are still actively developed and patched in summer of 2026 (over 38 years after IRC was born) says a lot about IRC's importance
Social [Control] Media Needs to Die
I am a bit shocked to recall that I wasted a lot of time on it
Some Malware is Legal Because It's Made and Distributed by Politically-Connected GAFAM
In reality, the security non-experts 'championed' (and salaried) by GAFAM are anti-security people who advocate back doors
The GNU/Linux Anniversary is Next Month, Not This Month
It'll turn 43
At Clacton by-election Hustings Event Daniel Pocock Says "Social [Control] Media Has Contributed to Some of the Anti Social Behaviour."
No doubt many problems in society are caused or at least amplified/accentuated by this horrible phenomenon
IBM Insiders Explain Why IBM is in Very Serious Trouble
Will IBM last long enough for any "quantum" deliverables to become a reality?
The Register MS Took Money From Broadcom to Publish Fake 'News' With "AI" Mentioned 35 Times
not legitimate or authentic journalism.
GNU/Linux Approaching 20% in Georgia (the Country)
Usage of GNU/Linux was near 0%, as measured by statCounter, several years ago
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, August 06, 2026
IRC logs for Thursday, August 06, 2026
Gemini Links 07/08/2026: Radio Amateurism, Summer Updates, and Programming "Taste"
Links for the day