Skip to content

Instantly share code, notes, and snippets.

@osbre
Last active December 26, 2025 13:40
Show Gist options
  • Select an option

  • Save osbre/97edcd437628e6a044d1f17b6bab1145 to your computer and use it in GitHub Desktop.

Select an option

Save osbre/97edcd437628e6a044d1f17b6bab1145 to your computer and use it in GitHub Desktop.
ffmpeg command to make video compatible with old Hitachi TV from 2000s.
@echo off
for %%f in (*.mkv *.mp4 *.mov *.avi *.webm) do (
ffmpeg.exe -i "%%f" ^
-c:v mpeg2video -q:v 4 -maxrate 8000k -bufsize 1835k ^
-c:a mp2 -b:a 192k ^
"%%~nf.mpg"
)
#!/usr/bin/env bash
for f in *.mkv *.mp4 *.mov *.avi *.webm; do
[ -e "$f" ] || continue
ffmpeg -i "$f" \
-c:v mpeg2video -q:v 4 -maxrate 8000k -bufsize 1835k \
-c:a mp2 -b:a 192k \
"${f%.*}.mpg"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment