New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FFmpeg as audio and video demuxer and decoder #5226
Comments
FFMPEG is just a library to wrap around a lot of codecs. This is nice, but most of those codecs are either
So, if anyone really needs this it could be provided by a separate module, but it's not possible for us to include it. Theora is still the only codec that can be decoded via CPU that is not patent encumbered. |
Regarding performance, replacing a simple library like Theora by the whole ffmpeg just to gain a bit of performance is pointless IMO. |
Also the license is LGPL (or GPL if you enable too much stuff), and both would be no-go to embed directly in Godot's core AFAIK. We need to stay under a permissive license. |
I don't necessarily agree that FFmpeg is the better choice, but I must agree on the fact that Theora is really slow. It can't play 60 FPS videos without hanging every second, but worse yet is that it lags on 30 FPS videos. If possible, we should really use a better library. Openh264 looks like a good choice, but I need to research more about it. |
We can support VP8 or VP9, but both are quite expensive on the CPU (probably more so than Theora), but they do compress better. |
vp8 and vp9 are patent free, I would like to implement them but i couldn't On Thu, Jun 23, 2016 at 3:31 PM, Hugo Locurcio notifications@github.com
|
So much for "Open". Still,
|
as far as I understand, webm is mkv+vpx+vorbis , so a mkv demuxer with On Thu, Jun 23, 2016 at 3:38 PM, António Sarmento notifications@github.com
|
So, ffmpeg in the main tree obviously won't happen. (It would be the perfect match for a community-maintained module though :)). |
So if I understand it correctly - |
FFmpeg (http://ffmpeg.org/about.html) can decode almost every audio and video format and codec using one API. It is very portable. It can replace Theora, OGG, Vorbis, Opus and other libraries (Speex decoder in FFmpeg uses libspeex). It has also its own audio resampler (with audio channel expansion) and video scaler (with pixel format conversion). It has also various audio and video filters which can be used.
FFmpeg is optimized for performance, e.g. libvorbis is slower than built-in FFmpeg Vorbis decoder:
ffmpeg -i Test.ogg -acodec pcm_s16le -f wav - &> /dev/null
- 0.51 secoggdec -o - Test.ogg &> /dev/null
- 0.87 secFFmpeg can be linked statically or dynamically. Its configuration tool allows to enable only needed formats and codecs.
FFmpeg has also its own protocol support (http, https, file, rtsp, rtmp, ftp, etc...). They can be compiled-in and used (also in other Godot parts), or they might be disabled during compilation. Then custom IO reader can be created which will use Gotots' file and network functions.
It also can decode still images like JPEG/PNG/GIF, but I've never used FFmpeg for still images :)
See also: #5133 (comment)
The text was updated successfully, but these errors were encountered: