From: Waldemar Kozaczuk <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
Branch: master
Improved ffmpeg app to automatically add dependant libraries
Signed-off-by: Waldemar Kozaczuk <[email protected]>
---
diff --git a/ffmpeg/Makefile b/ffmpeg/Makefile
--- a/ffmpeg/Makefile
+++ b/ffmpeg/Makefile
@@ -17,17 +17,22 @@ ${SRCDIR}/ffmpeg-${VERSION}:
cd upstream && tar xf ${TARBALL}
${SRCDIR}/ffmpeg-${VERSION}/ffmpeg: ${SRCDIR}/ffmpeg-${VERSION}
+ # If needs x265 codex
+ # sudo apt-get install libx265-dev
cd ${SRCDIR}/ffmpeg-${VERSION} && ./configure --disable-static
--enable-shared --disable-ffplay --disable-ffprobe
+# --enable-libx265 --enable-gpl -> uncomment to enable x265 codec
+ patch ${SRCDIR}/ffmpeg-${VERSION}/fftools/ffmpeg.c fftools_ffmpeg.patch
cd ${SRCDIR}/ffmpeg-${VERSION} && make
cd ${SRCDIR}/ffmpeg-${VERSION} && rm ffmpeg ffmpeg_g fftools/*.o
fftools/*.d
patch ${SRCDIR}/ffmpeg-${VERSION}/fftools/Makefile
fftools_makefile.patch
cd ${SRCDIR}/ffmpeg-${VERSION} && make #Force rebuild ffmpeg executable
as shared object
ROOTFS/ffmpeg.so: ${SRCDIR}/ffmpeg-${VERSION}/ffmpeg
- mkdir -p ROOTFS
+ mkdir -p ROOTFS/usr/lib
cp ${SRCDIR}/ffmpeg-${VERSION}/ffmpeg ROOTFS/ffmpeg.so
find ${SRCDIR}/ffmpeg-${VERSION} -regex '.*\.so\.[0-9]+' | xargs -I {} cp
{} ROOTFS/
- strip ROOTFS/*
+ ldd ROOTFS/*.so* | grep -Po '(?<=> )/[^ ]+' | sort | uniq | grep
-Pv 'lib(c|gcc_s|dl|m|util|rt|pthread|stdc\+\+|selinux|krb5|gssapi_krb5|z|
bz2)\.so' | xargs -I {} install {} ROOTFS/usr/lib
+ strip ROOTFS/* && strip ROOTFS/usr/lib/*
clean:
rm -rf upstream ROOTFS
diff --git a/ffmpeg/fftools_ffmpeg.patch b/ffmpeg/fftools_ffmpeg.patch
--- a/ffmpeg/fftools_ffmpeg.patch
+++ b/ffmpeg/fftools_ffmpeg.patch
@@ -0,0 +1,10 @@
+--- upstream/ffmpeg-4.0.2/fftools/ffmpeg.c 2018-07-18 13:52:07.000000000
+0000
++++ ffmpeg.c 2018-11-19 18:56:28.434006165 +0000
+@@ -4849,6 +4849,6 @@
+ if ((decode_error_stat[0] + decode_error_stat[1]) * max_error_rate <
decode_error_stat[1])
+ exit_program(69);
+
+- exit_program(received_nb_signals ? 255 : main_return_code);
++ ffmpeg_cleanup(received_nb_signals ? 255 : main_return_code);
+ return main_return_code;
+ }
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.