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

Universities Became Bad Places for Work
What happened to academia?
Microsofters' SLAPP Censorship - Part 11 Out of 200: Cannot Censor His Spouse, Accusations Are Repeated Today
He already has a history of threatening to sue gay people in America; he cannot take criticism too well
"Alternative to Microsoft Office" Must Use Free/Open Standards/Formats for Real Sovereignty
It would make sense for the EU to invest in its own workers and its own software projects, more so now that there are hostile countries both to the east and to the west
When Everybody Has a Right/Access to An Attorney/Lawyer (But Some Get Funding From Malicious American Corporations to Spend a Million Dollars on Many Lawyers and Several Barristers)
And send about 75 KG of legal papers to the residence of the "opponent"
 
Links 14/03/2026: Mass Layoffs at Facebook ('Meta') and Sweeping Layoffs at Twitter (xAI), Social Control Media and Slop Are Only Debt
Links for the day
Wrong Time, Wrong Place (Digg)
Kevin Rose and Alexis Ohanian can relaunch Digg.com, but we doubt it'll work "this time for real!"
Reporting New and Suppressed Information is What Journalism is All About
In the domain of Free software, there are very few sites out there that offer exclusive coverage on community affairs and there are many gagging/censorship attempts
The Limits of Speech and the Rationale of Limitations
it seems to be part of an international trend
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, March 13, 2026
IRC logs for Friday, March 13, 2026
Gemini Links 14/03/2026: Goodness, AD534 Multiplier Module, and Extroverts Online
Links for the day
Atlassian Corp: We're Doing Layoffs Because of "Hey Hi"; Wall Street: Atlassian Corp is Just a Failing Business
Don't ask "the media"
Price of Storage, Price of Energy... What Next?
EPO workers are going on strike because their salaries don't keep up with price increases and tech companies without connections in "the channel" face long delays, low availability, and high prices (no "bulk" purchases), which further solidifies monopolies.
Don't Forget Red Hat's RTO (Return-to-office) Layoffs
How many people still remember that Red Hat did the same thing?
Reminder: Microsoft silent Layoffs by RTO (Commute Time and Lack of Comfort/Work Satisfaction) Already in Effect This Year
It's difficult to measure how many employees have already "left on their own" due to the RTO policy
Founder of IBM Ventures Has Just Quit IBM
Some people leave IBM and many people 'leave' IBM
Signs of Impeding Mass Layoffs - Not Just Quiet Layoffs - at Microsoft
Beneath the surface there are waves of layoffs and even entire teams are let go
Career Science and Academia as Corporate Propaganda 'on Tap'
article about surveillance
Veteran GNU/Linux Journalist Jack Wallen Tries Geminispace and Likes It
It'll turn 7 some time soon
Scheduled Maintenance Tonight
There will be similar work early next week
IBM Has No Clue How to Integrate Companies Like Red Hat
IBM is failing to respect this company's culture
Fake Articles From Sites With "Linux" in Their Name/Domain Name
we can at least hope that linuxteck.com made a decision to quit slop
Links 13/03/2026: New US Weapons for Taiwan, Pakistan Air Strikes Hit Kabul
Links for the day
Gemini Links 13/03/2026: Exhaustion and Smartphone Addiction
Links for the day
Friday the 13th & Debian Developers afraid to nominate in DPL elections
Reprinted with permission from Daniel Pocock
Links 13/03/2026: Chatbot "Pentagon Contract" (Bailout) and Secret Service Ditches Slop Pusher
Links for the day
European Qualifying Examination (EQE) Being Reduced to Pieces of Papers One Can Buy, Patent System Rapidly Losing Its Legitimacy
Welcome to the "new Europe"
Priorities in 2026
2026 is an interesting year
Willis Towers Watson (WTW) Producing More Propaganda for EPO "Cocaine Communication Managers"
The Local Staff Committee The Hague (LSCTH) has this new paper about Willis Towers Watson (WTW) and its annual EPO-sponsored propaganda, pretending all is well when things are clearly dire
Head of Microsoft Office and Microsoft 360 is Leaving Microsoft Amid Problems and Mass Layoffs
Microsoft is like a "legacy" company
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, March 12, 2026
IRC logs for Thursday, March 12, 2026
Gemini Links 13/03/2026: "Someone to Take Over Antenna" and Random Seed/RNG
Links for the day
By Expanding to Advocacy of Ponzi Schemes and Bill Epsteingate (Sex Trafficking), Linux Foundation Revenue Grew to $220,730,594, But Salary of Linus Torvalds Not Even in Top 10 Anymore!
true!
In the Name of Transparency, Today We Show Our Defence and Counterclaim
already uploaded by the other side
IBM Cannot Even Do Payroll, Now a "Legitimate Target" of Iran
Missiles or not, it seems like IBM systems will be targeted more by cybercriminals
Links 12/03/2026: Heating Bills to Soar, "Banks in Gulf Evacuate Their Offices"
Links for the day
Gemini Links 12/03/2026: On Phone Anxiety and Bjorn "Looking for Someone to Take Over Antenna"
Links for the day
Cultification: best candidates avoiding Debian leader elections
Reprinted with permission from Daniel Pocock
Richard Stallman (RMS) et al Cited in 'Nature' (Journal/Site) Today, "CODE beyond FAIR"
Under Open Access
The Register MS, on Verge of Collapse, Keeps Promoting a Ponzi Scheme for China
Publishers that participate in this simply don't care about their readers
Overview of False Narratives and Lies Used to Lower Salaries at the European Patent Office (EPO), Abandoning Patent Quality and the EPC
Many of the latter slides are the same as Munich's
Links 12/03/2026: Atlassian Layoffs, GAFAN Covering up Slop-Induced Outages, "Age-verification in Operating Systems and the Internet"
Links for the day
The EPO's President, Who Covers Up Cocaine Use, is Trying to Suppress Communication Between EPO Staff Under the Guise of 'Privacy' (and in Defiance of a Court Ruling)
Why does Europe's second-largest institution: 1) curtail communication among staff (including union) and 2) go out of its way to avoid obeying a court order from ILOAT in Geneva?
Exactly One Week Before Next EPO Strike, Media Intentionally Not Mentioning EPO Strikes
One form of propaganda technique/s involves the systematic suppression of certain topics, or of particular "narratives"
Microsofters' SLAPP Censorship - Part 10 Out of 200: Showing Public Tweets is Not a Privacy Violation, But This Isn't About Justice, It's About Censorship
It's time to put a stop to this abuse of process (which is what the Judge deemed it to be last year)
Suicide of disgruntled employee? Bus fire at Kerzers / Chiètres, Switzerland, at least six dead
Reprinted with permission from Daniel Pocock
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, March 11, 2026
IRC logs for Wednesday, March 11, 2026
Gemini Links 12/03/2026: "on Urbit" and the True Cost (or Criticism) of "Social Control Media"
Links for the day