| Goal | Command (run in a terminal) | Explanation |
|------|------------------------------|-------------|
| Play | vlc "filename.mp4" | Open with VLC (works on all OS). |
| Fix container | ffmpeg -i in.mp4 -c copy fixed.mp4 | Re‑muxes without quality loss. |
| Convert to universal MP4 | ffmpeg -i in.mp4 -c:v libx264 -crf 23 -c:a aac -b:a 192k out.mp4 | H.264/AAC – works almost everywhere. |
| Trim (00:02:15‑00:05:45) | ffmpeg -ss 00:02:15 -to 00:05:45 -i in.mp4 -c copy cut.mp4 | No re‑encode, very fast. |
| Extract subtitles | ffmpeg -i in.mp4 -map 0:s:0 subs.srt | Saves the first subtitle track as .srt. |
| Add external subtitles | ffmpeg -i in.mp4 -i subs.srt -c copy -c:s mov_text out.mp4 | Soft‑subtitle track for MP4 players. |
| Rename (batch) | for f in *.mp4; do mv "$f" "$(date -r "$f" +%Y%m%d) - $f"; done | Example batch rename on Unix‑like shells. |
ffmpeg -i input.mp4 -i subs.srt -c copy -c:s mov_text output_with_subs.mp4
| Target Device | Recommended Format | FFmpeg Command |
|---------------|--------------------|----------------|
| Smartphone (Android) | MP4 (H.264 Baseline, 720p) | ffmpeg -i input.mp4 -c:v libx264 -profile:v baseline -level 3.0 -vf "scale=-2:720" -c:a aac -b:a 128k output.mp4 |
| Apple TV / iPhone | MP4 (H.264 Main, 1080p) | ffmpeg -i input.mp4 -c:v libx264 -profile:v main -level 4.0 -vf "scale=-2:1080" -c:a aac -b:a 192k output.mp4 |
| Web (HTML5) | MP4 (H.264) or WebM (VP9) | ffmpeg -i input.mp4 -c:v libx264 -crf 23 -c:a aac -b:a 128k web.mp4 or ffmpeg -i input.mp4 -c:v libvpx-vp9 -b:v 2M -c:a libopus web.webm | 10musume.-.060615 01.-.Nozomi.Sudo.. ..mp4
ffmpeg -i "10musume.-.060615 01.-.Nozomi.Sudo.. ..mp4" -map 0:s:0 subs.srt
ffmpeg -ss 00:02:15 -to 00:05:45 -i input.mp4 -c copy segment.mp4
| Platform | Recommended Player | Why | |----------|-------------------|-----| | Windows | VLC Media Player (free) | Handles almost any codec, subtitles, and can adjust playback speed. | | macOS | VLC or IINA (both free) | Native‑look on macOS, robust codec support. | | Linux | VLC, mpv, or SMPlayer | All are lightweight and support MP4 out of the box. | | Mobile (iOS/Android) | VLC for Mobile / MX Player | Works with local files and supports subtitles. | | Goal | Command (run in a terminal)
If the video does not play, note the error message—often it’s a codec or corruption issue, which we’ll address in Section 4. ffmpeg -i input
ffmpeg -i input.mp4 -vf subtitles=subs.srt -c:a copy output_subbed.mp4