Comment by latexr

3 days ago

I thought this was going to be a website managed by an experienced user of FFmpeg sharing from their collection of accumulated knowledge, but then was immediately disappointed on the first example I clicked on.

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:

  ffprobe -loglevel quiet -output_format csv=p=0 -show_entries format=duration video.mp4

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.

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.