Skip to content

Instantly share code, notes, and snippets.

@jyhsu2000
Last active May 24, 2018 08:26
Show Gist options
  • Save jyhsu2000/7edc172dff0e655003ebb884cb9f535f to your computer and use it in GitHub Desktop.
Save jyhsu2000/7edc172dff0e655003ebb884cb9f535f to your computer and use it in GitHub Desktop.
全資料夾轉檔
REM 轉檔
for %f in (*.mts) do ffmpeg -deinterlace -i "%~f" "%~nf.mp4"
REM 轉擋+保留修改時間/存取時間
for %f in (*.mts) do ffmpeg -deinterlace -i "%~f" "%~nf.mp4" & touch -r "%~f" "%~nf.mp4"
for %f in (*.mp4) do ffmpeg -deinterlace -i "%~f" "%~nf_2.mp4" & touch -r "%~f" "%~nf_2.mp4"
# Linux
for i in *.MTS; do ffmpeg -deinterlace -i "$i" "${i%.*}.mp4"; done
for i in *.MTS; do ffmpeg -deinterlace -i "$i" "${i%.*}.mp4"; touch -r "$i" "${i%.*}.mp4"; done
for i in *.MTS; do ffmpeg -deinterlace -i "$i" -strict -2 "${i%.*}.mp4"; touch -r "$i" "${i%.*}.mp4"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment