Skip to content

Instantly share code, notes, and snippets.

@granbom
Last active October 29, 2019 12:11
Show Gist options
  • Save granbom/71324bfe7b9216acbccfd42d3e7aa3a9 to your computer and use it in GitHub Desktop.
Save granbom/71324bfe7b9216acbccfd42d3e7aa3a9 to your computer and use it in GitHub Desktop.
# to=timestamp
ffmpeg -i input -ss 00:01:00 -to 00:02:00 output
# t=duration
ffmpeg -i input -ss 00:01:00 -t 00:02:00 output
# concat
ffmpeg -i "concat:input1.ts|input2.ts|input3.ts" -c copy output.ts
# convert all files in dir from srt to vtt
for file in *.srt; do ffmpeg -i "$file" "${file%.srt}".vtt; done
# extract frame from video to jpg in all files in directory
for file in *.mp4; do ffmpeg -i "$file" -ss 00:00:59.000 -vframes 1 "${file%.mp4}".jpg; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment