From a6a029b6dbbfc2535d18e304343e6e6bac1e4835 Mon Sep 17 00:00:00 2001 From: 0xb00bface <0xboobface@gmail.com> Date: Tue, 29 Sep 2020 15:40:26 +0200 Subject: [PATCH] Remove post-processing example scripts --- client/src/assembly/linux-jre.xml | 4 ---- client/src/assembly/macos-jre.xml | 4 ---- client/src/assembly/win64-jre.xml | 8 -------- client/src/main/resources/pp.bat | 18 ------------------ client/src/main/resources/pp.ps1 | 19 ------------------- client/src/main/resources/pp.sh | 28 ---------------------------- 6 files changed, 81 deletions(-) delete mode 100644 client/src/main/resources/pp.bat delete mode 100644 client/src/main/resources/pp.ps1 delete mode 100755 client/src/main/resources/pp.sh diff --git a/client/src/assembly/linux-jre.xml b/client/src/assembly/linux-jre.xml index ffc7487f..ecac7150 100644 --- a/client/src/assembly/linux-jre.xml +++ b/client/src/assembly/linux-jre.xml @@ -12,10 +12,6 @@ true ctbrec.sh - - ${project.basedir}/src/main/resources/pp.sh - ctbrec - ${project.build.directory}/${name.final}.jar ctbrec diff --git a/client/src/assembly/macos-jre.xml b/client/src/assembly/macos-jre.xml index 25afe97a..69a7cc5f 100644 --- a/client/src/assembly/macos-jre.xml +++ b/client/src/assembly/macos-jre.xml @@ -12,10 +12,6 @@ true ctbrec.sh - - ${project.basedir}/src/main/resources/pp.sh - ctbrec - ${project.build.directory}/${name.final}.jar ctbrec diff --git a/client/src/assembly/win64-jre.xml b/client/src/assembly/win64-jre.xml index fd2483c4..378f2925 100644 --- a/client/src/assembly/win64-jre.xml +++ b/client/src/assembly/win64-jre.xml @@ -10,14 +10,6 @@ ${project.build.directory}/ctbrec.exe ctbrec - - ${project.basedir}/src/main/resources/pp.bat - ctbrec - - - ${project.basedir}/src/main/resources/pp.ps1 - ctbrec - ${project.build.directory}/${name.final}.jar ctbrec diff --git a/client/src/main/resources/pp.bat b/client/src/main/resources/pp.bat deleted file mode 100644 index 22af6b00..00000000 --- a/client/src/main/resources/pp.bat +++ /dev/null @@ -1,18 +0,0 @@ -REM This is an post-processing example script -REM This script is just a wrapper to call the actual powershell script. -REM But you can do something completly different here, too. -REM -REM If you want to use powershell, make sure, that your system allows the execution of powershell scripts: -REM 1. Open cmd.exe as administrator (Click on start, type cmd.exe, right-click on it and select "Run as administrator") -REM 2. Execute powershell -REM 3. Execute Set-ExecutionPolicy Unrestricted - -@echo off - -set directory=%1 -set file=%2 -set model=%3 -set site=%4 -set unixtime=%5 - -powershell -F C:\Users\username\Desktop\ctbrec\pp.ps1 -dir "%directory%" -file "%file%" -model "%model%" -site "%site%" -time "%unixtime%" \ No newline at end of file diff --git a/client/src/main/resources/pp.ps1 b/client/src/main/resources/pp.ps1 deleted file mode 100644 index 491f4796..00000000 --- a/client/src/main/resources/pp.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -# parse command line parameters -param ( - [Parameter(Mandatory=$true)][string]$dir, - [Parameter(Mandatory=$true)][string]$file, - [Parameter(Mandatory=$true)][string]$model, - [Parameter(Mandatory=$true)][string]$site, - [Parameter(Mandatory=$true)][string]$time -) - -# convert unixtime into a date object -$epoch = get-date "1/1/1970" -$date = $epoch.AddSeconds($time) - -# print out a theoretical new file name, you could use "rename" here, to rename the file -# or move it somewhere or ... -$newname = "$($model)_$($site)_$($date.toString("yyyyMMdd-HHmm")).ts" -Rename-Item -Path $file -NewName $newname -Move-Item -Path "$($dir)\$($newname)" -Destination "c:\Users\username\Desktop\$($newname)" -Remove-Item -Path $dir diff --git a/client/src/main/resources/pp.sh b/client/src/main/resources/pp.sh deleted file mode 100755 index fd26ea0b..00000000 --- a/client/src/main/resources/pp.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# $1 directory (absolute path) -# $2 file (absolute path) -# $3 model name -# $4 site name -# $5 unixtime - -# get the filename without path -FILE=`basename $2` - -# format unixtime to human readable -TIME=$(date --date="@$5" +%d.%m.%Y_%H:%M) - -# define filename of end result -MP4=$(echo "$1/$4_$3_$TIME.mp4") - -# remux ts to mp4 -ffmpeg -i "$2" -c:v copy -c:a copy -f mp4 "$MP4" - -# move mp4 to target directory -mv "$MP4" /tmp - -# delete the original .ts file -rm "$2" - -# delete the directory of the recording -rm -r "$1"