schorman

Pad for DTS encoding

Jul 27th, 2020 (edited)
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 0.43 KB | None | 0 0
  1. @ECHO OFF
  2. TITLE "DTS Pad"
  3. if [%1]==[] goto :eof
  4. set Destination=%~d1\%~p1
  5. set /A frame=512
  6. set Destination=%~d1\%~p1
  7. cd /d %Destination%
  8. md Padded
  9. cd /d "%~dp0"
  10. :loop
  11. for /f %%i in ('soxi -s "%~1"') do set /A length=%%i
  12. set /A pad=(%frame%-%length%%%frame%)
  13. if %pad%==%frame% set /A pad=0
  14. echo %pad% >"%Destination%\%~n1"_pad.txt
  15. sox "%~1" "%Destination%\Padded\%~n1"_pad.wav pad 0s %pad%s
  16. shift
  17. if not [%1]==[] goto loop
Add Comment
Please, Sign In to add comment