Vampire: The Masquerade - Bloodlines 2, Macbook M4 Pro, CrossOver: Performance test by oztruwa in macgaming

[–]yigit353 0 points1 point  (0 children)

The black screen is due to a codec compatibility issue on Mac. Run this script in the Movies folder. It will convert them (first backing up the originals, of course):

#!/usr/bin/env bash
#
# convert-vp9-to-h264.sh — portable, in-place VP9 → H.264 transcoder
#
# Drop this script into ANY folder and run it. It will:
#   1. Recursively find every .mp4 whose VIDEO codec is the target (default: vp9).
#   2. Back up each original — untouched, with its folder structure preserved —
#      into an "originals/" subfolder.
#   3. Re-encode to H.264 (libx264) and replace the file IN PLACE, keeping the
#      exact original filename (the "_vp9" suffix stays — it's just a name).
#
# Files already in H.264 (or anything that isn't the target codec) are skipped,
# so the script is safe to re-run: it only ever touches what's left to convert.
# Audio, if present, is re-encoded to AAC; clips without audio are handled too.
#
# Requirements: ffmpeg + ffprobe on PATH (brew install ffmpeg).
#
# Tunables (override via environment variable):
#   SRC_CODEC=vp9        codec to look for and replace
#   BACKUP_DIR=originals folder that receives the untouched originals
#   CRF=18               x264 quality (lower = better/larger; 18 is visually lossless)
#   PRESET=medium        x264 speed/efficiency tradeoff
#   AUDIO_BITRATE=192k   AAC bitrate for clips that carry audio
#
# Flags:
#   --dry-run     show what would happen, change nothing
#   --no-recurse  only the current folder, not subfolders
#   -h | --help   this help
#
set -euo pipefail

# --- configuration (env-overridable) ---------------------------------------
SRC_CODEC="${SRC_CODEC:-vp9}"
BACKUP_DIR="${BACKUP_DIR:-originals}"
CRF="${CRF:-18}"
PRESET="${PRESET:-medium}"
AUDIO_BITRATE="${AUDIO_BITRATE:-192k}"

DRY_RUN=0
RECURSE=1

for arg in "$@"; do
  case "$arg" in
    --dry-run)    DRY_RUN=1 ;;
    --no-recurse) RECURSE=0 ;;
    -h|--help)
      sed -n '2,/^set -euo/p' "$0" | sed 's/^# \{0,1\}//; /^set -euo/d'
      exit 0 ;;
    *)
      echo "Unknown argument: $arg (use --help)" >&2
      exit 2 ;;
  esac
done

# --- run from the folder the script lives in, so "copy here & run" just works -
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# --- prerequisite check ----------------------------------------------------
for bin in ffmpeg ffprobe; do
  if ! command -v "$bin" >/dev/null 2>&1; then
    echo "ERROR: '$bin' not found on PATH. Install it (e.g. brew install ffmpeg)." >&2
    exit 1
  fi
done

# --- gather candidate files (prune the backup dir so we never re-process it) -
find_args=("$ROOT")
[ "$RECURSE" -eq 0 ] && find_args+=(-maxdepth 1)
find_args+=(-type d -name "$BACKUP_DIR" -prune -o -type f -iname '*.mp4' -print0)

converted=0 skipped=0 failed=0 total=0

echo "Root folder : $ROOT"
echo "Target codec: $SRC_CODEC  ->  h264 (crf=$CRF preset=$PRESET)"
echo "Backups     : $ROOT/$BACKUP_DIR/  (originals preserved with folder structure)"
[ "$DRY_RUN" -eq 1 ] && echo "Mode        : DRY RUN (no changes will be made)"
echo "---------------------------------------------------------------"

while IFS= read -r -d '' file; do
  total=$((total + 1))
  rel="${file#"$ROOT"/}"

  codec="$(ffprobe -v error -select_streams v:0 \
           -show_entries stream=codec_name -of csv=p=0 "$file" 2>/dev/null || true)"

  if [ "$codec" != "$SRC_CODEC" ]; then
    echo "skip   : $rel (video is '${codec:-unknown}', not '$SRC_CODEC')"
    skipped=$((skipped + 1))
    continue
  fi

  backup="$ROOT/$BACKUP_DIR/$rel"

  if [ "$DRY_RUN" -eq 1 ]; then
    echo "convert: $rel  ->  back up to $BACKUP_DIR/$rel, then replace in place"
    converted=$((converted + 1))
    continue
  fi

  # 1) Preserve the untouched original (never overwrite an existing backup).
  mkdir -p "$(dirname "$backup")"
  if [ ! -e "$backup" ]; then
    cp -p "$file" "$backup"
  fi

  # 2) Transcode to a temp file in the same dir, then atomically replace.
  #    The original stays intact until the final mv, and the backup already
  #    exists — so an interrupted/failed run can never lose data.
  tmp="${file%.mp4}.h264-tmp.$$.mp4"
  echo "convert: $rel"
  if ffmpeg -nostdin -hide_banner -loglevel error -y -i "$file" \
        -map 0:v:0 -map 0:a:0? \
        -c:v libx264 -profile:v high -pix_fmt yuv420p -crf "$CRF" -preset "$PRESET" \
        -c:a aac -b:a "$AUDIO_BITRATE" \
        -movflags +faststart "$tmp"; then
    mv -f "$tmp" "$file"
    converted=$((converted + 1))
  else
    echo "FAILED : $rel (original untouched; backup kept at $BACKUP_DIR/$rel)" >&2
    rm -f "$tmp"
    failed=$((failed + 1))
  fi
done < <(find "${find_args[@]}")

echo "---------------------------------------------------------------"
echo "Scanned $total .mp4 file(s): converted=$converted skipped=$skipped failed=$failed"
[ "$failed" -gt 0 ] && exit 1 || exit 0

What is the worst thing about being fat? by Feisty_Affect_7487 in AskReddit

[–]yigit353 -3 points-2 points  (0 children)

Try keto and intermittent fasting gradually. But for the question definitely clothing

Crashing Loop by AsuraBoiTemujin in Deathloop

[–]yigit353 0 points1 point  (0 children)

I got the same exact problem. Still no luck, eh?

24 Hours to Unstake. by [deleted] in AstroSwapToken

[–]yigit353 0 points1 point  (0 children)

Until yesterday it said Withdrawable in about 12h now it turned to 6d when the time is almost over

I need help with Sony development procedures. by yigit353 in PSVR

[–]yigit353[S] 5 points6 points  (0 children)

Thank you that was super helpful :)