Codec problems
Codec not supported? Find the codec and convert it
Short answer
A codec error means the destination cannot decode the video or audio inside the file, even if it accepts the container. Identify both codecs with ffprobe, then convert to H.264 video and AAC audio in MP4. Pinterest lists H.264 and H.265 for video, WebM requires Vorbis or Opus audio, and YouTube recommends H.264 with AAC-LC or Opus.
Key takeaways
- Check video and audio codecs separately; either can be the problem.
- H.264 with AAC in MP4 works almost everywhere.
- WebM needs Opus or Vorbis audio, per the WebM Project.
- HEVC (H.265) is accepted on some platforms but not all players.
Which codec goes in which container
Container and codec are two different things: the container (MP4, MOV, WebM, MKV) is the box, the codec (H.264, HEVC, AAC, Opus) is what is inside. A player or platform can accept the box and reject the contents.
| Container | Video codecs commonly used | Audio codecs commonly used | Source |
|---|---|---|---|
| MP4 | H.264, H.265 (HEVC) | AAC | YouTube recommends MP4 with H.264 and AAC-LC or Opus |
| MOV | H.264, H.265 | AAC, PCM | Pinterest accepts MOV in its apps with H.264 or H.265 |
| WebM | VP8, VP9, AV1 | Vorbis, Opus | The WebM Project: Vorbis or Opus audio |
| MKV | Almost anything | Almost anything | Convert before uploading |
Find your case
| What you see | What it usually means | Do this |
|---|---|---|
| Video plays but with no picture | Video codec unsupported by the player | Convert video to H.264 (step 2) |
| Picture plays but no sound | Audio codec unsupported | Convert audio to AAC (step 2) |
| HEVC file rejected | Destination does not take H.265 | Re-encode to H.264 (step 2) |
| WebM has no sound | AAC or MP3 inside WebM | Use Opus or Vorbis (step 3) |
Fix it step by step
Identify the codecs
ffprobe -hide_banner in.mp4: look for lines such as Video: hevc and Audio: ac3.Convert to H.264 and AAC
ffmpeg -i in.mp4 -c:v libx264 -crf 20 -pix_fmt yuv420p -c:a aac -b:a 160k out.mp4.For WebM use Opus
ffmpeg -i in.mp4 -c:v libvpx-vp9 -c:a libopus out.webm. The WebM Project lists Vorbis or Opus as the audio codec.Verify
Run ffprobe on the new file and play it in a normal player before uploading.
When to keep HEVC
HEVC makes smaller files at the same quality, so keep it for storage or for platforms that list it, such as Pinterest. Convert to H.264 for anything that asks for maximum compatibility.
Frequently asked questions
What does codec not supported mean?
The destination cannot decode the video or audio compression inside the file.
Which codec is safest?
H.264 for video and AAC for audio in an MP4 container.
What audio can a WebM file contain?
Vorbis or Opus, according to the WebM Project.
Sources
- YouTube Help: Recommended upload encoding settings (official, checked 2026-10-06)
- Pinterest Help: Review Pin specs (Video Pin file types and encoding) (official, checked 2026-10-06)
- The WebM Project: WebM container guidelines (audio and video codecs) (official, checked 2026-10-06)
- FFmpeg Documentation: Automatic stream selection and -map (official, checked 2026-10-06)
Reviewed 2026-10-06. Steps not attributed to a source are general video practice or computed above.