Skip to content

Instantly share code, notes, and snippets.

@wangjiezhe
Created April 8, 2022 08:03
Show Gist options
  • Save wangjiezhe/76c9099c64baf3c3d30ce4a24aef5f4a to your computer and use it in GitHub Desktop.
Save wangjiezhe/76c9099c64baf3c3d30ce4a24aef5f4a to your computer and use it in GitHub Desktop.
合并文件夹内的所有视频文件
Param ($order = $(throw "Order parameter is required"))
$outfile = "【22春】9年级新思维精讲-第{0}节课.mp4" -f $order
$listfile = "list.txt"
New-Item -Force $listfile
Get-ChildItem -Name *.flv | ForEach-Object {
$tmp = "file './{0}'" -f $_
Add-Content -Path $listfile -Value $tmp
}
ffmpeg -y -f concat -safe 0 -i $listfile -c copy $outfile
Remove-Item $listfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment