Skip to content

Commit

Permalink
Improve the batch exporting example powershell script
Browse files Browse the repository at this point in the history
  • Loading branch information
Tremeschin committed Oct 5, 2024
1 parent a6b8e93 commit 9d81cb4
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions Examples/Batch.ps1
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
#!/usr/bin/env pwsh
# (c) MIT License, Tremeschin
#
# This PowerShell script runs depthflow for all images on a "input" folder
# in the current directory, and batch renders videos to "output"

if (-not (Test-Path "output")) {
New-Item -ItemType Directory -Path "output"
}

# This PowerShell script runs depthflow for all images on a "inputs" folder
# in the current directory, and batch renders videos to "outputs"
#
# Note: Save it as "run.ps1", right click and "Run with PowerShell" to execute
#
# Note: Grab a release and rename it to "depthflow.exe" on the same folder
#
Get-ChildItem -Path "inputs" | ForEach-Object {
$filename = $_.BaseName

# Change or add variations and parameters here!
depthflow.exe input -i $_.FullName `
main -o "./output/$filename.mp4"
.\depthflow.exe input -i $_.FullName `
orbital `
main -o "./outputs/$filename-orbital.mp4"

# depthflow.exe input -i $_.FullName `
# dolly --intensity 0.5 `
# main -o "./outputs/$filename-orbital.mp4"
.\depthflow.exe input -i $_.FullName `
horizontal --intensity 0.6 `
main -o "./outputs/$filename-horizontal.mp4" --loop 3
}

Write-Host "Press any key to continue..."
Write-Host "Press any key to continue..."

0 comments on commit 9d81cb4

Please sign in to comment.