Patch to enable playing H265 (HEVC) videos. Switch FFmpeg branding to ChromeOS because it includes all codecs from Chromium + from Chrome (aac,h264 and now hevc) + additional free codecs.

This commit is contained in:
Mikhail N 2018-10-30 17:18:25 +03:00
parent dd4227f5f7
commit 2b532f6174
2 changed files with 29 additions and 1 deletions

28
ROSA-enable-H265.patch Normal file
View file

@ -0,0 +1,28 @@
This patch enables playing H265 videos in Chromium's built-in FFmpeg.
Use http://do1.nixtux.ru/download/video-test/ to test.
Without this patch Chromium can play only audio in H265-encoded mp4 video, it tries to play the video, but failes to decode it:
[1342:1380:1030/155543.402619:ERROR:render_media_log.cc(30)] MediaEvent: MEDIA_ERROR_LOG_ENTRY {"error":"video decoder initialization failed"}
[1342:1342:1030/155543.403955:ERROR:render_media_log.cc(30)] MediaEvent: PIPELINE_ERROR DECODER_ERROR_NOT_SUPPORTED
--- a/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py 2018-10-16 22:16:58.000000000 +0300
+++ b/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py 2018-10-30 17:12:08.245422431 +0300
@@ -830,10 +830,16 @@
])
# Google Chrome & ChromeOS specific configuration.
+ # To find ffmpeg parser name:
+ # $ cat ./configure | grep parser | grep -E '265|hevc'
+ # results to 'hevc_parser', so its name is 'hevc', not 'h265'
+ # As far as I understand, FFmpeg has a built-in decoder for H265 (HEVC) (https://launchpad.net/ffmpeg/+announcement/12062),
+ # so --enable-libx265 is needed only for encoding capabilities, while we need decoding only, so we don't need --enable-libx265
+ # Note that we have 'enable_hevc_demuxing=true' in build flags
configure_flags['Chrome'].extend([
- '--enable-decoder=aac,h264',
+ '--enable-decoder=aac,h264,hevc',
'--enable-demuxer=aac',
- '--enable-parser=aac,h264',
+ '--enable-parser=aac,h264,hevc',
])
# Google ChromeOS specific configuration.

View file

@ -455,7 +455,7 @@ CXXFLAGS="$CXXFLAGS -Wno-error=attributes -Wno-error=comment -Wno-error=unused-v
is_component_build=false \
is_component_ffmpeg=true \
proprietary_codecs=true \
ffmpeg_branding="Chrome" \
ffmpeg_branding="ChromeOS" \
enable_ac3_eac3_audio_demuxing=true \
enable_mse_mpeg2ts_stream_parser=true \
enable_hevc_demuxing=true \