kidrigger / godot-videodecoder

GDNative Video Decoder libraries for Godot Game Engine, using FFmpeg library for codecs. A Google Summer of Code Project, 2018
MIT License
84 stars 22 forks source link

x264 support? #31

Open k0a1a opened 3 years ago

k0a1a commented 3 years ago

Currently mp4 container cannot be opened:

ffmpeg_videoplayer: Supported video codecs:
    decode vp9
    decode vorbis
      codec: libvorbis
    decode opus
      codec: libopus
 No loader found for resource: res://media/echo-hereweare.mp4.
 Cannot load resource from path 'res://media/echo-hereweare.mp4'.

i attempted to add libx264 support in godot-videodecoder/ffmpeg-static/build.sh however to no avail in videodecoder binary.

is there a way of making this work?

thanks!

jamie-pate commented 3 years ago

Afaik h264 is patent encumbered, imo you should reencode in vp8 if you can.

https://medium.com/@jina.liu/settle-your-questions-about-h-264-license-cost-once-and-for-all-hopefully-a058c2149256

Also getting the compile flags and dependencies working for ffmpeg is a dark art :)

k0a1a commented 3 years ago

I'm looking to load existing mp4 http streams, which ffmpeg is capable of doing once x264-decoder (and I presume mp4-demuxer) is available. I could transcode x264 -> vp9 on the fly and serve vp9 streams locally but since I need to be able to dynamically switch streams this external chain would complexify my setup too much..