add 218play patch

This commit is contained in:
nap.liu 2022-12-16 14:00:20 +08:00
parent 9b0b72bfa1
commit b9ef50d9ac
3 changed files with 20 additions and 56 deletions

BIN
dts-patch.tar.gz Executable file

Binary file not shown.

View File

@ -1,48 +0,0 @@
#!/bin/bash
#########################
# VARS
#########################
pid=$$
stderrfile="/tmp/gstlaunch-$pid.stderr"
logfile="/tmp/gstreamer.log"
#########################
# UTILS
#########################
function log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] [$1] $2" >> $logfile
}
function newline() {
echo "" >> $logfile
}
function info() {
log "INFO" "$1"
}
function handle_error() {
log "ERROR" "Error on line $(caller) "
endprocess
}
function endprocess() {
info "========================================[end gst $pid]"
newline
rm "$stderrfile"
exit 1
}
#########################
# ENTRYPOINT
#########################
trap endprocess SIGTERM
trap handle_error ERR
newline
info "========================================[start gst $pid]"
info "GST_ARGS: $*"
/var/packages/gstreamer/target/bin/gst-launch-1.0 "$@" 2> $stderrfile

View File

@ -9,17 +9,22 @@ repo_base_url="https://git.js-css.com/nap/VideoStation-FFMPEG-Patcher"
version="2.0"
action="patch"
branch="master"
dependencies=("VideoStation" "ffmpeg" "gstreamer")
wrappers=("ffmpeg" "gst-launch-1.0")
dependencies=("VideoStation" "ffmpeg")
wrappers=("ffmpeg")
vs_path=/var/packages/VideoStation/target
vs_lib_path="$vs_path/lib/gstreamer"
libsynovte_path="$vs_path/lib/libsynovte.so"
cp_bin_path=/var/packages/CodecPack/target/bin
# CodecPack path
cp_path=/var/packages/CodecPack/target
cp_bin_path="$cp_path/bin"
cp_lib_path="$cp_path/lib/gstreamer"
cp_to_patch=(
"ffmpeg41:ffmpeg"
"ffmpeg27:ffmpeg"
"ffmpeg33:ffmpeg"
"gst-launch-1.0:gst-launch-1.0"
)
###############################
@ -94,13 +99,10 @@ function patch() {
info "Downloading and installing $filename's wrapper..."
# repo_base_url="https://git.js-css.com/nap/VideoStation-FFMPEG-Patcher"
# https://git.js-css.com/github/trackerslist/raw/branch/master/README.md
wget -q -O - "$repo_base_url/raw/branch/$branch/$filename-wrapper.sh" > "$vs_path/bin/$filename"
# wget -q -O - "$repo_base_url/blob/$branch/$filename-wrapper.sh?raw=true" > "$vs_path/bin/$filename"
chown root:VideoStation "$vs_path/bin/$filename"
chmod 750 "$vs_path/bin/$filename"
chmod u+s "$vs_path/bin/$filename"
fi
@ -127,6 +129,16 @@ function patch() {
info "Enabling eac3, dts and truehd"
sed -i -e 's/eac3/3cae/' -e 's/dts/std/' -e 's/truehd/dheurt/' "$libsynovte_path"
wget -q -O - "$repo_base_url/raw/branch/$branch/dts-patch.tar.gz" > "/tmp/dts-patch.tar.gz"
# patch CodecPack & VideoStation gstreamer plugin
tar -xzvf /tmp/dts-patch.tar.gz -C $vs_lib_path;
tar -xzvf /tmp/dts-patch.tar.gz -C $cp_lib_path;
# force refresh gstreamer plugin cache
rm -rf /var/packages/VideoStation/etc/gstreamer-1.0/registry.aarch64.bin
rm -rf /var/packages/CodecPack/etc/gstreamer-1.0/registry.aarch64.bin
restart_packages
echo ""