21.04.2022, 09:27
@echo off
if "%~1"=="" (
echo function: adjust video Display Aspect Ratio, will copy video and audio streams to a new file.
echo usage: ffmpeg-new-aspect [file] [-aspect a:b]
echo -aspect, default aspect is 4:3
goto end
)
set aspectStr="4:3"
if "%2"=="-aspect" set aspectStr="%3"
set file=%~1
set newFile=%~n1[new-aspect]%~x1
@echo on
# ffmpeg -i "%file%" -scodec copy -acodec copy -vcodec copy -aspect 4:3 "%newFile%"
ffmpeg -i "%file%" -c copy -map 0 -aspect "%aspectStr%" "%newFile%"
:end
if "%~1"=="" (
echo function: adjust video Display Aspect Ratio, will copy video and audio streams to a new file.
echo usage: ffmpeg-new-aspect [file] [-aspect a:b]
echo -aspect, default aspect is 4:3
goto end
)
set aspectStr="4:3"
if "%2"=="-aspect" set aspectStr="%3"
set file=%~1
set newFile=%~n1[new-aspect]%~x1
@echo on
# ffmpeg -i "%file%" -scodec copy -acodec copy -vcodec copy -aspect 4:3 "%newFile%"
ffmpeg -i "%file%" -c copy -map 0 -aspect "%aspectStr%" "%newFile%"
:end