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

Dr. Richard Stallman in Ada Lovelace Lecture Series 20 Hours From Now in Lucerne School of Computer Science and Information Technology (Rotkreuz)
Well-connected and affluent corporations want everything to be controlled by them, ranging from culture to words and news
 
Gemini Links 05/03/2026: Industrial Panettone, Cancel, and LLMs
Links for the day
It's Not "AI", IBM is Collapsing Due to Financial Difficulties, "All Small Country Offices Will Close"
IBM is in trouble. Insiders know it.
"AI Companies" Running Out of Money, GAFAM Layoffs Are Signs of Weakness, Not "AI Efficiency" or Novelty
In the past, this term ("AI") had another meaning and connotation
Libel/Defamation Law Does Not Exist to Cover up Crimes
The projection tactics are nothing new
Myanmar/Burma: Growing Acceptance of GNU/Linux, Big Losses for Windows
GNU/Linux has come close to 5% there
Without IBM, Microsoft Would Not Have Taken Off. Both Companies Need to be 'Taken Down'.
Maybe it's time to boycott IBM as well
'Former' Red Hat Staff Upset That Techrights Covers IBM Accounting Problems
Are we touching a sensitive subject at IBM?
Ubuntu is Controlled by a Youngster From the British Army (Background in Mass Surveillance), So One Can Expect Ubuntu to Not Respect Privacy
"Canonical is aware of the legislation and is reviewing it internally with legal counsel"
IBM Hates Computer Freedom. This Means Red Hat Too is an Enemy of Software Freedom.
A summary of Fedora's position when it comes to "attestation"
IBM Union Says Many IBM Layoffs in Europe, With Netherlands and Belgium Confirmed, Allegedly Italy Soon (200 Layoffs)
IBM's demise will harm Red Hat and already harms Red Hat, according to whistleblowers
Microsoft and Microsoft's 'Open' 'AI' Seeking Bailout From the Pentagon Means Brand Erosion
Microsoft and its offshoots growing more and more dependent on military ("defence"; "Department of War") budget
Another EPO Strike a Fortnight From Now, Local Staff Committee Munich (LSCMN) Shares 127-Page Document Explaining How Policies Impact EPO Staff
The Office is circling down the drain
Microsofters' SLAPP Censorship - Part 3 Out of 200: A More In-Depth Breakdown
presents the narrative in a less chronological and more logically coherent fashion
2026 Seems Like (Potentially) the Last Year of Slop Drowning News Sites
Sites that do so perish [...] It's getting hard to find slop in news sites which cover "Linux" because many gave up
Links 05/03/2026: New LexisNexis Data Breach Confirmed, "Goldman Sachs Head During Financial Crisis Says He “Smells” a Similar Crash Coming"
Links for the day
"Silent Layoffs" or "Forever Layoffs" at IBM and Red Hat (After Bluewashing)
Like every day (all day long) we can see people who leave IBM and say something that's based on a 'script'
Free Software Foundation (FSF) and Others Promoting String of RMS Talks, Starting Tomorrow in Lucerne School of Computer Science and Information Technology
Well done, FSF!
Links 05/03/2026: A Bet Against Substack, American Government Openly Hostile Towards Environment
Links for the day
Gemini Links 05/03/2026: Greed and Sentiments Shifting Against Slop
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, March 04, 2026
IRC logs for Wednesday, March 04, 2026
FSF Promoting Richard M. Stallman (RMS) Talk in Switzerland in Just Over a Day From Now
RMS may have more talks on the way
Why Slop Will Flop - Part IV - We've Seen the End of It
Some years ago they insisted blockchains would revolutionise everything
Android is Proprietary 'Linux' and It Becomes More Malicious Over Time, Google Only Delayed What It Planned All Along
Google is a proprietary software giant, GSoC is only a distraction and confusion
Links 04/03/2026: Scam Altman Causes Chatbot Sub Numbers to Plunge, "Stocks Drop as Inflation Risk Emerges"
Links for the day
Why Slop Will Flop - Part III - Our Relationship With Slop (and Yours)
I never - except inadvertently - "used" an LLM-based chatbot
Why Slop Will Flop - Part II - Devil in the Details
News sites or social control media sites which tolerate slop are digging their own grave
Simpler Means Faster
Do you know your bottlenecks?
Gemini Links 04/03/2026: About a Missing Symbol and "Good Manners"
Links for the day
The Register MS Takes Money From Chinese Surveillance Threat to Promote a Ponzi Scheme
"Sponsored by Huawei."
Nicaragua's GNU/Linux Usage Measured at Over 8% by statCounter
Nicaragua is a poor country, but it also has rich culture
Why Slop Will Flop - Part I - Slop Fatigue Prevalent
See, sooner or later people (audiences of colleagues) find out and as soon as they find out you are slopping, they will lose interest
Microsofters' SLAPP Censorship - Part 2 Out of 200: Detailed Timeline From 2012 (Attack on Reporters That Question Restricted Boot) to 2024 (Lawsuit Against Reporter and His Wife in Another Continent)
we reproduce a document produced 2 years ago to give people more context and more facts
Links 04/03/2026: "The EU moves to kill infinite scrolling" and a call to "Nationalize Amazon"
Links for the day
Coming Soon: Evidence of Abuse in Our IRC Network
IRC's freedom can sometimes be its 'weakness' if not properly guarded
High GNU/Linux Adoption in Brunei Darussalam
It's worth noting (or at least noticing) that Microsoft loses ground in some of the countries where the government contracts paid the most
Media Blackout Reducing or Preventing Press Coverage of Microsoft Layoffs in 2026
Worse yet, there will be gaslighting and deceit
GNU/Linux in Laptops/Desktops Still Matters, It's Likely the Only Way to Achieve Software Freedom
Software Freedom requires all sorts of things at the "OS level"
Gemini Links 04/03/2026: The Garnet Star, The Hunt, The SYN Attacks
Links for the day
The EPO's General Consultative Committee (GCC) Discussion Illuminates How Much Worse Things Have Gotten ("on Strike and Participated in the 'Meeting'")
a videoconference - not a physical meeting - discussed EPO policies
Free Software Foundation Supports Its Founder, Advertises His Talks in Switzerland
When you suppress voices, assuming the reasons for suppression are bunk, it is always bound to backfire very badly
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, March 03, 2026
IRC logs for Tuesday, March 03, 2026
Over 1,500 EPO Workers Went on Strike Last Week
a new publication which celebrates some accomplishments of industrial actions and calls for further actions
Madame Streisand Wanted to Censor The Web, Instead She 'Created' a New Term, "Streisand Effect"
It is basically an own goal
Solicitors Regulation Authority (SRA) Failed to Detect Fraud in Law Firms... Until It Was Too Late
Earlier today we contacted some more politicians about this and received mail from them as well
Our EPO and IBM Coverage Bears Fruit
In case insiders want to get in touch with us, please ensure or at least try doing so securely
Defending Women Isn't a Crime, Everybody Can Agree on That
Their culture is unlike ours
EPO "Cocaine Communication Manager" - Part VI - Influx of Spaniards and Portuguese Workers (+77%) at Europe's Second-Largest Institution, Led by the 'Alicante Mafia'
There is now data supporting this assertion, new and complete data in fact
Links 03/03/2026: "Scam Altman in Damage Control" and Oil Traffic Disrupted
Links for the day
Gemini Links 03/03/2026: Phones, LLMs, and Changes on the Web
Links for the day
Richard Stallman Confirms Talk in Bern Next Week
Dr. Stallman has just formally confirmed his third talk this month in Switzerland
Nobody is Safe at IBM (or Red Hat)
There is no job security at IBM
GNU/Linux at All-Time High in Guam
there are many computers in that island
Bad faith: Hugo Roy knew FSFE impersonating FSF before French tribunal, colleagues deceived
Reprinted with permission from Daniel Pocock
Microsofters' SLAPP Censorship - Part 1 Out of 200: Claim No. KB-2024-001270 in a Nutshell
abuse of process by a law firm working for an American who was arrested for strangling women and another American whose own spouse calls a "rapist"
When EPO Team Managers (TMs) Are Harassing People Who Strictly Apply the European Patent Convention (EPC) in Patent Examination
There are two strikes planned for this month
Confirmed: Using Slop Gets You Fired
Let the story of Benj Edwards be a cautionary tale
Links 03/03/2026: "No one wants to read your AI slop" and "chatbots in the kill chain"
Links for the day
EPO and "Equivalent to More Than 100 Days of Strike"
The industrial actions continue and already have a positive effect
Streisand Effect, the Microsoft Way
Microsoft has once again proven the Streisand Effect
Keeping Track of IBM Layoffs in March 2026
IBM depends on bribery
GNU/Linux Measured at 7% in Yemen
Windows is too hostile and dangerous
Links 03/03/2026: Security Breaches, Iceland Wants EU Membership, and "Wall Street–Backed Lawmakers Want to Help Banks Gouge You"
Links for the day
Queensland Health Payroll System: IBM billion-dollar-blowout inquiry
Reprinted with permission from Daniel Pocock
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, March 02, 2026
IRC logs for Monday, March 02, 2026
Gemini Links 03/03/2026: GrapheneOS and Keyboard Shortcuts
Links for the day