Credit Andrey for script and Andrew for configure mods
authorGood Guy <[email protected]>
Fri, 4 Nov 2022 21:34:41 +0000 (15:34 -0600)
committerGood Guy <[email protected]>
Fri, 4 Nov 2022 21:34:41 +0000 (15:34 -0600)
cinelerra-5.1/configure.ac
cinelerra-5.1/doc/vaapi_proxy.sh [new file with mode: 0755]

index 79533426fd73f8f1bf3c327ea5d6b744ca98e6dd..1329c96ce93854f819a510841a0f0749c3a6f683 100644 (file)
@@ -599,7 +599,7 @@ if test "x$HAVE_$1" != "xno"; then
 fi
 ])
 
-IMMATH_HEADERS=$(pkg-config --cflags Imath)
+IMMATH_HEADERS=$(pkg-config --cflags Imath 2>/dev/null)
 
 CHECK_LIB([X11], [X11], [XOpenDisplay])
 CHECK_HEADERS([X11], [X11 headers], [X11/X.h X11/Xlib.h X11/Xutil.h X11/cursorfont.h])
@@ -821,16 +821,16 @@ CHECK_WANT([LV2], [auto], [use lv2], [
  CHECK_LIB([sord], [sord-0], [sord_world_new])
  CHECK_LIB([serd], [serd-0], [serd_reader_new])
  CHECK_LIB([sratom], [sratom-0], [sratom_new])
- CFLAGS="-I/usr/include/lilv-0 -I/usr/local/include/lilv-0 `pkg-config --cflags lilv-0`"
+ CFLAGS="-I/usr/include/lilv-0 -I/usr/local/include/lilv-0 `pkg-config --cflags lilv-0 2>/dev/null`"
  CHECK_HEADERS([lilv], [lilv headers], [lilv/lilv.h])
- CFLAGS="-I/usr/include/serd-0 -I/usr/local/include/serd-0 `pkg-config --cflags serd-0`"
+ CFLAGS="-I/usr/include/serd-0 -I/usr/local/include/serd-0 `pkg-config --cflags serd-0 2>/dev/null`"
  CHECK_HEADERS([serd], [serd headers], [serd/serd.h])
- CFLAGS="-I/usr/include/sord-0 -I/usr/local/include/sord-0 `pkg-config --cflags sord-0`"
+ CFLAGS="-I/usr/include/sord-0 -I/usr/local/include/sord-0 `pkg-config --cflags sord-0 2>/dev/null`"
  CHECK_HEADERS([sord], [sord headers], [sord/sord.h])
- CFLAGS="-I/usr/include/sratom-0 -I/usr/local/include/sratom-0 `pkg-config --cflags sratom-0`"
+ CFLAGS="-I/usr/include/sratom-0 -I/usr/local/include/sratom-0 `pkg-config --cflags sratom-0 2>/dev/null`"
  CHECK_HEADERS([sratom], [sratom headers], [sratom/sratom.h])
  CHECK_LIB([suil], [suil-0], [suil_instance_new])
- CFLAGS="-I/usr/include/suil-0 -I/usr/local/include/suil-0 `pkg-config --cflags  suil-0`"
+ CFLAGS="-I/usr/include/suil-0 -I/usr/local/include/suil-0 `pkg-config --cflags  suil-0 2>/dev/null`"
  CHECK_HEADERS([suil], [suil headers], [suil/suil.h])
  CFG_CFLAGS+=" $(pkg-config --cflags lilv-0) $(pkg-config --cflags suil-0)"
  LIBS="$saved_LIBS"
@@ -1082,6 +1082,7 @@ done
 # build extras
 if test "x$WANT_CLANG" = "xyes" ; then
   FFMPEG_EXTRA_CFG+=' --cc=clang --cxx=clang++'
+  CFG_CFLAGS+=" -Wno-unknown-warning-option"
 fi
 if test "x$HAVE_tiff" = "xyes"; then
   if test "x$HAVE_jbig" = "xyes"; then
diff --git a/cinelerra-5.1/doc/vaapi_proxy.sh b/cinelerra-5.1/doc/vaapi_proxy.sh
new file mode 100755 (executable)
index 0000000..6109f8a
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+filename="$1"
+fileout="${filename%.*}"
+proxy="6"
+# Hardware encode AMD
+ffmpeg -threads 2 -hwaccel vaapi  -vaapi_device /dev/dri/renderD128 \
+ -i  "$1" -c:v h264_vaapi -vf "format=nv12,hwupload,scale_vaapi=iw/'$proxy':ih/'$proxy'" \
+ -vcodec h264_vaapi  -preset fast -c:a copy \
+ -bf 0 -profile:v 66 "$fileout".proxy"$proxy"-mp4.mp4