Re:Ffmpeg-Python: Python bindings for FFmpeg – with complex ...
by the_cat_kittles on Sunday December 29, 2019 @07:20PM
(#21909676)
i feel like suprocess call is an under rated way of using libs like ffmpeg- its how i usually do it. normally you have to learn the cli anyway, so it almost always seems easier to just script the command generation rather than use some middleman abstraction layer
[ Parent
| on HN ]
Re:Ffmpeg-Python: Python bindings for FFmpeg – with complex ...
by zerocrates on Monday December 30, 2019 @02:01AM
(#21911377)
Normally I'd agree, but ffmpeg is a bit of a special case: thanks to its extremely large set of options it has a rather high number of pitfalls: flags that do subtly to wildly different things depending on where they are placed relative to other arguments, for example. Complex filter graphs are pretty gnarly on their own, being a string-based sublanguage all crammed into one argument... it's not totally unreasonable to reach for something just to tame that particular beast.
If this gets you halfway-workable tab completion for the various options of things it's worth it for that alone, vs. diving through the big long page that otherwise contains all the names and orders of arguments to filters.
Re:Ffmpeg-Python: Python bindings for FFmpeg – with complex ...
by qmmmur on Monday December 30, 2019 @04:24AM
(#21912050)
I use subprocess to turn any single file in > single file out script into a batch processor that takes folders as input and output. I am sort of new to programming and I felt like this was quite dirty, but I didn't have the bindings anyway so I didn't have a choice. What are the downsides and upsides of calling subprocess versus bindings?
Re:Ffmpeg-Python: Python bindings for FFmpeg – with complex ...
by s_Hogg on Monday December 30, 2019 @02:42AM
(#21911535)
Any time the CLI options stop you from doing something that is possible in the library itself, this goes out the window. That's why my friend and I wrote a pybind11 wrapper for tesseract. We could probably do something similar here, and never worry about subprocess again.