News for hackers. Stuff that matters.
Re:Show HN: Typed-FFmpeg 3.0–Typed Interface to FFmpeg and V... by kopf on Saturday May 31, 2025 @06:00PM (#44147208)
Can you explain to me why, despite "full type safety, autocomplete and validation" being the focus of "typed-ffmpeg", it makes sense to be passing width and height (or the x and y co-ordinates) as strings here?

``` .drawbox(x="50", y="50", width="120", height="120", color="red", thickness="5") ```

(from https://github.com/livingbio/typed-ffmpeg?tab=readme-ov-file... )

Re:Show HN: Typed-FFmpeg 3.0–Typed Interface to FFmpeg and V... by BGZq7 on Saturday May 31, 2025 @07:43PM (#44147696)
I think the issue is those aren't integers, they are ffmpeg expressions evaluating to integers. See e.g. this example from the ffmpeg documentation:

  Draw a 2-pixel red 2.40:1 mask:
  drawbox=x=-t:y=0.5*(ih-iw/2.4)-t:w=iw+t*2:h=iw/2.4+t*2:t=2:c=red
Implementing type checking on this correctly would require something like a DSL.