xiph / daala

Modern video compression for the internet
https://xiph.org/daala/
BSD 2-Clause "Simplified" License
542 stars 102 forks source link

Use FFMPEG/LibAV for example programs #142

Open Min1123 opened 8 years ago

Min1123 commented 8 years ago

The use of format and codec libraries from FFMPEG/LibAv would allow transcodes from numerous formats supported by FFMPEG/LibAV as opposed to the rather limited (and huge) YUV4MPEG2 format. While this does increase the likelihood of people using input video (and possibly audio) that already has compression artifacts from other encoders, it also frees up the encoder to work with many more files without mkfifo/transcoding to a huge YUV file, etc.

tdaede commented 8 years ago

Even better would be to add libdaala support to ffmpeg, so it can be used directly.

Alternately, you can pipe y4m directly between programs, without having to save it to disk: ffmpeg -i video.webm -pix_fmt yuv420p -f yuv4mpegpipe - | ./encoder_example - -o video.ogv

Min1123 commented 8 years ago

I look at the codebase surrounding Daala as a continuation of the codebase that was Theora/Tarkin and became a baseline for Daala, so my opinion is that rather than integrate into an external project early (before the bitstream freeze), using a somewhat stable API/API-calls from their libraries extends functionality directly for Daala and whatever comes after it since the same example programs will probably be used in future codec development as well.

lu-zero commented 8 years ago

You can play with https://github.com/kodabb/libav/commits/daala keep in mind that the API is not really stable so you might need to update it by yourself from time to time (help in keeping it updated is welcome).

Min1123 commented 8 years ago

It's neat (and I am of course going to play with it), but I was really thinking more along the lines of https://github.com/kodabb/daala/blob/master/examples/encoder_example.c getting support from libav so you can feed it files other than a yuv4mpegpipe (like an AVI/MP4/WEBM, and have the YUV conversion done internally). Mainly since bitstream freeze is probably a long way away (BTW, is -strict -2 required for this since it's an experimental codec?).

lu-zero commented 8 years ago

yes -strict experimental is needed.

Being a mere contributor I'm not sure if they want to add that part yet since would be additional burden when changing the API.