A clip that plays in your editor can go silent the moment you drop it into a browser tab, a chat preview, or someone else's phone. The file "is there", the picture may even move, and there is no useful error. Three different container problems look like that, and they need three different checks: the moov atom is at the end of the file (no faststart), there is no audio stream, or the audio codec is one the browser will not decode.
I keep seeing this after a well-meant edit of a Hit the Road Dude remake. The studio's finished file is a 15-second vertical clip with a newly generated voice (original audio or a new voice). Once you cut it, add a title card, or remux it in an editor, the export settings decide whether a browser can actually play the sound. Everything below was measured on synthetic test clips I built with ffmpeg. No customer renders are used.
Three broken files, plus one that works
A 3-second 9:16 (480x854) test picture and a 440 Hz tone, written four ways:
#!/usr/bin/env python3
"""Build short vertical test clips that fail in a browser in different ways."""
import os, subprocess, sys
OUT = os.path.dirname(os.path.abspath(__file__))
FF = ["ffmpeg", "-y", "-hide_banner", "-loglevel", "error"]
def run(args):
subprocess.check_call(args)
# Shared 3 s 9:16 30 fps test picture + a 440 Hz tone (the "voice").
# 480x854 is a typical 480p-tall 9:16 frame.
common_v = [
"-f", "lavfi", "-i",
"testsrc2=size=480x854:rate=30:duration=3,format=yuv420p",
]
common_a = ["-f", "lavfi", "-i", "sine=frequency=440:duration=3:sample_rate=48000"]
# 1. Browser-friendly: H.264 + AAC + moov at the front.
run(FF + common_v + common_a + [
"-c:v", "libx264", "-pix_fmt", "yuv420p", "-c:a", "aac", "-b:a", "128k",
"-movflags", "+faststart",
f"{OUT}/ok_faststart.mp4",
])
# 2. Same codecs, but moov left at the end (default ffmpeg MP4).
run(FF + common_v + common_a + [
"-c:v", "libx264", "-pix_fmt", "yuv420p", "-c:a", "aac", "-b:a", "128k",
f"{OUT}/moov_at_end.mp4",
])
# 3. Video only: no audio stream at all.
run(FF + common_v + [
"-c:v", "libx264", "-pix_fmt", "yuv420p", "-an",
"-movflags", "+faststart",
f"{OUT}/no_audio.mp4",
])
# 4. H.264 + PCM audio in MP4. Many browsers show the picture and stay silent.
run(FF + common_v + common_a + [
"-c:v", "libx264", "-pix_fmt", "yuv420p", "-c:a", "pcm_s16le",
"-movflags", "+faststart",
f"{OUT}/pcm_audio.mp4",
])
print("wrote ok_faststart.mp4, moov_at_end.mp4, no_audio.mp4, pcm_audio.mp4")
$ python3 make_silent_test_clips.py
wrote ok_faststart.mp4, moov_at_end.mp4, no_audio.mp4, pcm_audio.mp4
The checker
The script is a small MP4 box parser plus ffprobe. It reports the moov offset, whether an audio stream exists, and whether the codecs are ones a <video> tag will usually play (H.264 and AAC). --fix rewrites the container with -movflags +faststart, copies the video, and transcodes the audio to AAC only when it has to.
#!/usr/bin/env python3
"""Detect why a clip is silent in a browser: moov offset, missing audio, or a bad codec.
Usage:
python3 silent_check.py clip.mp4
python3 silent_check.py clip.mp4 --fix fixed.mp4
"""
import argparse, json, os, shutil, subprocess, sys, tempfile
def ffprobe(path):
raw = subprocess.check_output([
"ffprobe", "-v", "error", "-print_format", "json",
"-show_format", "-show_streams", path,
])
return json.loads(raw)
def find_box(data, typ=b"moov"):
off, n = 0, len(data)
while off + 8 <= n:
size = int.from_bytes(data[off:off + 4], "big")
name = data[off + 4:off + 8]
if size == 1 and off + 16 <= n:
size = int.from_bytes(data[off + 8:off + 16], "big")
if size < 8 or off + size > n:
# last box may be declared as 0 ("until EOF")
if size == 0:
size = n - off
else:
break
if name == typ:
return off, size
off += size
return None, None
def inspect(path):
data = open(path, "rb").read()
moov_off, moov_size = find_box(data)
info = ffprobe(path)
streams = info.get("streams") or []
video = [s for s in streams if s.get("codec_type") == "video"]
audio = [s for s in streams if s.get("codec_type") == "audio"]
fmt = (info.get("format") or {}).get("format_name", "")
return {
"path": path,
"size": len(data),
"container": fmt,
"moov_offset": moov_off,
"moov_size": moov_size,
"moov_at_front": (moov_off is not None and moov_off < 64 * 1024),
"video": [
{"codec": s.get("codec_name"), "pix_fmt": s.get("pix_fmt"),
"width": s.get("width"), "height": s.get("height")}
for s in video
],
"audio": [
{"codec": s.get("codec_name"), "sample_rate": s.get("sample_rate"),
"channels": s.get("channels")}
for s in audio
],
}
# Browsers reliably play these in an <video> tag. Anything else is a warning.
OK_VIDEO = {"h264"}
OK_AUDIO = {"aac"}
def diagnose(rep):
issues = []
if not rep["video"]:
issues.append("no_video_stream")
else:
for v in rep["video"]:
if v["codec"] not in OK_VIDEO:
issues.append(f"unsupported_video_codec:{v['codec']}")
if not rep["audio"]:
issues.append("missing_audio_stream")
else:
for a in rep["audio"]:
if a["codec"] not in OK_AUDIO:
issues.append(f"unsupported_audio_codec:{a['codec']}")
if rep["moov_offset"] is None:
issues.append("no_moov_atom")
elif not rep["moov_at_front"]:
issues.append("moov_at_end")
return issues
def fmt(rep, issues):
moov = "absent" if rep["moov_offset"] is None else (
f"{rep['moov_offset']} bytes (size {rep['moov_size']})"
)
audio = "none" if not rep["audio"] else ", ".join(
f"{a['codec']} {a['sample_rate']}Hz {a['channels']}ch" for a in rep["audio"]
)
video = "none" if not rep["video"] else ", ".join(
f"{v['codec']} {v['width']}x{v['height']} {v['pix_fmt']}" for v in rep["video"]
)
lines = [
f"file: {os.path.basename(rep['path'])} ({rep['size']} bytes, {rep['container']})",
f"moov offset: {moov}",
f"video: {video}",
f"audio: {audio}",
f"issues: {', '.join(issues) if issues else 'none (looks browser-safe)'}",
]
return "\n".join(lines)
def remux_faststart(src, dst):
"""Rewrite the container: H.264 + AAC + faststart. Re-encodes audio if needed."""
info = inspect(src)
has_audio = bool(info["audio"])
vcodec = ["-c:v", "copy"]
if has_audio and all(a["codec"] in OK_AUDIO for a in info["audio"]):
acodec = ["-c:a", "copy"]
elif has_audio:
acodec = ["-c:a", "aac", "-b:a", "128k"]
else:
acodec = ["-an"]
cmd = ["ffmpeg", "-y", "-hide_banner", "-loglevel", "error", "-i", src,
*vcodec, *acodec, "-movflags", "+faststart", dst]
subprocess.check_call(cmd)
def main():
p = argparse.ArgumentParser()
p.add_argument("src")
p.add_argument("--fix", metavar="DST", help="write a faststart H.264/AAC remux")
args = p.parse_args()
if not os.path.isfile(args.src):
sys.exit(f"not found: {args.src}")
rep = inspect(args.src)
issues = diagnose(rep)
print(fmt(rep, issues))
if args.fix:
remux_faststart(args.src, args.fix)
after = inspect(args.fix)
after_issues = diagnose(after)
print("--- after --fix ---")
print(fmt(after, after_issues))
if __name__ == "__main__":
main()
What I measured
A healthy file puts moov right after ftyp. On this box that was 32 bytes into a 560,385-byte file:
$ python3 silent_check.py ok_faststart.mp4
file: ok_faststart.mp4 (560385 bytes, mov,mp4,m4a,3gp,3g2,mj2)
moov offset: 32 bytes (size 4428)
video: h264 480x854 yuv420p
audio: aac 48000Hz 1ch
issues: none (looks browser-safe)
The same picture and tone, written without +faststart, has the identical moov size (4,428 bytes) but the atom sits at offset 555,957. That is exactly 560385 - 4428: the end of the file.
$ python3 silent_check.py moov_at_end.mp4
file: moov_at_end.mp4 (560385 bytes, mov,mp4,m4a,3gp,3g2,mj2)
moov offset: 555957 bytes (size 4428)
video: h264 480x854 yuv420p
audio: aac 48000Hz 1ch
issues: moov_at_end
A browser that wants to start playback before the whole file has arrived cannot find the track list yet. Some players wait; some show a frozen first frame; some look "silent" until you download the file fully and open it again. Remuxing with +faststart moved moov to offset 32 and left the file size unchanged, because no stream was re-encoded:
$ python3 silent_check.py moov_at_end.mp4 --fix moov_fixed.mp4
...
--- after --fix ---
file: moov_fixed.mp4 (560385 bytes, mov,mp4,m4a,3gp,3g2,mj2)
moov offset: 32 bytes (size 4428)
video: h264 480x854 yuv420p
audio: aac 48000Hz 1ch
issues: none (looks browser-safe)
Missing audio is a different diagnosis. The picture is fine, moov is already at the front, and ffprobe simply lists no audio stream. No remux will invent a soundtrack that was never written.
$ python3 silent_check.py no_audio.mp4
file: no_audio.mp4 (510371 bytes, mov,mp4,m4a,3gp,3g2,mj2)
moov offset: 32 bytes (size 1651)
video: h264 480x854 yuv420p
audio: none
issues: missing_audio_stream
The third case is an audio codec the browser will not play. PCM in an MP4 is legal, and VLC will play it, but Chrome and Safari often show the video and stay silent. The checker flags it; --fix transcodes to AAC. The file shrank from 800,458 bytes to 560,385, which is expected once 16-bit PCM becomes 128 kb/s AAC, and moov stayed at the front.
$ python3 silent_check.py pcm_audio.mp4 --fix pcm_fixed.mp4
file: pcm_audio.mp4 (800458 bytes, ...)
moov offset: 32 bytes (size 3738)
video: h264 480x854 yuv420p
audio: pcm_s16le 48000Hz 1ch
issues: unsupported_audio_codec:pcm_s16le
--- after --fix ---
file: pcm_fixed.mp4 (560385 bytes, ...)
moov offset: 32 bytes (size 4428)
video: h264 480x854 yuv420p
audio: aac 48000Hz 1ch
issues: none (looks browser-safe)
A short decision path
I run the checker on the file I am about to send, not on the timeline in the editor.
- If the issue is
moov_at_end, remux with+faststart(the--fixpath, orffmpeg -i in.mp4 -c copy -movflags +faststart out.mp4). On the test file the only thing that moved was themoovoffset, 555,957 → 32. If a friend's phone still can't start the clip until it finishes downloading, this is the usual cause. - If the issue is
missing_audio_stream, stop. Faststart will not help. Check the export dialog for a "video only" box, and check that you didn't map-anby accident. Compare against the studio download: the product is a clip with sound, and a newly generated voice, not a silent picture. - If the issue is
unsupported_audio_codec, transcode the audio to AAC and leave the video as a copy when you can. PCM in MP4 is the example I measured; AC-3 and some PCM-in-MOV exports fail the same way in a browser. After--fix, the test file played as H.264 + AAC withmoovat 32 bytes. - If the checker says the file looks browser-safe and it is still silent, the problem is elsewhere: the tab is muted, the player hasn't loaded the range yet, or you are not looking at the file you think you are. Hash the download (see the 17 November note on keeping the original file) before you go hunting in the container again.
Editors that "share to the web" often rewrite the container without asking. A stream-copy export is not automatically a faststart export. If you want one command to make the common case shareable after an edit that did not change the codec:
ffmpeg -i edited.mp4 -c copy -movflags +faststart shareable.mp4
If that command refuses to copy the audio (PCM, or a codec ffmpeg won't put in MP4 with -c copy), drop --fix on it instead and let the script transcode only the soundtrack.
How to read the three numbers
-
moovoffset. Under about 64 KB (here, 32 bytes) means the index is at the front. An offset equal tofilesize - moov_sizemeans it was left at the end.ffmpeg -movflags +faststartis the usual fix, and on this test it was a lossless remux. - Audio present or not. If ffprobe shows no audio stream, the clip is silent because there is nothing to play. Look back at the edit: a "video only" export, a failed map, or a stream-copy from a source that never had sound.
-
Codec. H.264 + AAC +
yuv420pis the boring combination browsers accept. PCM, AC-3, or a raw WAV-in-MP4 will fail in ways that look like a volume problem.
If you just paid for a clip and have not edited it yet, start at the pricing page only for the resolution you actually ordered (this studio sells 480p and 720p), and keep the original download. Run the checker on your export, not on a second copy you later sent through a chat app.
Checked 2026-11-17 (Asia/Shanghai) on ffmpeg 7.1.5. The run log is in files/dv/run_log.txt.
Top comments (0)