Skip to content

Instantly share code, notes, and snippets.

@bencoveney
Last active July 24, 2022 21:08
Show Gist options
  • Save bencoveney/2dab2bfe05a42732640b3abc1aaa7983 to your computer and use it in GitHub Desktop.
Save bencoveney/2dab2bfe05a42732640b3abc1aaa7983 to your computer and use it in GitHub Desktop.
Concatenate video files using ffmpeg on windows

Requires ffmpeg installed and in $PATH.

Clip all video files using windows photos (to get *.DRV_TRIM.mp4 files)

Open powershell to the directory with the trimmed videos:

cd  'C:\Users\benco\Videos\Counter-strike  Global Offensive\'
cd ...

Write list file of videos:

Get-ChildItem -Path . -Filter '*DVR_Trim.mp4' -Name | % { "file '$($_)'" } | out-file -encoding ASCII list.txt

Rearrange if desired.

Run ffmpeg:

ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment