Skip to content

Commit

Permalink
epm: play added svp4 (eterbug #17842)
Browse files Browse the repository at this point in the history
  • Loading branch information
Boria138 authored and vitlav committed Dec 17, 2024
1 parent b2e069c commit 3a7e7a0
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
40 changes: 40 additions & 0 deletions pack.d/svp4.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh

TAR="$1"
RETURNTARNAME="$2"

. $(dirname $0)/common.sh

PRODUCT="svp4"
# svp4-linux.4.6.263
VERSION="$(basename "$TAR" .tar.bz2 | grep -oP '\d+\.\d+(\.\d+)?')"

mkdir -p opt/svp4
erc $TAR

mkdir installer
LANG=C grep --only-matching --byte-offset --binary --text $'7z\xBC\xAF\x27\x1C' "svp4-linux-64.run" |
cut -f1 -d: |
while read ofs; do
dd if="svp4-linux-64.run" bs=1M iflag=skip_bytes status=none skip="${ofs}" of="installer/bin-${ofs}.7z"
done
for f in "installer/"*.7z; do
7z -bd -bb0 -y x -o"extracted/" "${f}" || true
done

mv extracted/* opt/svp4/

PKGNAME=$PRODUCT-$VERSION

erc a $PKGNAME.tar opt

cat <<EOF >$PRODUCT.eepm.yaml
name: $PRODUCT
group: Video
license: LicenseRef-custom
url: https://www.svp-team.com/wiki/SVP:Linux
summary: SmoothVideo Project 4 (SVP4)
description: SVP converts any video to 60 fps (and even higher) and performs this in real time right in your favorite video player.
EOF

return_tar $PKGNAME.tar
15 changes: 15 additions & 0 deletions play.d/svp4.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

PKGNAME=svp4
SUPPORTEDARCHES="x86_64"
VERSION="$2"
DESCRIPTION="SmoothVideo Project 4 (SVP4)"
URL="https://svp-team.com/wiki/SVP:Linux"

. $(dirname $0)/common.sh

warn_version_is_not_supported

PKGURL="http://www.svp-team.com/files/svp4-latest.php?linux"

install_pack_pkgurl
37 changes: 37 additions & 0 deletions repack.d/svp4.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh -x

# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"

PRODUCTDIR=/opt/svp4

. $(dirname $0)/common.sh


# pack icons
for i in 32 48 64 128 ; do
[ -r $BUILDROOT/$PRODUCTDIR/svp-manager4-$i.png ] || continue
mkdir -p $BUILDROOT/usr/share/icons/hicolor/${i}x${i}/apps/
cp $BUILDROOT/$PRODUCTDIR/svp-manager4-$i.png $BUILDROOT/usr/share/icons/hicolor/${i}x${i}/apps/svp-manager4.png
done
subst "s|%files|%files\n/usr/share/icons/hicolor/*x*/apps/svp-manager4.png|" $SPEC

cat <<EOF | create_file /usr/share/applications/$PRODUCT.desktop
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=SVP 4 Linux
GenericName=Real time frame interpolation
Type=Application
Categories=Multimedia;AudioVideo;Player;Video;
MimeType=video/x-msvideo;video/x-matroska;video/webm;video/mpeg;video/mp4;
Terminal=false
StartupNotify=true
Exec=$PRODUCT %f
Icon=svp-manager4.png
EOF

add_requires mpv libmediainfo python3-module-vapoursynth libqt5-concurrent
add_libs_requires
add_bin_link_command $PRODUCT $PRODUCTDIR/SVPManager

0 comments on commit 3a7e7a0

Please sign in to comment.