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

Mass Layoffs at IBM, But Mostly in Secret (PIPs and 'Voluntary' Redundancies)
Gerstner laid off a record number of people; Krishna tries to find 'innovative' new ways to cause workers to leave
 
SLAPP Censorship - Part 158 Out of 200: Making Alliances With Men Arrested for Strangling Women Was Always a Terrible Strategy
They work for American slop companies
Links 22/08/2026: TikTok Settles With Feds, Harms Caused by Social Control Media Gaining Attention
Links for the day
New Data Shows Microsoft's XBox is Really Dying
XBox is a "burning platform"
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Friday, August 21, 2026
IRC logs for Friday, August 21, 2026
Sources-First Publication
Thank you for keeping us on track
Ubuntu is Not Linux
I was one of the first users of Ubuntu
Links 21/08/2026: Outrage Over Politicians Who Support Slop-Feeding Data Centres, "America Is About to Get More Expensive"
Links for the day
Gemini Links 21/08/2026: Rain Coming Back and "Small Internet"
Links for the day
Slop-ware: Nobody Knows What Code Goes Into Linux and Most Developers Cannot Understand the Rust Code (Even If They Tried)
So nobody is in charge
The Slop Pyramid Scheme (Not Boon!) Isn't Good for GNU/Linux, Even If the Plagiarism Engines (Framed as "Training" or "Intelligence") Almost Always Run GNU/Linux
We need the slop pop - we need the bubble to pop
North America: GNU/Linux Measured at 13%-15% Every Night
many (north) Americans use GNU/Linux at home and are using it to access the Web in the small hours of the morning
Links 21/08/2026: "Silicon Valley’s Billionaire Cults Are Coming for Democracy" and "Who’s Raking it in as the National Debt Explodes?"
Links for the day
SLAPP Censorship - Part 157 Out of 200: What is a 'Defamation Troll'?
"Defamation Mill" also
Northern Europe Leads the Pack in Abandoning Windows After Threats Made to Greenland (Says Clownflare Data)
Clownflare has a vast trove of data, so it cannot be easily dismissed as pure nonsense
Clownflare: In Past 12 Months Microsoft Windows Fell From ~80% to ~75% on Desktops/Laptops in Asia
Microsoft is deep in debt
Secret Layoffs at Microsoft, Apparently More Sites Will Shut Down Entirely
vindicates us and serves to affirm what we've said for over a month
The State of Slopfarms About "Linux" in August 2026
The Web needs serious cleanup, which curation can help deliver
IBM Offers Workers Some Money to Fire Themselves, It's Called "Next Step" and It's Allegedly 'Extended' (Not Enough Fools Have Fired Themselves)
Will IBM executives - including the CEO - ever be held accountable?
£5 Million Unsolicited/Undisclosed Bribes and What That Means to British Politics
It still remains unknown (disclosure denied) who helps fund the £1 million lawfare against us
[Satire] Pocock, Binface & nobodies vs Farage: defamation before UK High Court
Reprinted with permission from Daniel Pocock
The IBM Censorship Team, PIPs (Silent Layoffs) in IBM Europe
There seem to be many de facto layoffs going on at IBM right there
SLAPP Censorship - Part 156 Out of 200: Brett Wilson LLP Becoming Wilson FC
Now acting almost like one-person shop (lots of staff has fled this past year)
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Thursday, August 20, 2026
IRC logs for Thursday, August 20, 2026
Gemini Links 21/08/2026: "Ensmallening the BigWeb", "Rust Dependencies"
Links for the day
Links 20/08/2026: 'Linux' Foundation Promoting Slop Hype for Money (Hype as a Service), Malaysia’s Exports Jump 38% Year-on-Year
Links for the day
Gemini Links 20/08/2026: A "Break From Routine" and "Modem Was the Problem"
Links for the day
Clownflare Reckons GNU/Linux is on Almost 1 in 10 Laptops/Desktops in Western Europe
Western Europe and China are leaving more of GAFAM behind them
Looking Ahead at September
Rianne and I look forward to a productive September
Links 20/08/2026: Facebook "Ran Ads for an App That Promised to Nudify Female Politicians" and Facebook Faces "Social [Control] Media Addiction Trial"
Links for the day
Clownflare Sees GNU/Linux at 16% Market Share on Desktops/Laptops in Tajikistan
in Tajikistan it seems like adoption of GNU/Linux is exceptionally high, based on a very large data set associated with Web access
The Demise of Social Control Media Continues
Entering (anew) social control media in 2026 seems foolish
SLAPP Censorship - Part 155 Out of 200: Throwing Stones in Houses Made of Glass
character-assassination-as-a-service
Gemini Links 20/08/2026: Planners, Pantsing, Vinylyssee
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, August 19, 2026
IRC logs for Wednesday, August 19, 2026