Author Archives: Scott Alfter

Two-Tier Justice

We are no longer a nation of laws:

Wesley Snipes – 3 years in prison for tax evasion.

Mike Sorrentino, Jersey Shore – 8 months in prison for tax evasion.

Ja Rule – 28 months in prison for tax evasion.

Darryl Strawberry – 3 months in prison, 3 months of house arrest for tax evasion.

Fat Joe – 4 months in prison for tax evasion.

Joe and Teresa Guidice – 4 years and 1 year in federal prison for tax evasion.

Heidi Fleiss – 37 months in prison for tax evasion.

Chuck Berry – 3 months in prison for tax evasion.

Richard Hatch – 51 months in prison for tax evasion.

Leona Helmsley – 4 years in prison for tax evasion.

Hunter Biden – No JAIL TIME

So no liberals, tax evasion crimes absolutely result jail time. Unless you are the crackhead son of the most corrupt administration in the history of this country.

On “insurrection”

Perhaps this would’ve been more timely closer to 6 January 2021, but it’s no less timely now that we have proof the government has been lying about the origins of the recent “pandemic” (among other things). The next time you hear some idiot in Congress, the White House, or wherever bleating about “insurrection,” keep this quote in mind:

We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.–That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed, –That whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and Happiness.

— Declaration of Independence

For how much longer will you consent to the current form of “governance?”

CH32V links and cheatsheet

A while back, I found this Hackaday article that led me down a rabbit hole of cheap RISC-V microcontrollers. This post will mainly be a link dump and random notes on making use of these devices.

An ffmpeg cheatsheet

I recently had some need to clean up the subtitles in some video files in my possession. It took a little while to track down the exact set of options to get it to do what I wanted it to do, so I’ve written them down here for future reference. This post may be amended from time to time to add more

Extract subpictures from file

The second number in the -map parameter selects the (zero-indexed) stream to extract. Use something like mediainfo to determine which stream to select, then issue something like this:

ffmpeg -i src.m4v -c copy -map 0:2 dest.en.sup

Subtitle Edit can read subpictures and convert them to text subtitles. As long as you have a .NET runtime available, it should work; I’ve run it on Windows 11 and Gentoo Linux. Its accuracy is pretty good, especially if you have it use one of the Tesseract OCR engines.

Extract text subtitles from file

ffmpeg -i src.m4v -f srt

“srt” can be replaced with several other formats (ssa, ass, etc.) if you want those. Depending on the source, there may be extra HTML formatting that you might want to use sed to filter out. If more than one subtitle stream is present, a “-map” parameter may be necessary to select the one you want.

Mux text subtitles into file

ffmpeg -i src.m4v -i -c copy -c:s mov_text -map 0:0 -map 0:1 -map 1:0 -metadata:s:2 language=eng -metadata title= dest.m4v

Assumptions: the desired video and audio are in the first two streams of the first file, and the subtitles are in English. (Audio language should already be set in that stream to whatever it is.)

“-metadata title=” will clear out the title string that might have been set in the original file.

Selecting tracks by language

Instead of needing to look up track numbers, it’d be nice to just specify the language(s) we want to include. That is possible, with something like this:

ffmpeg -i src.mkv -c copy -map 0:v:0 -map 0:a:m:language:ger -map 0:s:m:language:eng dest.mkv

This example selects German audio and English subtitles…useful for something like Das Boot or Deutschland 83. (Assuming that you like foreign shows in their original language with English subtitles, anyway…which I do.) These track mapping options should also apply in the preceding examples.

Extracting chapters from existing file

ffmpeg -i src.mkv -f ffmetadata src.metadata

This creates a file with chapter information (and possibly other metadata) structured like this:

title=Chapter 1
title=Chapter 2

Inserting chapters

A metadata file structured as above can be inserted into a file when it’s encoded:

ffmpeg -i src.mkv -i src.metadata -map_chapters 1 ...

Audio: transcode anything to AAC

This preserves metadata (including cover art)…tested with FLAC sources, but should work with others:

ffmpeg -i src.flac -c:a libfdk_aac -b:a 128k -c:v copy -disposition:v:1 attached_pic dest.m4a

On Trump and taxes

According to the Epoch Times, Donald and Melania Trump reported negative income in four of the six years’ worth of tax returns that were dumped. I’m sure the usual scumbags will try to make something of this, but as long as all the “I”s are dotted and “T”s are crossed, I don’t see anything at all wrong with this:

Anyone may arrange his affairs so that his taxes shall be as low as possible; he is not bound to choose that pattern which best pays the treasury. There is not even a patriotic duty to increase one’s taxes. Over and over again the Courts have said that there is nothing sinister in so arranging affairs as to keep taxes as low as possible. Everyone does it, rich and poor alike and all do right, for nobody owes any public duty to pay more than the law demands.

– Learned Hand