StevenTsvetkov
6/2/2017 - 12:14 PM

Video processing with FFmpeg

Video processing with FFmpeg

# Cut end (length)
ffmpeg -t 55:00 -i file.mp4 -c copy out.mp4
# Cut begining (cut amount)
ffmpeg -ss 5:00 -i file.mp4 -c copy out.mp4
# Concatinate videos (MP4)
set path2exe=ffmpeg.exe
(for %%i in (*.mp4) do @echo file '%%i') > list.txt
%path2exe% -f concat -i list.txt -c copy output.mp4
del list.txt
# Clean up
del output.mp4
del output-compressed.mp4

# Convert
for %%a in ("*.flv") do ffmpeg -i "%%a" -codec copy "%%~na.mp4"

#Concat
set path2exe=ffmpeg.exe
(for %%i in (*.mp4) do @echo file '%%i') > list.txt
%path2exe% -f concat -i list.txt -c copy output.mp4

# Clean up
for %%a in ("*.flv") do del "%%~na.mp4"
del list.txt

# Compress
ffmpeg -i output.mp4 -vcodec h264 -acodec aac output-compressed.mp4