The codec pack brings modern audio and video formats to Phorepoc OS. It's FFmpeg and OpenH264 ported to Phorepoc OS, so the phone can play H.264, HEVC, VP8 and VP9 video and AAC, MP3, Opus, Vorbis and FLAC audio in MP4, Matroska and Ogg files. Without it, games and apps with MP4 video play silently.
You don't build it into an image. Users install it from Catalogue when they want it.
There are two reasons. The first is the license. FFmpeg is LGPL, so it's built as its own library (pheffmpeg.dll) that
the system loads at run time. It never ends up inside any of Phorepoc OS's own binaries, and you can swap it for your own
build.
The second is patents. AAC and H.264 are in a grey area, so the pack is never part of a Phorepoc OS image. It's a separate download, and it's up to each user whether to install it.
Every release has the pack as an installable SIS file for each architecture: codecpack-arm.sis for phones and
codecpack-x32.sis for the PC. The release workflow builds them from this repository
with the pdk's package.yml, and Catalogue installs them.
We don't keep copies of FFmpeg or OpenH264 here. The recipes download the exact releases they name and check them
against a SHA-256. FFmpeg is never configured with --enable-gpl, --enable-version3 or --enable-nonfree, and the
build stops if FFmpeg reports any license other than LGPL 2.1 or later.
The recipes run in the toolchain's ghcr.io/phorepoc/web image. Check out core and the
pdk next to this repository and run phe source export -a once. Then:
docker run --rm -e ARCH=arm -e JOBS=4 -e PHOREPOC_BUILD=/build \
-e PHOREPOC_CORE=/src/core -e PHOREPOC_PDK=/src/pdk \
-v "$PWD/../core/build:/build" -v "$PWD/..:/src" -w /src/codecpack \
ghcr.io/phorepoc/web ./build.shUse ARCH=x32 for the PC. The libraries land in $PHOREPOC_BUILD/codecpack/.
Next, build the components with this repository added to PHOREPOC_ADAPTATIONS, after your device's own
repositories. On the PC, pheffmpeg also needs cxxrt, so build that first and add
it too.
PHOREPOC_ADAPTATIONS=<device repositories>:<path to codecpack> phe component build -arch arm pheffmpeg phefftest
PHOREPOC_ADAPTATIONS=<device repositories>:<path to codecpack> phe component build ariheaacdecwrapper \
ariheaacdecmmfcodec aacdecoderconfig eaacplusutil eaacplusaudiocontrollerutility \
aacaudioplaycontrollerplugin aacaudioplaycontrollerrecognizerrecipes/downloads and builds FFmpeg and OpenH264.build.shruns them all in order.os/src/pheffmpeg/is the library the video player loads, a small C API over FFmpeg's decoders.os/src/phevdecsw/is the software video decoder plug-in (phevdecsw.dll) the video player finds through DevVideo; it decodes throughpheffmpeg.dll. On ARM it only takes MPEG-4 Part 2, since the board's video engine does the rest.os/src/codecs/has the AAC decoder behind the system's own audio framework (the MMF), now running on FFmpeg.os/src/phefftest/is a test program that opens and decodes sample clips.registry/components_codecpack.pylists the components.
Our code and the Symbian files we've changed are EPL-2.0 with GPL-2.0-or-later as a Secondary License.
FFmpeg is LGPL-2.1 or later and OpenH264 is BSD-2-Clause. NOTICE and LICENSES/ have the details, including the
note on patents.
Contributions are welcome under the same terms. Add your name to AUTHORS in your first pull request.