Electron: Add video and audio codecs

Created on 29 Oct 2015  路  3Comments  路  Source: electron/electron

I am looking for a way to playback videos with ac3 audio, and xvid videos.

Most helpful comment

What is the modern way of doing this? This issue seems pretty old so I'm sure things have changed.

All 3 comments

You have to do a custom build libchromiumcontent with custom ffmpeg_branding, currently we just use the chrome browser's setting since it is well tested. You can find more at https://github.com/atom/electron/issues/1595.

Ok, it looks like none of the existing ffmpeg_branding brands support ac3, and looking at vendor\chromium\src\third_party\ffmpeg\build_ffmpeg.py line 493 it looks like i need to add some flags to the ffmpeg build

# Google Chrome & ChromeOS specific configuration.
configure_flags['Chrome'].extend([
    '--enable-decoder=aac,h264,mp3',
    '--enable-demuxer=aac,mp3,mov',
    '--enable-parser=aac,h264,mpegaudio',
])

How is this done? Do I make a patch in patches\third_party\ffmpeg? Or am I on the completely wrong track?

What is the modern way of doing this? This issue seems pretty old so I'm sure things have changed.

Was this page helpful?
0 / 5 - 0 ratings