Skip to content

Instantly share code, notes, and snippets.

@KylePDavis
Created July 4, 2025 23:56
Show Gist options
  • Save KylePDavis/6816e226ce98552fdf51a77e7404784a to your computer and use it in GitHub Desktop.
Save KylePDavis/6816e226ce98552fdf51a77e7404784a to your computer and use it in GitHub Desktop.
#!/bin/bash
set -o errexit -o pipefail
################################################################################
# Patches Devil May Cry HD Collection games to work on macOS with CrossOver.
################################################################################
# If not in main directory with launcher then go there
if ! [ -f "dmcLauncher.exe" ]; then
cd "$HOME/Library/Application Support/CrossOver/Bottles/Steam/drive_c/Program Files (x86)/Steam/steamapps/common/Devil May Cry HD Collection/"
fi
# Check for ffmpeg
if ! which ffmpeg &>/dev/null; then
echo "ERROR: You need ffmpeg installed to proceed."
exit 1
fi
# Re-encode videos to something simpler so they work
for D in data/dmc{1,2,3,launcher}/Video; do
echo "# Re-encoding videos: $D ..."
# Backup of original video directory
[ -d "$D.bak" ] || mv "$D" "$D.bak"
# Re-encode videos for this directory
for F in $(cd "$D.bak"; ls *.wmv); do
echo "## Re-encoding video: $D/$F ..."
ffmpeg -y -v quiet -stats -i "$D.bak/$F" -c:v mjpeg -c:a mp3 "$D/$F"
done
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment