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

GAFAM (and Microsoft) Hiring Freeze, Even in India
Boohoo, as if we expect a company that tells 60,000 existing workers to leave would actively pursue new workers
 
Gemini Links 23/11/2026: Lungs Transplant, Androidification of Open Source, Gemini Protocol on the M5Stack CardputerZero, Slop Ban Hammer
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, November 23, 2026
IRC logs for Monday, November 23, 2026
Gemini Links 23/11/2026: Why Inline Links in GemText Are a Great Thing, Geminispace as Another Internet Revival, Dealing With Slop Scrapers
Links for the day
Links 23/11/2026: Slop Pyramid Scheme Reinstates Slop Pope and "Europe Needs to Save Itself"
Links for the day
IBM Does Not Need "Resource Actions" Anymore (IBM's Internal Euphemism for Job Cuts or Mass Layoffs), It Just Treats Staff Like "Zeroes" and Pushes Staff Out
IBM terms like "RAs" and "workforce rebalancing" (reduction) are just self-serving spin/optics
Harassment by Proxy in America - Part III - Perjury at the Human Rights Tribunal of Ontario (HRTO)
"I think [redacted] is trying to bait you into saying something about him so that he can complain to the police again."
linuxandubuntu.com (LinuxAndUbuntu) and anto.online Became Slopfarms
It's a big problem for the Web and on the Web
Links 23/11/2026: Fakecoins Creators Schmoozing the Democratic Party, "Your Life is Not a Lie", Nvidia Faces US Probe for False Accounting
Links for the day
Gemini Links 23/11/2026: Thanksgiving Week, Offensive and Defensive Pride, The Oppenheimer Alternative
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Sunday, November 22, 2026
IRC logs for Sunday, November 22, 2026
Intel: Bailed Out by American Taxpayers (Without Their Consent), Laying Off About 10% of Its Workers (Again)
Microsofters had killed Intel from within
Gemini Links 22/11/2026: Dungeon and Health Trauma
Links for the day
GNU/Linux and Apple Eat Microsoft's Lunch in New Zealand
GNU/Linux and ChromeOS grew this past year
Last Week for IBM RAs or Silent Layoffs Before It's "December" or "Holidays" and Hence Not Tactful to Announce Mass Layoffs
It seems unlikely that an RA will be talked about in December
Problems at Broadcom. It Rode the "Hey Hi Wave" for Years. Now the Shares Are Down From $500 to Less Than $300.
Buy popcorn, not Broadcom shares
Slop Bots Have Wrecked Analytics
The sad story of schestowitz.com
Richard Stallman (RMS) Still Manages People and Projects, Linus Torvalds Plays With Chatbots and Slop
Seems like a demotion for Torvalds
The Register MS "Charges 30, 50K Quid Minimum for Anything Involving an Advertiser"
It is circular
GPUs Don't Cost Much to Manufacture; Their Market Value is Set by a Cartel
Notice who's petitioning for Jensen to return to NVIDIA as CEO
Outages and 60,000 Workers Told to Leave: What Insiders Say About Microsoft and What Might Happen Next
trouble for Microsoft is only just beginning
Gemini Links 22/11/2026: No Antimemetics Division and Switching Gemtext Converters
Links for the day
Links 22/11/2026: Demonstrations in France Carry on and USPTO Surveillance With New Walls ("Patent Public Search Login Requirement: No More Anonymous Searching")
Links for the day
Links 22/11/2026: "The Bubble is Bursting" and "The Anthropic Bubble"
Links for the day
Andy Explains the 'Ritual' of Buy Nothing Day
old article about Buy Nothing Day
A List of Nadella's Accomplishments at Microsoft
Two weeks ago (exactly 2 weeks) everyone believed that Jensen was an excellent CEO too
Richard Stallman Gives a Talk in Guayaquil Tomorrow
Richard Stallman (RMS) is giving many talks in Ecuador, then he'll give several talks in Mexico as well
A Week After Microsoft Outages Windows is Measured at Only ~60% in North American Desktops/Laptops
Microsoft gives 2 more weeks for 60,000 of its own workers to announce they're leaving
Techrights Was Never a Political Site, It Deals With Mostly Technical Topics
There are people who try to weaponise politics to accomplish bad things inside or against the community
Harassment by Proxy in America - Part II - Decades of Misusing the Human Rights Tribunal of Ontario (HRTO)
We had seen this for quite some time
Techrights '30 Years Ago'
Don't mock people for still offering HTTP (not HTTPS-only) as an option
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Saturday, November 21, 2026
IRC logs for Saturday, November 21, 2026