Skip to content

Instantly share code, notes, and snippets.

@pezcode
Last active March 5, 2018 04:41
Show Gist options
  • Save pezcode/2141f3793f521effbd5390da3f79cbea to your computer and use it in GitHub Desktop.
Save pezcode/2141f3793f521effbd5390da3f79cbea to your computer and use it in GitHub Desktop.
FFmpeg: cut video without re-encoding (PowerShell script)
# cut video without re-encoding
# syntax for start and end times:
# http://ffmpeg.org/ffmpeg-utils.html#time-duration-syntax
param(
[Parameter(Mandatory=$true)][string]$InputPath,
[Parameter(Mandatory=$true)][string]$OutputPath,
[string]$StartTime="0",
[string]$EndTime="99:59:59.99"
)
ffmpeg -y -v warning -i $InputPath -ss $StartTime -to $EndTime -c copy $OutputPath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment