Blog / Mac screen recording

HTML5 video not encoded properly: how to fix it

The message means the browser found your video but could not decode it. Here is how to see why, with ffprobe or with the browser alone, and the one file format that fixes it almost every time.

Short answer: "Video not properly encoded" is the player's way of saying the browser could not decode the file. The fix is to make an MP4 with H.264 video (High profile, yuv420p) and AAC sound, with the index (the moov atom) at the start of the file. Common causes are HEVC, ProRes or uncompressed sound inside a .mov. Check yours with ffprobe or the browser in a minute, then convert. On a Mac, the free MOV to MP4 converter does it in your browser with no upload.

Facts in this post come from MDN's video codec guide (last modified 5 November 2026), MDN's MediaError and canPlayType pages, FV Player's encoding guide, and Flowplayer's source code on GitHub, all read on 7 November 2026. Every ffprobe and ffmpeg command below was run on test files made with ffmpeg 9.0.1 on a Mac.

Where the message comes from

The exact words come from Flowplayer, an open source web video player, and from FV Player, a WordPress plugin built on it. You see it on sites that use those players, often as "html5: Video not properly encoded". The "html5" part is the name of the player's playback engine, not a separate HTML5 problem.

Flowplayer's source code holds a list of error messages next to a link to the HTML standard's media error codes. The fourth entry, error number 3, is "Video not properly encoded". MDN lists the browser's error 3 as MEDIA_ERR_DECODE: an error happened while decoding the media. So the browser got the file and could not turn it into pictures and sound.

Error number 4 in the same list reads "Video file not found". In the browser, code 4 is MEDIA_ERR_SRC_NOT_SUPPORTED, which can also mean the format is not supported. So if you see "file not found" and the file is there, the cause can be the same: a format the browser cannot play.

The usual causes

What is in the fileWhy it failsFix
HEVC (H.265) videoBrowser support depends on the browser, the system and the hardware (MDN)Re-encode to H.264
ProRes or another editing codecMade for editing apps, not for web pagesRe-encode to H.264
H.264 with 4:4:4 colour or the High 4:4:4 profileNot the High profile that web guides nameRe-encode with yuv420p, High profile
PCM or other uncompressed soundWeb guides name AAC for MP4Re-encode the sound to AAC
A .mov file served as video/quicktimeNot every browser plays that typeRemux or re-encode to MP4
A damaged or half uploaded fileThe decoder hits bad dataUpload the file again, or export it again

MDN's codec guide calls H.264 (AVC) in an MP4 "the most broadly compatible choice" when you can only offer one version, ideally with AAC sound, and notes that Firefox's H.264 support depends on the codecs built into the system. FV Player's own encoding guide asks for the same thing: H.264 video and AAC sound in MP4, High profile, with the moov atom at the beginning of the file.

Check the file with ffprobe

ffprobe comes with ffmpeg. On a Mac with Homebrew, brew install ffmpeg installs both. Then run this in Terminal, with your file name:

ffprobe -v error -show_entries stream=codec_type,codec_name,profile,pix_fmt -of compact input.mov

A file that plays almost everywhere prints two lines like these:

stream|codec_name=h264|profile=High|codec_type=video|pix_fmt=yuv420p

stream|codec_name=aac|profile=LC|codec_type=audio

A file that will likely fail looks more like this test file, made for this post:

stream|codec_name=hevc|profile=Rext|codec_type=video|pix_fmt=gbrp

stream|codec_name=pcm_s16le|profile=unknown|codec_type=audio

Read it like this: you want h264 and yuv420p on the video line and aac on the audio line. Anything else is a reason to re-encode.

Is it really an MP4? A renamed .mov still says so inside. This prints the file's brand:

ffprobe -v error -show_entries format_tags=major_brand -of default=nw=1 input.mp4

isom or mp42 is an MP4. qt means a QuickTime movie, whatever the file name says.

Is the index at the start? This lists the two main parts of the file in the order they appear:

ffmpeg -v trace -i input.mp4 2>&1 | grep -o -e "type:'moov'" -e "type:'mdat'"

If moov comes first, the page can start playing before the whole file loads. If mdat comes first, the browser has to reach the index at the end of the file before it can start, which can slow the start. The fixes below move the index to the front.

Check it in the browser, with no tools

  1. Open the video's own address in a new tab. If the browser shows its own player and it plays, the file is fine in that browser and the problem is in the page or the player setup.
  2. On the page with the broken video, open the developer console (in Chrome, View, then Developer, then JavaScript Console) and type document.querySelector('video').error. If it prints null, the browser reports no error. A code of 3 is the decode error above. A code of 4 means the format or the address was not usable.
  3. To ask the browser what it can play, type document.createElement('video').canPlayType('video/mp4; codecs="avc1.640028, mp4a.40.2"'). That string means H.264 High profile with AAC sound. MDN lists three answers: "probably", "maybe", or an empty string, which means it cannot play it.

Try the same file in Safari, Chrome and Firefox. If it plays in one and fails in another, it is a codec the failing browser does not support, which points at HEVC.

Fix 1: copy into an MP4, when the codecs are already right

If ffprobe shows h264 with yuv420p and aac, but the file is a .mov or the index is at the end, you do not need to re-encode. This copies the streams into a new MP4 and moves the index to the front, with no quality loss:

ffmpeg -i input.mov -c copy -movflags +faststart output.mp4

The free MOV to MP4 converter does the same in your browser. Its page says it copies the picture and sound as they are when common players can open them, saves every MP4 with its index at the start, and re-encodes only a stream that would not play in an MP4.

Fix 2: re-encode to H.264 and AAC

For HEVC, ProRes, 4:4:4 colour or PCM sound, re-encode:

ffmpeg -i input.mov -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -pix_fmt yuv420p -profile:v high -c:a aac -b:a 160k -movflags +faststart output.mp4

What each part does:

  • -c:v libx264 -profile:v high: H.264 video, High profile.
  • -pix_fmt yuv420p: the 4:2:0 colour layout that YouTube Help also recommends for uploads (checked 24 October 2026, see YouTube video size).
  • -vf "scale=...": rounds the width and height down to even numbers. In the test for this post, a 641x361 video failed with "width not divisible by 2" without it, and worked with it.
  • -c:a aac -b:a 160k: AAC sound. If the video has no sound, ffmpeg skips this.
  • -movflags +faststart: puts the index at the start.

Run the ffprobe check again on output.mp4. You should see h264, High, yuv420p and aac.

No Terminal? For an HEVC file, the free HEVC to MP4 converter makes an H.264 MP4 in your browser. The MOV to MP4 converter also offers Make an H.264 copy for older players under the result when the source is HEVC. For ProRes, the MOV to MP4 page says it usually cannot be read in a browser: export an H.264 copy from the app that made it, then convert that.

Mac recordings and this error

Screen recordings made with the Mac's own tools are .mov files, so on a web page they can hit the type problem in the table above. Read MOV vs MP4 for screen recordings for when to switch, and H.264 vs HEVC for screen recordings for why an HEVC file can play on your Mac and fail on someone else's computer.

MotionShine is a free Mac screen recorder, by the author of this blog. Its export window starts on Automatic: from 1080p up it makes a smaller, faster HEVC file, and at 720p a file that plays everywhere (H.264). For a video that goes on a web page, pick Plays everywhere in the export window, and the HEVC question goes away. Free exports go up to 720p at 30 fps with no watermark and no time limit; Pro unlocks 1080p, 1440p, 4K and 60 fps.

Still broken after the fix?

  • It plays when opened on its own, but not in the page. The player or the page is set up wrong: the path, the type in the source tag, or a plugin setting. Ask the player's support and include the ffprobe output.
  • It fails only for some visitors. Different browsers have different codecs. An H.264 and AAC MP4 is the safest single file.
  • The file is large and slow to start. Run the index check above, then compress the file. See how to compress a video on Mac.

FAQ

What does "HTML5 video not properly encoded" mean?

It means the browser loaded the video but could not decode it. The message comes from Flowplayer and FV Player, which show it for the browser's decode error, code 3 (MEDIA_ERR_DECODE). The file is usually in a codec that browser cannot play.

What is the best format for HTML5 video?

For one file that plays almost everywhere, an MP4 with H.264 video and AAC sound. MDN's codec guide calls H.264 in MP4 the most broadly compatible choice. A newer codec such as AV1 can be offered too, with the MP4 as the fallback.

Will converting to MP4 lose quality?

Not when the streams can be copied (Fix 1). A re-encode (Fix 2) is a new compression, so there is some loss, as with any re-encode.

Why does my video play in Safari but not in Chrome or Firefox?

Most often it is HEVC. MDN says Safari supports HEVC on macOS High Sierra or later, while support in other browsers depends on the system and the hardware. Re-encode to H.264 for one file that works in all of them.

Is clearing the cache or turning off hardware acceleration a fix?

It can help when the browser is at fault, and it costs nothing to try. If ffprobe shows HEVC, ProRes or PCM sound, those steps will not change the file, and the re-encode is the real fix.

How do I check a video's codec without Terminal?

Open the developer console on the page and use canPlayType or the video's error code, as shown above. The MOV to MP4 converter also tells you, next to the preview, whether it copied or re-encoded the picture and the sound.

Keep reading

Make your next recording look finished.

MotionShine is free for good, with every feature. Pay only if you want bigger exports.

Listed on

Listed on JustMacAppsMotionShine on Mac App IndexMotionShine on ScrollLaunchMotionShine featured on StartupBaseFeatured on FazierFeatured on Twelve ToolsMotionShine - Featured on Smol Launch