Note: I can attest this to be functional for me, but I’ve used an LLM to produce this. Your mileage may vary. Please check your particular details, particularly the call for checking temperature may vary.
Many people have video files that no longer work on modern devices. You may have downloaded or perhaps made backups of your media in the olden days of interwebs. Now you want to keep using your files. Fair enough.
If you still have .flv videos from the early days of the interwebs, they probably won’t play on your iPhone. If you happen to be using a Synology NAS, similar difficulties are further made difficult by recent changes that disable hardware re-encoding.
Here’s how to fix that.
You’ll convert .flv files to .mp4 in a way that plays well on iOS.
You’ll also avoid overheating your Synology NAS by monitoring temperature as you go.
Install FFmpeg on Synology
1. Open DSM.
2. Go to Package Center → Settings → Package Sources.
3. Add SynoCommunity:
Name: SynoCommunity
URL: https://packages.synocommunity.com/
4. Install FFmpeg from SynoCommunity.
FFmpeg will be available at:
/var/packages/ffmpeg/target/bin/ffmpeg
Use This Script
This script checks the temperature and lowers CPU usage if it gets too hot.
It saves converted videos to a separate folder called converted_ios.
#!/bin/bash
# Adjust this if needed
FFMPEG="/volume1/@appstore/ffmpeg7/bin/ffmpeg"
FFPROBE="/volume1/@appstore/ffmpeg7/bin/ffprobe"
TEMP_SENSOR="/sys/devices/platform/coretemp.0/hwmon/hwmon0/temp1_input"
TEMP_WARN_C=55
TEMP_CRITICAL_C=65
SLEEP_SECS=60
mkdir -p converted_ios
get_temp_c() {
if [[ -f "$TEMP_SENSOR" ]]; then
echo $(( $(cat "$TEMP_SENSOR") / 1000 ))
else
echo 0
fi
}
#FF_ARGS_BASE="-c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p -c:a aac -b:a 128k -movflags +faststart"
FF_ARGS_BASE="-vf scale=trunc(iw/2)*2:trunc(ih/2)*2 -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p -c:a aac -b:a 128k -movflags +faststart"
FF_ARGS="$FF_ARGS_BASE"
for f in *.flv; do
base="${f%.flv}"
out="converted_ios/${base}.mp4"
[[ -f "$out" ]] && echo "✔ Skipping $out" && continue
temp=$(get_temp_c)
echo "🌡️ Temp: ${temp}°C"
if (( temp >= TEMP_CRITICAL_C )); then
echo "🔥 Temp $temp°C exceeds $TEMP_CRITICAL_C°C — aborting."
exit 1
elif (( temp >= TEMP_WARN_C )); then
echo "⚠️ Temp $temp°C high — cooling down $SLEEP_SECS sec..."
sleep $SLEEP_SECS
echo "⏬ Lowering FFmpeg thread usage"
FF_ARGS="-threads 2 -preset veryslow $FF_ARGS_BASE"
else
FF_ARGS="$FF_ARGS_BASE"
fi
echo "→ Converting $f"
"$FFMPEG" -i "$f" $FF_ARGS "$out"
if [[ $? -eq 0 ]]; then
echo "✔ Done: $out"
else
echo "✖ Failed: $f"
fi
done
Save this as convert_for_ios.sh.
Run it:chmod +x convert_for_ios.sh ./convert_for_ios.sh
Why These Settings
H.264 Baseline profile apparently works across all iPhones. AAC audio is supported natively by iOS.
The video scale ensures that the resolution is compatible with the encoder.
Faststart moves the index to the beginning so streaming starts without delay.
What other formats are you still storing?
Are they playable on your current devices?
You can repeat this method for .avi, .mov, or any other legacy format.
Test the results on your phone before deleting the originals.