Our great sponsors
-
Vidio
FFmpeg wrapper providing simple, cross-platform Video I/O, GIF Creation, and Webcam Streaming in Go.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
audiobook-split-ffmpeg-go
Split audiobook file into per-chapter files using chapter metadata and ffmpeg
Glad it worked out for you—it seemed like the features are there for basic image conversion, but try to do something a little more sophisticated and you run into some severe design limits. Here is the kind of underlying problem I’m talking about:
https://github.com/image-rs/image/issues/1523
I also wrote a similar thing years ago...
https://github.com/unixpickle/ffmpego
You can instruct ffprobe to output the metadata in JSON (-print_format json), removing the need for manual parsing. Although you already utilize "-print_format compact" - was this a deliberate choice?
Also, you don't have to do manual stdout buffering. Have a look at ReadChapters function in here: https://github.com/MawKKe/audiobook-split-ffmpeg-go/blob/f95... (fyi it's my own repo)