Hi, original poster here. I think calling it "insane" is a bit of an exaggeration lol. Don't you think?
I like your solution better!
> I think calling it "insane" is a bit of an exaggeration
Yes, I agree. It was decidedly the wrong word to use and the post would undoubtedly have been better without that part. Unfortunately, the edit window had already passed by the time I reread it.
https://www.ffmpegbyexample.com/examples/l1bilxyl/get_the_du...
Don’t call two extra tools to do string processing, that is insane. FFprobe is perfectly capable of giving you just the duration (or whatever) on its own:
Don’t simply stop at the first thing that works; once it does think to yourself if maybe there is a way to improve it.