eye

Hello!

Welcome back my friends
To the show that never ends!
We're so glad you could attend
Come inside, come inside!

— Emerson, Lake & Palmer, Karn Evil 9 (1st Impression, Part II)

Hi there!

If you're reading this, you're probably just looking at my journal, perhaps even thinking about adding me as an LJ-friend; or alternatively, perhaps I just added you as an LJ-friend, and you're curious about me now. In either case, I'd like to use this opportunity to say a few things.

Trevor: You're skating the edge.
Æon: I
am the edge.

— Æon Flux

First of all, I tend to write freely about topics everything that matters to me; more distanced, "professional" entries may directly be followed by more personal ones (and vice versa), and I will, generally, openly write about all sorts of things, including philosophy, sexuality, politics and more. Some of my entries will be friends-only, others will be publicly viewable, too, and unlike other people, I don't use <lj-cut /> tags or specific "topic filters" (i.e., custom friends groups dedicated to specific topics) to shield people from things they may not want to see.

Well, as long as it's text, that is; I will cut images that aren't safe for work etc. (at least if I remember, which I might not always do!), since I wouldn't want for people to get in trouble if their boss happens to be shoulder-surfing at work. Text, though, is a different issue, and if you'll get into trouble for reading about certain topics at work, you probably shouldn't be checking your friends page at work to begin with.

He said, "I am told that when men hear its voice, it stays in their ears, they cannot be rid of it. It has many different voices: some happy, but others sad. It roars like a baboon, murmurs like a child, drums like the blazing arms of one thousand drummers, rustles like water in a glass, sings like a lover and laments like a priest."

— Mike Oldfield, Amarok (liner notes)

Second of all, concerning friending me: feel free to. There is no need to ask if it's OK to do so; everyone's welcome to, as well as to post comments etc. (as long as they're genuine: spammers etc. will not be tolerated, but that goes without saying, anyway). I may add you back if your journal looks interesting or if I know you, too, but this isn't automatic. If you do want me to add you back, engaging me and talking to me is probably the best way to go about it.

Please don't ask about being added back if I didn't do so on my own, either, unless I already know you well and you want to be able to read my non-public entries.

If I already friended you but you don't know who I am and haven't been in contact with me before, that most likely means I became aware of your journal somehow, took a look, and decided I wanted to keep up with what you're writing — "I find your ideas intriguing and wish to subscribe to your newsletter", as it were. I don't expect you to friend me back or otherwise take an interest in me, but if you do — all the better.

If what it is to be furry you still don't comprehend
Then consider this advice, my curious friend
If you're willing to respect that which you don't understand
Then come take my paw and I'll take your hand.

— from "Furry", by Croc O'Dile of TigerMUCK with help from Tony DeMatio, June 1995

Regarding commenting, BTW, I'm always happy to receive comments. However, things like "lol" are not proper punctuation, and correct spelling and grammar would be nice as well. And of course, I expect people to not be insulting or rude, but that, again, should go without saying.

That's about all I can think of for now. If you have any questions, feel free to ask.

eye

Using ffmpeg to convert MP4s to GIFs

"GIF" has become a bit of a misnomer in recent years, with various services referring to any animated image as a GIF even when it's not in GIF format (Telegram, looking at you) — if you find yourself having saved a "GIF" that's really an MP4 and you want to convert it to an actual GIF, ffmpeg can help you, assuming you know how to use it:

$ ffmpeg -i input.mp4 -vf "split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" output.gif
ffmpeg version 4.2.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200523
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.101
  Duration: 00:00:05.76, start: 0.000000, bitrate: 237 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x360 [SAR 1:1 DAR 4:3], 235 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> gif (native))
Press [q] to stop, [?] for help
Output #0, gif, to 'output.gif':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.29.100
    Stream #0:0(und): Video: gif, pal8, 480x360 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 100 tbn, 25 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc58.54.100 gif
[Parsed_palettegen_1 @ 0000000004839f00] 255(+1) colors generated out of 1322 colors; ratio=0.192890
[Parsed_palettegen_1 @ 0000000004839f00] Dupped color: FF1A211C
[Parsed_palettegen_1 @ 0000000004839f00] Dupped color: FF5B625B
[Parsed_palettegen_1 @ 0000000004839f00] Dupped color: FF646965
frame=  144 fps=133 q=-0.0 Lsize=    4653kB time=00:00:05.73 bitrate=6652.5kbits/s speed=5.31x
video:4653kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000420%
$ 

The key thing here are the video filters (-vf). You (probably) want an optimal palette for your GIF; ffmpeg can both generate and use palettes, but you'll have to use a filter network: split creates two copies of the input, one of which (s0) is fed to palettegen; the other copy (s1) and the palette produced by palettegen (p) are fed into paletteuse (which, for obvious reasons, needs both a movie and a palette to use).

Whew!

eye

HTTP Live Streaming downloads

If you're finding yourself wanting to save a video that's available on the web, but only served in the form of a bunch of TS files over HTTP Live Streaming (HLS), you may want to take a look at m3u8downloader. It's a command line tool, but you really only need to have Python installed, and it also works on Windows just fine, though you may have to hunt for the executable after installing it (it'll likely be in %APPDATA%\Python\Python38\Scripts, with the obvious adjustment if you're using a different Python version).

Using it is easy enough, too:

$ /path/to/downloadm3u8 'http://example.com/path/to/playlist.m3u8' -o outputfile.mp4
2020-08-27 13:47:04,326 INFO     chose resolution=1920x1080 uri=[...]
2020-08-27 13:47:04,570 INFO     http links rewrote in m3u8 file: [...]
2020-08-27 13:47:04,851 INFO     playlist has 627 fragments
2020-08-27 13:47:31,846 INFO     [ 2%]  10/627 fragments fetched
2020-08-27 13:47:58,210 INFO     [ 3%]  20/627 fragments fetched
2020-08-27 13:48:23,242 INFO     [ 5%]  30/627 fragments fetched
[...]
2020-08-27 14:13:24,966 INFO     [97%] 610/627 fragments fetched
2020-08-27 14:13:47,360 INFO     [99%] 620/627 fragments fetched
2020-08-27 14:13:48,842 INFO     100%, 627 fragments fetched
2020-08-27 14:13:48,898 INFO     media playlist all fragments downloaded
2020-08-27 14:13:48,898 INFO     Running: ['ffmpeg', '-loglevel', 'warning', '-allowed_extensions', 'ALL', '-i', '[...]', '-acodec', 'copy', '-vcodec', 'copy', '-bsf:a', 'aac_adtstoasc', '[...]']
2020-08-27 14:14:38,030 INFO     mp4 file created, size=2202.1MiB, filename=[...]
2020-08-27 14:14:38,030 INFO     Removing temp files in dir: "[...]"
2020-08-27 14:14:38,410 INFO     temp files removed
$

You'll need the path to the M3U file, of course; the easiest way to get that is probably to use your browser's DOM inspector and peek at the network traffic. If you have the video's page loaded but not started playing the video, the M3U file should be one of the first things being loaded after you click "Play", and you can copy its URL then.

eye

Firefox tracking protection vs. GMail

If you find yourself unable to access GMail in a recent Firefox version, with a message indicating an infinite redirect loop and advising that this may be due to refusing cookies — check Firefox's settings to se whether you've got the (relatively new) tracking protection enabled for all sites.

If you do, disabling it or setting it so it'll only apply to private windows should fix the problem. (There's probably a way to disable it on a per-site too, I've not checked yet.)
eye

The Top Ten Things That Sound Dirty In Golf But Aren't

Here you go:

  1. Nuts … my shaft is bent.
  2. After 18 holes I can barely walk.
  3. You really whacked the hell out of that sucker!
  4. Look at the size of his putter!
  5. Keep your head down and spread your legs a bit more.
  6. Mind if I join your threesome?
  7. Stand with your back turned and drop it.
  8. My hands are so sweaty I can’t get a good grip!
  9. Nice stroke, but your follow through has a lot to be desired.

And the number one thing that sounds dirty in golf but isn't:

  1. Hold up … I need to wash my balls first!

(N. B. — if the above list does not go from 10 to 1, use a non-stone age browser.)

eye

Rainbow's Street

It is my learned opinion that Bubbi (that is, Bubbi Morthens) is an absolute genius, one of the greatest singer-songwriters who has ever lived; but he only works in Icelandic, and as a result is virtually unknown outside Iceland.

Image: via Youtube

One of his newer songs (not that it's that new anymore by now either) is Regnbogans Stræti, or Rainbow's Street; I find this so touching every time I listen to it that I tried to translate it into English.

That's from one language that isn't my first into another that also isn't, so bear with me. This is only a first version anyway, and has various rough edges left, but it's at least good enough to post it. If the meter sounds off, keep in mind that this is intended to be sung to the song's melody, and read it accordingly — i. e., listen to the song, and read (or sing) along.

It's a truth in life, my friend, that men tell lies
Let their hope fly, that from days of youth it soars.
Some must stand on bridges under distant skies
Only breathing free on unreached distant shores.

They never give up, even though it's fear they meet
On the byroads of Rainbow's Street.

There are men who yearn for truth, and men who hate,
A man who cannot stand the truth, he never sees.
Some inherit their forefathers' unjust fate,
While others yet find happiness and peace.

It is said that reconciliation will meet
All men at new dawn, on Rainbow's Street.

Show me love in the embrace of a blue night,
Bid me welcome as you would a book of old,
Read long ago – by a window open slight –
When in your bosom deep did passion's scroll unfold.

I trust that one day, freedom you will meet
Under the tree crowns on Rainbow's Street.

You long for love's warm glow in ways ill understood
Your eyes, they smile, but your heart cries burning tears
Life keeps your secret well-protected, hidden good
But the cry of pain is ringing in your ears.

I know that justice will put down both feet,
And plead your case, on Rainbow's Street.

They put a price on care and tenderness and wrapped
Freedom's head with thorns, they laughed as hate they sowed,
They devalued words, broke them 'til they snapped,
And likened freedom to a venomous toad.

And they tripped up truth, right off its feet —
Sorrow, too, is found on Rainbow's Street.

Constant thirst stalks us, as of its own accord,
Familiar pain leaves us tired, scared, alone,
And we long for naught but love, the only ward,
Though most bang their heads on cold unmoving stone.

For those that suffer there will always be a seat,
If their paths take them to Rainbow's Street.

Our every wish waits for the Rainbow, without end,
For those enduring pain and suff'ring, mild and meek,
Their love's a monument to men, my gentle friend,
Who have always merely turned the other cheek.

In Seyðisfjörður, at night, light on their feet
A few young men painted Rainbow's Street.

We are born, we grow older, and we die
Will cold lips by unspoken words be tainted?
Will our travels' last companion be the lie?
Will it be an outstretched canvas yet unpainted?

It is said in your last dying breath you meet
yourself, — on Rainbow's Street.

The meter doesn't always stick exactly to the Icelandic lyrics', but then the lyrics are not strictly set to a specific meter anyway. All the translation can be read in such a way as to flow well, and I hope this'll be its natural reading too.

EDIT, 2020-08-03: made a few tweaks here and there to make it flow better.

eye

Recoding videos with ffmpeg

It's easy. To only recode the video stream (using HEVC/H.265/libx265 in this case), do this:

$ ffmpeg -i infile.mp4 -c:v hevc -c:a copy outfile.mp4

To also encode audio (using AAC), do this:

$ ffmpeg -i infile.mp4 -c:v hevc -c:a aac -b:a 192k outfile.mp4

In either case, “-c” stands for “codec”, while “-b” stands for “bitrate”. To find out what codecs a file currently uses and what the bitrates are, use

$ ffmpeg -i infile.mp4

I don't usually recommend reencoding audio; you'll get a noticeable quality loss without saving much in terms of file size. Video, on the other hand …

eye

Surly colors

I'm quite amused by the various colors Surly offer their bikes/frames in. Here's a handy list of colors past and present, culled from their website:

  • Andy's Apple Red
  • Army Green
  • Banana Candy Yellow
  • Battleship Gray
  • Beige Pantsuit
  • Black
  • Black Forest
  • Black Matte
  • Blacktacular
  • Bliolet
  • Blue
  • Blue Monday
  • Blue Porta Potty
  • Blue Suit of Leisure
  • Blueberry Muffin Top
  • Bruised Ego Purple
  • Cakipants
  • Calimocho Red
  • Candied Yam Orange
  • Canvas Green
  • Cash Black
  • Cold Slate Blue
  • Cromwell Green
  • Cuba Libre
  • Dark Black
  • Dark Black 2X
  • Dark Side of the Maroon
  • Diving Board Blue
  • Dream Tangerine
  • Drink More Yellow Water
  • Forest Green
  • Frost Blue
  • Get Gone Maroon
  • Get In Green
  • Glitter Dreams
  • Gloss Black
  • Grandma's Lipstick
  • Grandpa's Thermos
  • Grape Soda
  • Grassy Green
  • Gray Haze
  • Gray Sweatpants
  • Green Astro Turf
  • Hi-Viz Black
  • Hot Mayonnaise
  • Illegal Smile
  • Jack Frost Blue
  • Lemon Lime Soda
  • Magma
  • Metallic Lilac
  • Milque
  • Ministry Gray
  • Mint
  • Mint Green
  • Monkey Butt Red
  • Moonlit Swamp
  • MRE Green
  • Mule Mug
  • My Milkshake
  • Norwegian Cheese Brown
  • Pea Lime Pie Soup
  • Pea Lime Soup
  • Pepto Pink
  • Perry Winkle's Sparkle
  • Pickled Beet Red
  • Pile of Bricks
  • Plutonium Sparkle Green
  • Prickly Pear
  • Rainbow in the Dark
  • Red Flake
  • ,,Rhymes With`` Orange
  • Robbins Egg Blue
  • Rover Brown
  • Sage Green
  • Salmon Candy Red
  • Salt Shaker
  • Smoggy Pearl
  • SolidGold Gold
  • Spray Tan
  • Stand Back Purple
  • Stash Green
  • Static Sunset
  • Steve's Pants Blue
  • Stoned Ground Mustard
  • Stray Hair Gray
  • Tan Cargo Shorts
  • Tangled Up in Blue
  • Tanish Gray
  • Tank Green
  • Thorfrost White
  • Titanium Sand
  • Toxic Tangerine
  • Tractor Time
  • Trevor's Closet Black
  • Urban Degray
  • Wet Clay
  • Yellow
  • Zinc

Some of these I sound less than appealing (say, Hot Mayonnaise or Sweatpants Gray), but some are quite clever, such as Rainbow in the Dark (which is actually black), or ,,Rhymes with`` Orange (I can hear Zecora groan somewhere out there). Dark Black also amused me, just because it suggests that there is such a thing as "light black", and Norwegian Cheese Brown — well, not a color I'd want my bike to be, but it really did look like brunost (which is quite tasty BTW). I'm not sure what to make of Drink More Yellow Water, but I'd definitely take My Milkshake … for the name anyway. :)

eye

Congrats

Congratulations Guðni Th. Jóhannesson on being reelected president of Iceland!

Quite an astounding result too — if this had happened in Russia all the media would be saying it's proof that the election was a sham and that this doesn't happen in democracies. But it does. :) And Guðni's been a good president IMO, so I'm happy to see him re-elected, and I'm glad that so many others agreed.

Til hamingju Guðni!