Bonum Certa Men Certa

Self-Hosting Videos With Free Formats and Animated Previews, Watermarks/Logos and Translucency

Summary: We examine the power of video editing with ffmpeg, chained with command-line scripting and HTML5 features

The Web is a powerful platform -- to the point where it's a little 'too' powerful if put in the hands of malicious actors. But we're still using the Web by default; it's just what most people use. Video functionality on the Web improved a lot over the years, putting aside DRM/EME. So let's explore what we can accomplish with some command-line scripting and ffmpeg.



We're always trying to encourage digital autonomy, which is why we adopt self-hosting whenever possible. This includes videos. For the sake of example, in this post we use an old video about Gemini proxies. It was picked at random, no special reason at all. None.

Extracting bits of the video with ffmpeg isn't hard (check the official ffmpeg Web site; their documentation explains the pertinent options, which should be changed depending on the video):

ffmpeg -ss 600 -t 5 -i gemini-proxies.webm -vf "select=not(mod(n\,1)),fps=10,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 roy-talks.gif

This gets us started:



To add the resultant preview (known as "poster") to the video, consider using the following, based on the above example: poster="http://techrights.org/wp-content/uploads/2021/04/roy-talks.gif"

This attribute belongs in the <video> element as it is part of the standard.

Add the watermark/logo with ffmpeg:

ffmpeg -i roy-talks.gif -i mogz-video-poster-4-small.png -filter_complex "overlay=0:H-h--1" -codec:a copy roy-talks2.gif

We use artwork prepared by Mogz for us.

These two passes may be lossy and maybe possible to combine rather easily, but splitting it into two stages aids simplicity. Here it goes:



For center: overlay=(W-w)/2:(H-h)/2 Top left (with 5 pixels of padding): overlay=5:5 Top right: overlay=W-w-5:5 Bottom right: overlay=W-w-5:H-h-5 Bottom left: overlay=5:H-h-5

With improved quality and translucency:

ffmpeg -i roy-talks.gif -i mogz-video-poster-4-small.png -filter_complex "[1]format=rgba,colorchannelmixer=aa=0.7[logo];[0][logo]overlay=0:H-h--1:format=auto" -codec:a copy roy-talks2.gif



The above scripts are possible to chain together and variables can be used, too. Let's change the time to one minute from the start (-ss 60) for a duration of 2 seconds (-t 2):

VIDEO_FILE='gemini-proxies' ffmpeg -ss 60 -t 2 -i $VIDEO_FILE.webm -vf "select=not(mod(n\,1)),fps=10,scale=480:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 intermediate.gif ffmpeg -i intermediate.gif -i mogz-video-poster-4-small.png -filter_complex "[1]format=rgba,colorchannelmixer=aa=0.7[logo];[0][logo]overlay=0:H-h--1:format=auto" -codec:a copy $VIDEO_FILE.gif

Of course it is also possible to use loops and batch-process many files in this way. Welcome to the power of GNU/Linux.



Voila. The translucency is easier to see because of the mug of coffee.

Recent Techrights' Posts

SLAPP Censorship - Part 136 Out of 200: Lawyers That Get Paid to Mess About
They were already outnumbered and understaffed
 
The Cyber Show on the Slop Bubble
new article about the implosion of the slop bubble
Links 01/08/2026: New York Times Trying to Inflate the Slop Pyramid Scheme (at Cost to Its Own Reputation) and "Iran Appears to Be Blasting Amazon Data Centers Off the Map"
Links for the day
Positive Political Momentum
Daniel Pocock is taken seriously by many people who contact us privately
Google "AI" is Plagiarism, the Case of Richard Stallman (RMS)
Why would anyone choose LLM slop over the originals, curated and fact-checked by domain experts?
Explaining That Software Patents Are Neither Legal Nor Desirable
Many of our readers work in the legal sector
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, July 31, 2026
IRC logs for Friday, July 31, 2026
Gemini Links 01/08/2026: Retirement, Bike Trips, Quake Stuff, Usenet Reborn
Links for the day
Links 31/07/2026: Microsoft Now Says Slop is Bad (LinkedIn Cracks Down on It), LinkedIn Narrows Down Size (No Expansion)
Links for the day
European Patent Office (EPO) Series: From Alicante to Munich: Another Smooth Ride
Campinos is intent on transforming what was originally envisaged as a temporary public office into his own permanent personal feather-bed
Daniel Pocock and the Important Observation About Threats of Cult-Like Behaviours (No Rationality, No Reason, Just "Mob Rule")
It's a threat to Europe's sovereignty
The "PIP Parade" of IBM's Lousy Management, Which Said "Blockchain" Was the Future
In a healthy company such a CEO would be punished for utterly wrong visions and predictions. Not at IBM...
SLAPP Censorship - Part 135 Out of 200: Limited Liability Partnership (LLP) That Does Not Disclose Financial Activities Before August
It certainly looks like they keep losing the remaining women that still exist in the firm
Links 31/07/2026: "Climate Cover-Up Continues" and Pesticides "Cook the Planet"
Links for the day
Datacentre 'Boom' Sceptics Aren't Luddites, They Recognise a Threat to Human Survival (Not Limited to Climate Change)
Archaeologists very well know that no species will survive forever
Microsoft's Claims Are Based on a Big Lie
the bubble is coming to its hard limits
Don't Lose Sight of the Impact of "End of 10" (Vista 10)
GNU/Linux has taken off fast
Microsoft's Debt Continues to Steadily Increase, Not Counting Hundreds of Billions in Secret/Hidden Debt
The mass layoffs will carry on, maybe labelled LITE
IBM is Circling Down the Drain, the 'Growth' Comes From Beancounting Tricks and Salary Cuts
IBM was down 2.17% yesterday
Microsoft's "Headcount" Distracts From How Big a Cull It Had This Month
It also speaks of numbers "[a]s of June 30" though the "buyouts" were effective July 1 and since then well over 10,000 workers have vanished
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, July 30, 2026
IRC logs for Thursday, July 30, 2026
Gemini Links 31/07/2026: Music, Journaling, and Longing
Links for the day
More Fake News From (and for) IBM, Nobody Ever Held Accountable for Fraud
Companies that turn a blind eye to their own corruption end up recruiting more corrupt people and sacking those who object to the corruption
Links 30/07/2026: Smol Document Server and More PalmOS-ing
Links for the day
Links 30/07/2026: Microsoft Refuting Its Own Slop Hype and "Amazon Is Gutting Its Hey Hi (AI) Division" (GAFAM Bubble)
Links for the day
Today The Register MS Published "AI" Spam and Fake Article by "Senior Technical Marketing Engineer"
unethical practices
Cult inquiry parliament leak fallout
Reprinted with permission from Daniel Pocock
Techrights Will Always Protect Sources
Our #1 priority is sources
European Patent Office (EPO) Series: Legal Concerns and Suspicions of Irregularities
complaints submitted to OLAF
The Era of Silence
So stay silent, remain hidden
GAFAM and IBM Dying in Massive Debt, Hence the Mass Layoffs (Increasingly Silent Layoffs That the Media Fails to Mention)
the integrity of this economy is only as good as its leaders or those who govern the market
TheLayoff.com Deletes Comment That Called IBM's Previous CEO, Ginni Rometty, "Gin 'n Tonic"
It is hard to believe the comment was deleted for being a duplicate (in another thread)
The Mainstream Media Continues to Overlook or Intentionally Ignore Hundreds of Billions in Hidden/Secret Microsoft Debt
the issue is that Microsoft's crisis is a lot greater and broader than this
SLAPP Censorship - Part 134 Out of 200: What "Majority Rules" Tell Us About the Litigant
we press on with this series
Overshoot Day Sites That Contribute to the Problem
Some of these are not even accessible (at all) without JavaScript
Microsoft May Have Gotten Rid of 8% of Its Workforce This Month
It's hard to know what's really going on because there's no transparency due to NDAs
Links 30/07/2026: "Age of Irrationality", Google Losing Money, and "House of Ellison is on the Brink"
Links for the day
Gemini Links 30/07/2026: Homeworlds Notes and Manuscript Submitted
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, July 29, 2026
IRC logs for Wednesday, July 29, 2026