diff --git a/.gitignore b/.gitignore index 6f49b73..66ed74e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ __pycache__/ # C extensions *.so +*.so.* # Distribution / packaging .Python diff --git a/make/configure-ffmpeg.sh b/make/configure-ffmpeg.sh new file mode 100755 index 0000000..8e8a336 --- /dev/null +++ b/make/configure-ffmpeg.sh @@ -0,0 +1,65 @@ +#!/bin/sh +# People's Video Editor: high quality, GPU accelerated mp4 editor +# Copyright (C) 2025 Roz K +# +# This file is part of People's Video Editor. +# +# People's Video Editor is free software: you can redistribute it and/or modify it under the terms of the +# GNU General Public License as published by the Free Software Foundation, either version 3 of the License, +# or (at your option) any later version. +# +# People's Video Editor is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with People's Video Editor. +# If not, see . + +source_directory="ffmpeg" +include_directory="build/codecs/include" +lib_directory="build/codecs/lib" +build_directory="build/${source_directory}" +install_directory="build" +install_library_directory="mp4" + +if ! [ -d ${source_directory} ] ; then + echo "This script must be executed from the root directory: ./make/configure-ffmpeg.sh" + exit 1 +fi + +mkdir -p ${build_directory} +mkdir -p ${install_directory} + +absolute_source_directory=$(realpath ${source_directory}) +absolute_include_directory=$(realpath ${include_directory}) +absolute_lib_directory=$(realpath ${lib_directory}) +absolute_build_directory=$(realpath ${build_directory}) +absolute_install_directory=$(realpath ${install_directory}) +absolute_install_library_directory=$(realpath ${install_library_directory}) + +cd "${absolute_build_directory}" +${absolute_source_directory}/configure \ + --prefix=${absolute_install_directory} \ + --pkg-config-flags="--static" \ + --extra-cflags="-I${absolute_include_directory}" \ + --extra-ldflags="-L${absolute_lib_directory}" \ + --extra-libs="-lpthread -lm" \ + --disable-static \ + --enable-shared \ + --enable-rpath \ + --shlibdir=${absolute_install_library_directory} \ + --disable-programs \ + --disable-avdevice \ + --disable-avfilter \ + --disable-network \ + --disable-manpages \ + --disable-podpages \ + --disable-txtpages \ + --enable-gpl \ + --enable-libx264 \ + --enable-libx265 \ + --disable-xlib \ + --disable-libxcb \ + --disable-libxcb-shm \ + --disable-alsa \ + --disable-iconv diff --git a/make/make-ffmpeg.sh b/make/make-ffmpeg.sh new file mode 100755 index 0000000..3aebc62 --- /dev/null +++ b/make/make-ffmpeg.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# People's Video Editor: high quality, GPU accelerated mp4 editor +# Copyright (C) 2025 Roz K +# +# This file is part of People's Video Editor. +# +# People's Video Editor is free software: you can redistribute it and/or modify it under the terms of the +# GNU General Public License as published by the Free Software Foundation, either version 3 of the License, +# or (at your option) any later version. +# +# People's Video Editor is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with People's Video Editor. +# If not, see . + +source_directory="ffmpeg" +build_directory="build/${source_directory}" + +if ! [ -d ${source_directory} ] ; then + echo "This script must be executed from the root directory: ./make/make-ffmpeg.sh" + exit 1 +fi + +if ! [ -d ${build_directory} ] ; then + ./make/configure-ffmpeg.sh || exit 1 +fi + +cd ${build_directory} +make && make install