Open lattice0 opened 3 years ago
A ffmpeg example would be a very welcome contribution, thank you!
should I do it as a separate project? If so, should I put it inside retina or should I do another separate repo?
I like the idea of having the examples be their own crates inside the same repository. I happened to read a comment by axum
's author the other day suggesting the same thing for another reason:
Currently we're just using cargo's built-in "examples" feature which has the unfortunate downside of using the same Cargo.toml as axum itself, which makes it hard to see what the dependencies actually are. I'm starting to think that making each example an isolated crate, in the same repo, will make things much more clear.
What will your example's output be? an uncompressed video file, or something else?
I was going to make an example that just decompresses a video but don't even save it, but we can add more features, maybe saving the frames, I don't know. It's mainly for testing. I'm gonna start now on another branch
I forgot to ask which OS you use, because I don't know if it will compile due to ffmpeg dependencies. I tested on Ubuntu 20.04 and I had to install the dependencies in the readme. I can help you with ffmpeg if you want and I have a Dockerfile that builds ffmpeg for android/linux but I don't know if it's easy to make it work for macOS.
You see that I included my own ffmpeg-sys crates because it's hard to find someone that wants to maintain them with my adds (hardware decoding support)
Writing quickly; haven't had a chance yet to look through your example.
Personally I use both Linux (various Debian-based setups) and macOS. I think it's inherent to using a C library that it won't be quite as easy to compile everywhere as retina itself, which is fine.
As an example of how to integrate retina and ffmpeg, IMHO it might be best to use the most common ffmpeg crate forks if hardware acceleration isn't central to the example. That'd make it more focused and widely applicable. (fwiw, I also have my own ffmpeg crate moonfire-ffmpeg but I'm not really trying to make it full-featured or encourage wide adoption of it, so I'm not proposing an example with it.)
Ok, in the future before merging I'll switch to the most used ffmpeg crate
I have a draft PR #19 with an example which uses the ffmpeg-next
crate to decode the images and dump them to files in .ppm
format. Something's wrong with the generated images, though. Not sure yet what the problem is.
I'd like to write an ffmpeg example. I already have some ffmpeg decode code that almost works with retina, but do you think the dev-dependencies would have too many deps? Because ffmpeg brings too many deps:
should I do it as a separate project? If so, should I put it inside retina or should I do another separate repo?