ffmpeg weirdness

Dear Lazyweb,

I have a weird MKV file that has 3 chapters in it, but I can only get ffmpeg to extract video from one of them: it can't access the intro or credits.

When playing it in VLC, it by default plays with "Playback / Title / Segment 1 [20:18]" selected, which is the middle part, skipping intro. The "Playback / Chapters" menu is grayed out. If I select "Playback / Title / Segment 0 [23:54]" then "Playback / Chapters" lists all 3 and they are playable.

ffmpeg -i shows:

  Duration: 00:20:18.72, start: 0.000000, bitrate: 5334 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 118.660000
      Metadata:
        title           : Opening
    Chapter #0:1: start 0.000000, end 1218.676000
      Metadata:
        title           : Episode
    Chapter #0:2: start 0.000000, end 96.927000
      Metadata:
        title           : Ending

Note that the overall duration line is 20:18, not 23:54. Extracting any video beginning at 0 starts after the intro and ends before the credits. -map_chapters -1 -map_metadata -1 does not help.

Handbrake shows it as having one "Title" of 3 "Chapters", but shows chapters 1 and 2, "Opening" and "Episode", as starting and ending at 0, and chapter 3, "Ending", going from 0 to 20:18. It cannot extract the intro or credits either. Neither can MakeMKV.

All of the searches for "how to split by chapter using ffmpeg" seem to suggest that these chapter start/end numbers should be non-overlapping and only the first should start at 0.

What's going on and how do I fix it?

Previously, previously.

Tags: , , ,

Flexget continues to vex

Dear Lazyweb,

Can someone please explain flexget's ideas of 'quality' to me? Assume that I have read all of the documentation dozens of times, and that I am not asking for your advice on any other software or topic.

My goal is "wait several hours for a 1080p; after that, accept 720p." Yet here is a 1080p file that is giving me:

Ignored `Some Show S02E02 1080p HEVC x265-MeGusta`. Does not meet quality requirement `720p+ webrip+`.

I have this:

    templates:
      all_shows:
        series:
          settings:
            weekly_shows:
              timeframe: 4 hours
              target:    1080p+
              quality:   720p+ webrip+
              specials:  yes
              upgrade:   yes
              tracking:  no
              season_packs: no
            full_season_shows:
              season_packs: always
              ...
          weekly_shows:
            - Show 1
            - Show 2
            ...
          full_season_shows:
            - Show 3
           ...
    tasks:
      blah blah blah:
        ...
        template: all_shows

Previously, previously, previously.

Tags: , , ,

CSS input styling antics

Dear Lazyweb,

How do I style an INPUT element so that its contents behave like a DIV, wrapping text and expanding height to fit?

I have a page that has an "edit' mode where I've got a bunch of populated form elements, and in non-edit mode, those are styled to just look like normal text. It looks a little like the following. I want the thing on the left to look like the thing on the right when the box is un-checked.

Existing:

Edit

Desired:

Edit

A. All work and no play makes Jack a dull boy.

C. All work and no play makes Jack a dull boy.

D. All work and no play makes Jack a dull boy.

33

I realize I could accomplish this by having a separate DIV that shadows the content of the INPUT elements and selectively exposing one or the other, but that's more of a hassle. This feels like it should be achievable with CSS.

Previously, previously, previously, previously.

Tags: , , ,

The RC Cola of vaccines!

Dear Armchair Epidemiologists,

(And I can't believe I'm asking this, but I have found no straight answers.)

Let's hypothesize a future, several weeks from now, where three vaccines are available: Pfizer, Moderna and Novovax. For someone without weird allergies or phobias, is there any reason to believe that one is better than the other? (Citations, please.)

Novovax's marketing seems to be saying, "We're the vaccine for people who don't want RNA in their bodies", so that's not super compelling.

Tags: , , , ,

Wayland and screen savers

Wayland does not support screen savers: it does not have any provision that allows screen savers to even exist in any meaningful way. If you value screen savers, that's kind of a problem.

Why doesn't it? Well, I suppose the designers of Wayland have no joy in their cold, black hearts simply do not value screen savers.

I suspect that some day someone will graft screen saver support onto Wayland. I have thoughts on this.

Adding screen savers to Wayland is not simply a matter of "port the XScreenSaver daemon", because under the Wayland model, screen blanking and locking should not be a third-party user-space app; much of the logic must be embedded into the display manager itself. This is a good thing! It is a better model than what we have under X11.

But that means that accomplishing that task means not just writing code, but engaging with whatever passes for a standards body or design committee in the Wayland world, and that is... how shall I put this... not something that I personally feel highly motivated to do.

However, as I am the world's foremost expert on screen savers on Unix-like operating systems, here are a few simple admonitions for young and old.


Under macOS, old-school X11 and Wayland, the graphical boot sequence is basically the same, and uncontroversial:

  1. Kernel runs init;
  2. Init runs a "graphical session", which sets up the frame buffer;
  3. The session displays a login prompt;
  4. After authenticating, the desktop environment is launched (Finder, etc.)

When you are logged in and the screen is locked, things go differently. Under macOS, the same "graphical session" process that managed the login window handles locking and authentication. Importantly, if this program crashes, you are logged out.

Under X11, you run XScreenSaver, which is a user-space program that tries really hard to keep the screen locked and never crash. It is very good at this, but that it needs to try so hard in the first place is a fundamental design flaw of X11.

So here's how locking and blanking should work under Wayland. I am not terribly familiar with Wayland or its terminology, but I can guarantee that if it diverges from this outline in any particular, grave design mistakes have been made and must be corrected.

There are three idle timeouts at play:

  1. Blank after: when to blank the screen or run a graphical saver;
  2. Lock after: when to require a password to return to the desktop (must be >= blank after);
  3. Power save after: when to power down the screen (must be >= blank after)

How those interact is fairly obvious. This logic should be embedded in the main loop of the session manager:

    if not blanked {
        if idle >= power save after {
            power down
        } else if idle >= blank after {
            launch screen saver
        }
    } else if user activity {
        if powered down {
            power up
        }

        if blank start time < lock after {
            kill screen saver
            unblank
        } else {
            prompt for password
            if verified {
                kill screen saver
                unblank
            } else if was powered down {
                launch screen saver
            }
        }
    } else if powered up and idle >= power save after {
        kill screen saver
        power down
    }

The meat of it, of course, is "launch screen saver". Under macOS, how that works is, the system instantiates a configured subclass of a ScreenSaverView window sized for each monitor and tells each of them to start animating. I assume that Wayland-heads will want to do this by sending DBus messages to some daemon that has registered itself as "I am the screen saver".

When it it time to start drawing, that screen saver manager just needs to know set of rectangles into which graphics should be drawn, whether that's a set of window IDs, or geometry specifications, or whatever.

Things to keep in mind:

  • The display manager should prevent any other program from drawing to the screen while it is blanked or locked: no dialogs, popup windows, notifications, etc. The only thing that should be allowed to draw to the blanked screen is the screen saver. (Make it an option if you must, but I assure you that for every person who likes it that a dialog box can pop up on top of their screen saver, there are a thousand more who consider that a security bug.)

  • Enable an option to slowly fade the desktop to black when blanking, interruptible by user activity.

  • Enable an option to slowly fade from the screen saver to the desktop when unblanking, interruptible by keys and clicks but not by mere mouse motion. Both of these options are probably easier to implement in the display manager than in the screen saver daemon, but either is fine.

  • Bear in mind that the screen saver daemon might choose to run the same display mode on more than one screen; or a different one on each; and might choose to stop one display mode and start another after a timeout while the screen remains blanked. It may do this by forking sub-processes, so any screen-access authorization must be inheritable.

  • Make it possible for for the screen saver to access the current desktop image, or the desktop image as it appeared pre-blanking. Many people rightly consider this a security exposure and leave it turned off, but many others enjoy it that their screen savers can hack their desktop image. It is a popular feature.

  • Do not consider a single pixel of mouse motion to be enough reason to power the screen back on. People who live near cats, trucks or slamming doors do not appreciate that.

Good luck! You'll need it.

Previously, previously, previously, previously.

Tags: , , , , ,

Android Daydream thumbnails

Dear Lazyweb, how do you set the big icon in an Android Daydream / screen saver?

At some point XScreenSaver started having only microscopic thumbnail images next to the title text; but the stock "Colors" saver manages to fill the box. How?

My AndroidManifest.xml contains android:icon="@drawable/companioncube" in the <service>, and that is where the too-small-to-see icon is coming from. It's a 150x150 PNG at drawable/companioncube.png.

Tags: , , ,

Patreon is lying to you about whether your patrons have paid.

I have several patrons whose credit cards have not been charged in months, but who still show up as "Active" and not "Declined". That means they are still eligible for benefits.

Specifically, since they are listed as "Active", that means they can use their Patreon membership to get into my nightclub for free. That costs me actual money.

And Patreon Support DGAF.

If one of your patron's cards ever fails to charge, Patreon will just silently stop charging them without notifying them, or you. They still show up on your list but have changed from "Active patron" to "declined patron". Now that's bad enough, that they just never try to charge them again. But even worse is this undeniable bug: sometimes a patron who has not been charged in months remains listed as "Active".

I reported a bug about this, with detailed specifics about one of my several patrons who is so misclassified, on August 8. I included screen shots showing conclusively that while this patron was listed as "Active", there had been no billing activity, not even an attempted charge, since May 1.

After thirteen messages back and forth, where their support tech resolutely did everything they could to deflect and ignore the actual problem, this is the "resolution" I received:

From: jwz

Let me rephrase:

My first question to you is: is [REDACTED] an active patron of DNA Lounge?

Since you have said that there was a failure trying to charge their card months ago, and that you have not tried to charge them again since, I assume your answer is "no, they are not."

Is that correct?

If so, my second question is:

Why are they still listed under the "Active" tab on "Audience / Relationship Manager"?

They are not listed on the "Canceled" or "Payment declined" tab. Their status in the CSV export says "Active patron", not "Declined patron".

That is a bug. That is a bug that is costing me money.

I need a way to generate a list of my active patrons. If looking at the "Active" tab is not how I do that, I would dearly like to know how.

Did I get an answer to either of those questions? The hell I did:

From: Daisy (Patreon)

Hello Jamie,

Hope this e-mail finds you well.

Once again, your Patron has not paid nor canceled his pledge and is in a state of limbo, he is unable to see your content. Either you use it to track customers in the real world that is your use for the platform and not what the platform is intended to so we can't take responsibility.

Once again, this is not a bug. Either you contact him or you block him if you do not want to see him on your relationship manager.

I will now proceed to close this ticket.

Thank you for contacting Patreon Support. Sincerely,

Daisy

Dear Patreon,

  1. Fix your bug.
  2. Fire "Daisy".

If you work there, perhaps you could escalate this actual bug to an actual engineer, instead of your deflecting "support" staff. Ticket 2208353.

The only reason that I use Patreon at all, instead of rolling my own membership program and doing billing through my own store and my own merchant account, is that managing recurring billing sounded hard.

Yeah, apparently it is hard. So hard that Patreon -- a $4 billion VC funded company who HAD ONE JOB, doing recurring billing -- doesn't know how to do it.

Previously.

Tags: , , , ,

TV

Dear Lazyweb: seeking an RSS source that is not Shazbat and includes more shows than ShowRSS.

  • ShowRSS works great for the TV shows it knows about, but it misses a lot. E.g., omits most shows that come out a season-at-a-time.

  • Shazbat has all the shows, and the tracker works fine, but the web site performance is utterly unusable now. Like, clicking on a link to a show page and then clicking "subscribe" sometimes takes 15 minutes of retrying. I assume it's just fully unmaintained and limping along on autopilot.

I plug these feeds into Flexget, which parses episode numbers and downloads the new ones. (I do not recommend Flexget. Its configuration format is basically a crime against humanity, it suffers from Python Derangement Syndrome, but it's what I use and I don't know of anything better.)

Please note: if you are using a GUI thing where your video player somehow auto-downloads shows for you, good for you but I don't want to hear about it. I am specifically asking for RSS sources for a configured set of shows.

Previously, previously.

Tags: , , , ,

NoMachine

Dear Lazyweb, does key-based authentication work with NoMachine, like, ever?

I have a Mac on my local network, and I would like to stop typing that machine's login password. Selecting "use key based authentication" seems to do fuck-all. NoMachine also does not seem to talk to ssh-agent. I even tried rolling a new passwordless key: that doesn't work either.

This is using "NX" protocol, since apparently to use "SSH" protocol these fuckstains want to upsell you to some "enterprise" edition.

(Yes I have read the document you are about to Google for me. No I do not want it to store this machine's login password in plain-text in the connection file, because it is the twenty first god damned century. Nor do I want to go through a local ssh tunnel because maintaining that connection after the remote machine goes to sleep is a pain in the ass.)

Previously, previously.

Tags: , , , ,

Grubhub

Dear Lazyweb, do you know anyone who works at Grubhub? Our listing is not giving us what we are paying for and our sales rep is useless, so we need someone who can escalate. We have been hassling them for months to no avail.

At the tier we are paying for, they promised us that we would be above most other listings, but if you set your delivery location to anywhere near DNA Pizza and search "Pizza", we are listing #135.

If you search "DNA", you get Ithai, Dumpling House, Dickey's BBQ Pit, and KFC before we show up in spot #91.

If you search "DNA Pizza", the first hit is Castro Indian Restaurant.

If you search "Extreme", you get 9 listings, and Extreme Pizza are the first two.

"Oh, that's weird", our useless sales rep says.

We had 10 orders from Grubhub last month. One zero, ten.

Previously, previously.

Tags: , , , , ,