diff --git a/WallpaperEngineTools/ffmpeg-fix-container.ps1 b/WallpaperEngineTools/ffmpeg-fix-container.ps1 new file mode 100644 index 0000000..b86e633 --- /dev/null +++ b/WallpaperEngineTools/ffmpeg-fix-container.ps1 @@ -0,0 +1,12 @@ +# With ffmpeg simply copy the vidoe and auto contents into an mp4 container + +# args[0] = file path +# args[1] = -d or --delete to delete the original file after conversion +$file = Get-ChildItem $args[0] +$del = $args[1] +# Invoke ffmpeg to copy the video and audio streams into an mp4 container +ffmpeg -i $file.FullName -c copy "$($file.BaseName).mp4" +# Delete the original file if the second argument is -d or --delete +if ($del -eq "-d" -or $del -eq "--delete") { + Remove-Item $file +} \ No newline at end of file