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

Enjoy the Giving/Sharing, Not Taking
We've long supported what we believed in, even with the little money we had
SLAPP Censorship - Part 190 Out of 200: Plagiarism, Back Doors, and Sabotage of Linux
This can go on for a decade or longer
 
Links 20/09/2026: "Google Now Asking For Users’ Video Selfies" and Energy Prices Set to Rise
Links for the day
Links 20/09/2026: Amazon Layoffs, Flock 'Buyouts' (Silent Layoffs)
Links for the day
USCIS and Microsoft Rumours: Curbs on Lowering Salaries by Importing Cheaper Replacements?
It seems like Microsoft's mass layoffs and efforts to cheapen the workforce face obstacles
Gemini Links 20/09/2026: "Music While Working" and Radio Silence
Links for the day
Clownflare Data From Canada
We've like to think many people are attempting to install GNU/Linux over the weekend
Linux Kernel Becoming a Slopfest - Part 5 - Kernel Dependency on Plagiarism Giant Microsoft is a Death Blow to Any Kernel
Microsoft is bringing copyright-infringing slop into Linux
GNU/Linux Has Grown a Lot Lately
Based on Clownflare
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Saturday, September 19, 2026
IRC logs for Saturday, September 19, 2026
Links 19/09/2026: Many Patents Become Candidates for Annulment and Linux [sic] Foundation Takes More Slop Money to Promote Malicious Bots
Links for the day
Gemini Links 19/09/2026: The Fundamental Human Assets, The History of Gopher's "i" Type, and ROOPHLOCH 2026
Links for the day
Links 19/09/2026: "OpenAI and Microsoft Knew They Were Starting a ‘Doom Loop’ [of Mass Plagiarism 'Normalised' by Brute Force] for the web", Calling It "Hey Hi"
Links for the day
8 Series Going on at the Moment in Techrights
4 series about SLAPPs and related matters
Linux Kernel Becoming a Slopfest - Part 4 - Outsourcing to Microsoft, Approaching 10 Gigabytes
Can we blame Microsoft for those DDoS attacks? Partly.
SLAPP Censorship - Part 189 Out of 200: A Terrible Idea to Condemn Projects for Using Slop 'Code' When Your Own Employer Does This (and Profits From Every Company Doing So) or to Call Distros 'Not Secure' While You Advance Back Doors
"I don’t want a back door. I want a front door."
Software Freedom Day 2026 is Today, Week-long Celebration in Brazil
In Brazil, Clownflare reckons about 1 in 20 laptops/desktops might use GNU/Linux already
Red Hat Lost 2,000 Staff (Net Loss)
Maybe by year's end it'll be a 20% reduction
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, September 18, 2026
IRC logs for Friday, September 18, 2026
Gemini Links 18/09/2026: Setting Goals, Tiredness, and Admissions From LLM Purveyors It Was All Along About Building Plagiarism Engines Sold as "Intelligence"
Links for the day
Links 18/09/2026: Microsoft Boasted Slop is Just Copyright Infringement/Plagiarism, Floods in Europe
Links for the day
Slop Ruins Development and Reverse Engineering, It Rewards Retarded "Slop Kiddies" (to Quote Andy ‘TheFlow0’ Nguyen)
Slop is just a fatal cancer that kills the body, then dies with the body it killed
Internet Relay Chat (IRC) and Mailing Lists Are Still Better Than Discord, Slack, and Discourse
Discourse is "open" "bossware"
Links 18/09/2026: Disgust Over LLMs and Why "Agents" (Bots) Are Nothing More Than "Spam"
Links for the day
Software Freedom Day is Tomorrow
events coming
Illegal and Unconstitutional Tribunal That SLAPPs Critics Does the Illegal and Unconstitutional: It "Rubberstamps Software Patents"
This is not a legal system. This is mafia.
Privilege in 'Linux' Foundation (Double Standards) and What the FSF Should Avoid Doing
If RMS can talk about politics, others too should be able to talk about politics
Seems Like Many Microsoft Layoffs Are Going On Right Now (Forever Layoffs)
Like IBM, Microsoft hopes shareholders will not know of morale and financial problems
More Threats From the Person of Restricted Boot Infamy
Remember this is the man who is the principal purveyor of restricted boot and who landed restricted boot in Linux
Snooping EPO Management, Sniffing Up Every Staff Action
It this a problem for whistleblowers? Of course.
Don't Do That
Options do exist. People should exercise freedom.
Iran Has Debunked GAFAM and Cloud Computing as Safety of Data
Cloud of smoke?
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, September 17, 2026
IRC logs for Thursday, September 17, 2026
SLAPP Censorship - Part 188 Out of 200: Used, Then Discarded, by Microsoft (as We Predicted All Along, It's Always Like That)
The longer they carry on with it, the more scandalous this will get
Linux Kernel Becoming a Slopfest - Part 3 - Besieged by LLM Bots, Now Hiding Behind a Wall of JavaScript
The series began 3 days ago
Gemini Links 18/09/2026: Modern Linguistic, Boxing, Turning 40, and Solar MiniServer
Links for the day