Remove post-processing example scripts
This commit is contained in:
parent
0b281961d1
commit
a6a029b6db
|
@ -12,10 +12,6 @@
|
||||||
<filtered>true</filtered>
|
<filtered>true</filtered>
|
||||||
<destName>ctbrec.sh</destName>
|
<destName>ctbrec.sh</destName>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<source>${project.basedir}/src/main/resources/pp.sh</source>
|
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<source>${project.build.directory}/${name.final}.jar</source>
|
<source>${project.build.directory}/${name.final}.jar</source>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
|
|
|
@ -12,10 +12,6 @@
|
||||||
<filtered>true</filtered>
|
<filtered>true</filtered>
|
||||||
<destName>ctbrec.sh</destName>
|
<destName>ctbrec.sh</destName>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<source>${project.basedir}/src/main/resources/pp.sh</source>
|
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<source>${project.build.directory}/${name.final}.jar</source>
|
<source>${project.build.directory}/${name.final}.jar</source>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
|
|
|
@ -10,14 +10,6 @@
|
||||||
<source>${project.build.directory}/ctbrec.exe</source>
|
<source>${project.build.directory}/ctbrec.exe</source>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
|
||||||
<source>${project.basedir}/src/main/resources/pp.bat</source>
|
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
|
||||||
</file>
|
|
||||||
<file>
|
|
||||||
<source>${project.basedir}/src/main/resources/pp.ps1</source>
|
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
|
||||||
</file>
|
|
||||||
<file>
|
<file>
|
||||||
<source>${project.build.directory}/${name.final}.jar</source>
|
<source>${project.build.directory}/${name.final}.jar</source>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
|
|
|
@ -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%"
|
|
|
@ -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
|
|
|
@ -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"
|
|
Loading…
Reference in New Issue