cztomczak / cefpython

Python bindings for the Chromium Embedded Framework (CEF)
Other
3.07k stars 474 forks source link

Add --proprietary-codecs flag to automate.py to enable H264, AAC, H265, AC3, EAC3, MPEG-4 and MPEG2-TS codecs/formats #471

Open cztomczak opened 6 years ago

cztomczak commented 6 years ago

Default cefpython builds will not have this flag enabled.

This flag could do the following:

On a side note the enable_av1_decoder=true GN arg can enable the AV1 video codec (a free codec) and this flag will be enabled by default in Chromium v70+.

jakogut commented 6 years ago

@cztomczak Is there currently any way to selectively apply patches, such as your example of enabling the HEVC video codec when the proprietary_codecs option is enabled?

EDIT: Same thing w/ issue #472 and VAAPI support. The patch has to be rebased for almost every version, and the upstream Chromium developers have made it known that the patch will never be merged, as they have no desire to support it.

Consequently, the patch should only be applied when the use_vaapi option is enabled.

cztomczak commented 6 years ago

@jakogut In patch.py you can use env variables to decide whether patch should be applied. For example with such code: if "proprietary_codecs=true" in os.environ["GN_DEFINES"]. To enable HEVC you need to set enable_hevc_demuxing=true GN variable, and apply a patch to include hevc ffmpeg codecs/demuxers and also add support for hevc codec in media/base/decode_capabilities.cc and media/base/mime_util_internal.cc files.