Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Alpine build with gltransition #349

Open
SiviP-Glossai opened this issue Jul 11, 2022 · 3 comments
Open

Feature Request - Alpine build with gltransition #349

SiviP-Glossai opened this issue Jul 11, 2022 · 3 comments

Comments

@SiviP-Glossai
Copy link

SiviP-Glossai commented Jul 11, 2022

References:
https://github.com/transitive-bullshit/ffmpeg-gl-transition
https://github.com/clofus/ffmpeg-gl

@jrottenberg FYI

@SiviP-Glossai
Copy link
Author

SiviP-Glossai commented Jul 11, 2022

I was able to get a working build with gltransition with one issue - size is not optimal

I would be glad if you could take a look and push this one forward

Here is the git path file:

From a435378b77d94042c476561e63cc9dda60cb9d8a Mon Sep 17 00:00:00 2001
From: SiviP-Glossai <sivan.schick@glossai.co>
Date: Sun, 10 Apr 2022 09:22:18 +0300
Subject: [PATCH] gltransition compiling but is not optimal in size.

---
 docker-images/4.4/alpine313/Dockerfile | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/docker-images/4.4/alpine313/Dockerfile b/docker-images/4.4/alpine313/Dockerfile
index 41e7602..edd8373 100644
--- a/docker-images/4.4/alpine313/Dockerfile
+++ b/docker-images/4.4/alpine313/Dockerfile
@@ -512,7 +512,15 @@ RUN  \
         ./configure     --disable-debug  --disable-doc    --disable-ffplay   --enable-shared --enable-gpl  --extra-libs=-ldl && \
         make ;  make install
 
-
+## gltransitions
+RUN \
+        DIR=/tmp/gltransitions && \
+        mkdir -p ${DIR} && \
+        cd ${DIR} && \
+        git clone https://github.com/transitive-bullshit/ffmpeg-gl-transition.git && \
+        apk add --no-cache --update glew glew-dev glfw-dev mesa-dev && \
+        grep -v "define GL_TRANSITION_USING_EGL" ${DIR}/ffmpeg-gl-transition/vf_gltransition.c > /tmp/ffmpeg/libavfilter/vf_gltransition.c && \
+        cd /tmp/ffmpeg && git apply ${DIR}/ffmpeg-gl-transition/ffmpeg.diff
 
 
 
@@ -525,6 +533,8 @@ RUN  \
         --disable-ffplay \
         --enable-avresample \
         --enable-fontconfig \
+        --enable-filter=gltransition \
+        --enable-opengl \
         --enable-gpl \
         --enable-libaom \
         --enable-libaribb24 \
@@ -559,6 +569,8 @@ RUN  \
         --extra-ldflags="-L${PREFIX}/lib" \
         --extra-libs=-ldl \
         --extra-libs=-lpthread \
+        --extra-libs=-lGLEW \
+        --extra-libs=-lglfw \
         --prefix="${PREFIX}" && \
         make clean && \
         make && \
@@ -589,6 +601,7 @@ LABEL       org.opencontainers.image.authors="julien@rottenberg.info" \
             org.opencontainers.image.source=https://github.com/jrottenberg/ffmpeg
 
 ENV         LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64
+RUN         apk add --no-cache --update xvfb glew glew-dev glfw-dev mesa-dev
 
 CMD         ["--help"]
 ENTRYPOINT  ["ffmpeg"]
-- 
2.36.1.windows.1

@jrottenberg
Copy link
Owner

Hello !

Sorry for the lag.

It does look interesting, but I'm worried about the size of the resulting image, I'll try locally and compare on alpine and other base.

@SiviP-Glossai
Copy link
Author

Thanks for looking at it.
If size is an issue can we add it as a separate flavour? And not as part of alpine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants