fix truehd\eac3\dts
This commit is contained in:
BIN
dts-patch.tar.gz
BIN
dts-patch.tar.gz
Binary file not shown.
BIN
gstreamer-patch.tar.gz
Executable file
BIN
gstreamer-patch.tar.gz
Executable file
Binary file not shown.
52
gstreamer-wrapper.sh
Normal file
52
gstreamer-wrapper.sh
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# VARS
|
||||||
|
#########################
|
||||||
|
|
||||||
|
pid=$$
|
||||||
|
stderrfile="/tmp/gstreamer.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-launch $pid]"
|
||||||
|
newline
|
||||||
|
# rm -f "$stderrfile"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#########################
|
||||||
|
# ENTRYPOINT
|
||||||
|
#########################
|
||||||
|
|
||||||
|
trap endprocess SIGTERM
|
||||||
|
trap handle_error ERR
|
||||||
|
|
||||||
|
newline
|
||||||
|
info "========================================[start gst-launch $pid]"
|
||||||
|
info "DEFAULT_ARGS: $*"
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=/var/packages/VideoStation/target/lib/patch/lib/
|
||||||
|
export GST_PLUGIN_PATH=/var/packages/VideoStation/target/lib/patch/plugins/
|
||||||
|
|
||||||
|
/var/packages/VideoStation/target/bin/gst-launch-1.0.orig "$@" 2>> $stderrfile
|
||||||
|
|
||||||
28
patcher.sh
28
patcher.sh
@@ -10,21 +10,24 @@ version="2.0"
|
|||||||
action="patch"
|
action="patch"
|
||||||
branch="master"
|
branch="master"
|
||||||
dependencies=("VideoStation" "ffmpeg")
|
dependencies=("VideoStation" "ffmpeg")
|
||||||
wrappers=("ffmpeg")
|
wrappers=("ffmpeg" "gstreamer")
|
||||||
|
|
||||||
vs_path=/var/packages/VideoStation/target
|
vs_path=/var/packages/VideoStation/target
|
||||||
vs_lib_path="$vs_path/lib/gstreamer"
|
vs_lib_path="$vs_path/lib"
|
||||||
libsynovte_path="$vs_path/lib/libsynovte.so"
|
libsynovte_path="$vs_path/lib/libsynovte.so"
|
||||||
|
|
||||||
# CodecPack path
|
# CodecPack path
|
||||||
cp_path=/var/packages/CodecPack/target
|
cp_path=/var/packages/CodecPack/target
|
||||||
cp_bin_path="$cp_path/bin"
|
cp_bin_path="$cp_path/bin"
|
||||||
cp_lib_path="$cp_path/lib/gstreamer"
|
cp_lib_path="$cp_path/lib"
|
||||||
|
|
||||||
|
patch_package="gstreamer-patch.tar.gz"
|
||||||
|
|
||||||
cp_to_patch=(
|
cp_to_patch=(
|
||||||
"ffmpeg41:ffmpeg"
|
"ffmpeg41:ffmpeg"
|
||||||
"ffmpeg27:ffmpeg"
|
"ffmpeg27:ffmpeg"
|
||||||
"ffmpeg33:ffmpeg"
|
"ffmpeg33:ffmpeg"
|
||||||
|
"gst-launch-1.0:gst-launch-1.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
@@ -129,22 +132,21 @@ function patch() {
|
|||||||
info "Enabling eac3, dts and truehd"
|
info "Enabling eac3, dts and truehd"
|
||||||
sed -i -e 's/eac3/3cae/' -e 's/dts/std/' -e 's/truehd/dheurt/' "$libsynovte_path"
|
sed -i -e 's/eac3/3cae/' -e 's/dts/std/' -e 's/truehd/dheurt/' "$libsynovte_path"
|
||||||
|
|
||||||
|
info "Downloading gstreamer patch"
|
||||||
|
wget -q -O - "$repo_base_url/raw/branch/$branch/$patch_package" > "/tmp/$patch_package"
|
||||||
|
|
||||||
info "Downloading gstreamer dts patch"
|
# patch VideoStation gstreamer plugin
|
||||||
wget -q -O - "$repo_base_url/raw/branch/$branch/dts-patch.tar.gz" > /tmp/dts-patch.tar.gz
|
info "Patching gstreamer"
|
||||||
|
tar -xzvf "/tmp/$patch_package" -C $vs_lib_path;
|
||||||
# patch CodecPack & VideoStation gstreamer plugin
|
# tar -xzvf "/tmp/$patch_package" -C $cp_lib_path;
|
||||||
info "Patching gstreamer plugin"
|
info "Patching gstreamer done"
|
||||||
tar -xzvf /tmp/dts-patch.tar.gz -C $vs_lib_path;
|
|
||||||
tar -xzvf /tmp/dts-patch.tar.gz -C $cp_lib_path;
|
|
||||||
info "Patching dts patch done"
|
|
||||||
|
|
||||||
# force refresh gstreamer plugin cache
|
# force refresh gstreamer plugin cache
|
||||||
rm -rf /var/packages/VideoStation/etc/gstreamer-1.0/registry.aarch64.bin
|
rm -rf /var/packages/VideoStation/etc/gstreamer-1.0/registry.aarch64.bin
|
||||||
rm -rf /var/packages/CodecPack/etc/gstreamer-1.0/registry.aarch64.bin
|
# rm -rf /var/packages/CodecPack/etc/gstreamer-1.0/registry.aarch64.bin
|
||||||
info "Refresh gstreamer plugin cache done"
|
info "Refresh gstreamer plugin cache done"
|
||||||
|
|
||||||
rm /tmp/dts-patch.tar.gz
|
rm "/tmp/$patch_package"
|
||||||
|
|
||||||
restart_packages
|
restart_packages
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user