• 0 posts
  • 106 comments
Joined 3 years ago
Cake day: September 13th, 2023
  • Because to a certain extent Python is duck typed. Python has no concept of interfaces, unless you count the abc module combined with manual isinstance() checks, which I’ve never seen anyone do in production. In order to be passed to some function that expects a “file-like object”, it just has to have methods named read(), seek(), and possibly isatty(). The Python philosophy, at least as I see it, is “as long as it has methods named walk() and quack(), it’s close enough to a duck for me to treat it as one”.

    Duck typing is distinct from weak type systems, though.

  • FFmpeg is basically the only piece of audio/video conversion software in widespread use. Everything uses it under the hood. Microsoft Teams used it to stream your webcam. VLC uses it to play video. If you’ve ever uploaded your video to an online service to convert it to a different file format or codec, chances are the server that processed it did so using FFmpeg.

    I have also noticed that FFmpeg kind of sucks at generating stills for reasons I’m not sure about though.