4 ms·
It's interesting. I've heard apocryphally that FFmpeg is used in many production video systems (https://twitter.com/id_aa_carmack/status/1258531455220609025 htt
by hardwaregeek 4y ago
It's interesting. I've heard apocryphally that FFmpeg is used in many production video systems (https://twitter.com/id_aa_carmack/status/1258531455220609025 https://twitter.com/id_aa_carmack/status/1258531455220609025). However, as far as I can tell, you can either use the quite low level libraries like libavfilter, or you can rely on the CLI tool. The former seems rather tedious; you have to set up the scaffolding yourself, chain all the demuxer to the filters to the muxer, etc. The latter is a very weird interface; you have to shell out to this CLI tool. Is that really the case?
- the_cat_kittles 4y agowhats the problem with using the cli in production?
- bityard 4y agoYeah, I don't really see the difference between asking a database administrator to be fluent in SQL and asking a video processing expert to be fluent in ffmpeg (or similar tools).
- make3 4y agorequires creating a separate process? requires passing the memory from one process to the other.. requires a filesystem & requires the security analysis for having production software interact with the file-system?
- chrisseaton 4y ago> requires a filesystem Unix has something called pipes that lets you send data as 'files' but they're really supplied as a stream by another process.
- barrkel 4y agoOne of the nicer things about using a separate process is that resource isolation is much better than in-process. You can kill the process without worrying about mutexes, OS scheduling applies priority consistently, the entire heap is freed once a job completes, there's no worry about leaking resources, and so on. Even if you could do less I/O by keeping stuff in-process - and I'm not sure that's true if you build your graph in ffmpeg, it's just the source and sink of data which are external, and they'll almost always be external.
- Uehreka 4y agoI’ve had some luck with PyAV, which I’m pretty sure is just some straight-up Python->C bindings (in case shelling out and starting another process feels too weird. https://pyav.org/docs/stable/ https://pyav.org/docs/stable/ However, I’d note that in my use case, I ended up going back to the shell after running some benchmarks and seeing that for my use case, I wasn’t saving any performance.
- iso1210 4y agoPretty much the entire field contribution system of BBC News uses ffmpeg (or ffmbc, an ffmpeg fork from years back with some specific broadcast related additions) from the commandline (launched from a custom program), has done for about 15 years.