Skip to content

Instantly share code, notes, and snippets.

@frankIT
Last active November 27, 2017 00:51
Show Gist options
  • Save frankIT/4b856c7d99339109859c9b31630297ac to your computer and use it in GitHub Desktop.
Save frankIT/4b856c7d99339109859c9b31630297ac to your computer and use it in GitHub Desktop.
no reencoding cli video edit using avconv/ffmpeg
#!/bin/bash
# cut chunk by giving start time and length
avconv -ss 00:02:57.00 -i GP015230.MP4 -t 23 -c copy GP015230[00.02.57.00+23].mp4
# turn video 90° clockwise
avconv -i phenomenoh.mp4 -vf "transpose=1" phenomeno_portrait.mp4
# scale/resize canvas but keep video aspect ratio filling the gaps with black
avconv -i phenomeno.mp4 -vf "scale=720:1280:force_original_aspect_ratio=decrease,pad=720:1280:(ow-iw)/2:(oh-ih)/2" phenomeno_canvas_portrait_720.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment