Created
September 10, 2017 17:50
-
-
Save asvinours/b6e6582643693da48ebf0765484ff50e to your computer and use it in GitHub Desktop.
Create heif imagefile from jpeg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update && \ | |
apt-get install -y \ | |
ffmpeg \ | |
scons \ | |
wget \ | |
git \ | |
binutils \ | |
cpp-5 \ | |
language-pack-en-base \ | |
libacl1 \ | |
libattr1 \ | |
libc6 \ | |
libc6-dev \ | |
libgcc-5-dev \ | |
libgmp10 \ | |
libisl15 \ | |
libjpeg-turbo8-dev \ | |
libmpc3 \ | |
libmpfr4 \ | |
libpcre3 \ | |
libpng16-dev \ | |
libreadline6 \ | |
libselinux1 \ | |
libsigsegv2 \ | |
libtinfo5 \ | |
linux-libc-dev \ | |
locales \ | |
python-pkg-resources \ | |
libonig2 \ | |
zlib1g \ | |
zlib1g-dev | |
rm -rf /tmp/gpac && \ | |
mkdir -p /tmp/gpac && \ | |
cd /tmp/gpac && \ | |
wget https://github.com/gpac/gpac/archive/v0.7.1.tar.gz && \ | |
tar -xzvf v0.7.1.tar.gz && \ | |
wget http://download.tsi.telecom-paristech.fr/gpac/gpac_extra_libs.zip && \ | |
unzip gpac_extra_libs.zip && \ | |
mkdir -p /tmp/gpac/gpac-0.7.1/extra_lib/lib/gcc/ && \ | |
cd gpac_extra_libs/ && \ | |
git clone https://github.com/OpenHEVC/openHEVC.git openhevc && \ | |
chmod +x unzip_all.sh && \ | |
./unzip_all.sh && \ | |
chmod +x build_opensvc_static.sh && \ | |
chmod +x build_openhevc_static.sh && \ | |
cd PlatinumSDK && \ | |
chmod +x BuildAndCopy2Public.sh && \ | |
./BuildAndCopy2Public.sh x86-unknown-linux && \ | |
cp -r Platinum/Build/Targets/x86-unknown-linux/Debug/* /tmp/gpac/gpac-0.7.1/extra_lib/lib/gcc/ && \ | |
cd /tmp/gpac/gpac_extra_libs && \ | |
./build_opensvc_static.sh && \ | |
cp opensvc/svcsvn/libOpenSVCDec.a /tmp/gpac/gpac-0.7.1/extra_lib/lib/gcc/ && \ | |
cd /tmp/gpac/gpac_extra_libs && \ | |
./build_openhevc_static.sh && \ | |
cp openhevc/libLibOpenHevcWrapper.a /tmp/gpac/gpac-0.7.1/extra_lib/lib/gcc/ && \ | |
cd /tmp/gpac/gpac-0.7.1 && \ | |
chmod +x configure && \ | |
./configure && \ | |
make lib && \ | |
make apps && \ | |
make install lib && \ | |
make install && \ | |
cp bin/gcc/libgpac.so /usr/lib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://static.pexels.com/photos/45170/kittens-cat-cat-puppy-rush-45170.jpeg && \ | |
ffmpeg -i ./kittens-cat-cat-puppy-rush-45170.jpeg -crf 12 -preset slower -pix_fmt yuv420p -f hevc kittens.hvc && \ | |
MP4Box -add-image kittens.hvc -ab heic -new kittens.heic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment