Skip to content

Commit

Permalink
conf stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljablonski committed Mar 16, 2021
1 parent dbefaf8 commit 0381fe3
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 3 deletions.
11 changes: 11 additions & 0 deletions conf stuff/melted.conf.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set root=/

UADD decklink:0
UADD decklink:0
USET U1 consumer.mlt_profile="atsc_1080i_5994"
USET U1 consumer.real_time=0
USET U1 consumer.buffer=5
USET U1 consumer.preroll=2
USET U1 consumer.preview_file="melted_preview.0"
USET U1 consumer.channels=16
USET U1 producer.audio_index=all
11 changes: 11 additions & 0 deletions conf stuff/melted.conf.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set root=/

UADD decklink:0
UADD decklink:1
USET U1 consumer.mlt_profile="atsc_1080i_5994"
USET U1 consumer.real_time=0
USET U1 consumer.buffer=5
USET U1 consumer.preroll=2
USET U1 consumer.preview_file="melted_preview.1"
USET U1 consumer.channels=16
USET U1 producer.audio_index=all
11 changes: 11 additions & 0 deletions conf stuff/melted.conf.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set root=/

UADD decklink:0
UADD decklink:2
USET U1 consumer.mlt_profile="atsc_1080i_5994"
USET U1 consumer.real_time=0
USET U1 consumer.buffer=5
USET U1 consumer.preroll=2
USET U1 consumer.preview_file="melted_preview.2"
USET U1 consumer.channels=16
USET U1 producer.audio_index=all
11 changes: 11 additions & 0 deletions conf stuff/melted.conf.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set root=/

UADD decklink:0
UADD decklink:3
USET U1 consumer.mlt_profile="atsc_1080i_5994"
USET U1 consumer.real_time=0
USET U1 consumer.buffer=5
USET U1 consumer.preroll=2
USET U1 consumer.preview_file="melted_preview.3"
USET U1 consumer.channels=16
USET U1 producer.audio_index=all
7 changes: 7 additions & 0 deletions conf stuff/playcast.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

unit_number=$1

/viacast/playcast/sbin/start-video-preview.sh melted_preview.${unit_number} 20 >/tmp/preview_${unit_number}_log 2>/tmp/preview_${unit_number}_log_err &
/viacast/playcast/sbin/start-melted-server ${unit_number} -nodetach
#/viacast/playcast/bin/playcast-middleware
10 changes: 7 additions & 3 deletions sanitize.sh → conf stuff/sanitize.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash

date=$(date +'%Y%m%d')
source_dir=/root/melted/$date
target_dir=/root/melted/melted-playcast-$date

base_dir=/root/melted
source_dir=$base_dir/$date
target_dir=$base_dir/melted-playcast-$date

rm -rf $target_dir
mkdir $target_dir
Expand Down Expand Up @@ -34,4 +36,6 @@ cp -R $source_dir/share/mlt $target_dir/share/
strip -s $target_dir/lib/*.so*
strip -s $target_dir/lib/**/*.so*

tar -czvf $target_dir.tar.xz $target_dir/
cp $source_dir/playcast.sh $target_dir/sbin/
mkdir $target_dir/backup
# tar -czvf "./melted-playcast-${date}.tar.xz" $target_dir
31 changes: 31 additions & 0 deletions conf stuff/start-melted-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

## Figure out the install path regardless how invoked
prefix=/viacast/playcast
printf "Install prefix is \"%s\"\n" "$prefix"

one=$1
if [ ! -z "$one" ]; then
instance=".${one}"
shift
fi

# Setup the environment
export PATH="$prefix/bin:$PATH"
export LD_LIBRARY_PATH="$prefix/lib:$LD_LIBRARY_PATH"
export MLT_REPOSITORY="$prefix/lib/mlt"
export MLT_DATA="$prefix/share/mlt"
export FREI0R_PATH="$prefix/lib/frei0r-1"
export MLT_BACKGROUND_COLOR="black"
# Get additional config options (like MLT_PROFILE)
[ -e "$prefix/etc/start-melted.conf" ] && . "$prefix/etc/start-melted.conf"

#. "$prefix/stop-melted-server"
[ -e "$prefix/etc/melted.conf" ] && config="-c $prefix/etc/melted.conf${instance}"
if [ ! -z "$one" ]; then
echo Starting melted $config -port "525${one}" $@
$prefix/bin/melted $config -port "525${one}" $@
else
echo Starting melted $config $@
$prefix/bin/melted $config $@
fi
17 changes: 17 additions & 0 deletions conf stuff/stop-melted-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
instance=$1

KILL=kill
PID=(`pgrep -f "melted.*525$1"`)
if [ -z "$instance" ]; then
KILL=killall
PID=melted
fi

$KILL -INT $PID 2> /dev/null
if [ $? -eq 0 ]; then
printf "Stopping melted ... "
sleep 3
$KILL -KILL $PID 2> /dev/null
echo "[Done]"
fi

0 comments on commit 0381fe3

Please sign in to comment.