Copying this from my post of the 6.4.2 release pull request:
Old recordings with the faulty output which FFmpeg 6.1 now rejects need to be remuxed using an older FFmpeg version.
#!/usr/bin/env bash for file in $(find . -type f -name "*.mp4" -print); do ffprobe -v quiet "${file}" && continue # ffprobe >=6.1 returns status code >0 for those faulty mp4 containers echo "Remuxing ${file}" /path/to/older/ffmpeg -v error -i "${file}" -c copy -f mp4 "${file}.new" \ && touch -c -r "${file}" "${file}.new" \ && rm "${file}" \ && mv "${file}.new" "${file}" done
Where you can get an older FFmpeg build depends on your OS, but here are some relevant links:
- Windows (
x86_64) and Linux (x86_64/aarch64)
https://github.com/BtbN/FFmpeg-Builds/releases (rolling releases with different FFmpeg versions) - Windows (
x86/x86_64)
https://github.com/streamlink/FFmpeg-Builds/releases/tag/20230930-1 (FFmpeg 6.0) - macOS
brew install ffmpeg@6