Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rem pp.cmd
- @echo off
- rem FILESIZE = size in bytes of input file
- set FILESIZE=%~z2
- rem DESTDRV = destination drive volume, (used to check free space)
- set DESTDRV=P:
- rem DESTPATH = destination path of remuxed file, (no trailing \)
- set DESTPATH=%DESTDRV%\model caps
- rem Check for enough free space on destination before remux, fail if not
- wmic LogicalDisk where "DeviceID='%DESTDRV%' and FreeSpace > %FILESIZE%" get DeviceID 2>&1 | find /i "%DESTDRV%" >nul || exit 1
- ffmpeg -i "%~2" -y -c:v copy -c:a copy -bsf:a aac_adtstoasc "%DESTPATH%\%~n2.mp4" && del "%~2"
- rem Want to create a site\model directory for the recordings?
- rem Comment out the line above and uncomment the two below, (change the drive - obviously).
- rem mkdir "%DESTPATH%\%~3" 2>nul
- rem ffmpeg -i "%~2" -y -c:v copy -c:a copy -bsf:a aac_adtstoasc "%DESTPATH%\%~3\%~n2.mp4" && del "%~2"
- rem '-movflags faststart' not required unless you're going to stream the resultant MP4
- rem '&&' indicates following command will only execute if previous was successful
- rem '||' indicates following command will only execute if previous command failed
- rem Args passed as follows for standalone CTBRec
- rem directory=%1
- rem file=%2
- rem model=%3
- rem site=%4
- rem unixtime=%5
- rem Learn some DOS commands people, it ain't that hard
- rem https://www.robvanderwoude.com/batchstart.php
- rem https://www.dostips.com/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement