Motioneye: YUV444/mp4 aka "H.264 (.mp4)" codec unsupported in Firefox

Created on 16 Nov 2018  路  4Comments  路  Source: ccrisan/motioneye

The YUV444/mp4 (aka "H.264 (.mp4)" in motionEye) codec is unsupported in Firefox. An codec which works across all platforms (VP8/VP9/webm ?) would be nice.

I get this by playing an video recorded in above format while hitting play on the video in motionEye (from Firefox console)

Media resource https://XXXX/2018-11-16/05-42-03.mp4?_username=XXXX&_signature=XXXX could not be decoded, error: Error Code: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005)
Details: mozilla::SupportChecker::AddMediaFormatChecker(const mozilla::TrackInfo&)::

Firefox Browser compatibility list

Most helpful comment

For now I've just hacked around this with a simple conversion script

Under File Storage -> Run a command
/etc/motioneye/convert.sh %f

convert.sh:

#!/bin/bash

FILEPATH="$1"
TMPPATH=$(mktemp).mp4

/usr/bin/ffmpeg -i "$FILEPATH" -pix_fmt yuv420p -vcodec libx264 -crf 20 "$TMPPATH"
/bin/rm -f "$FILEPATH"
/bin/mv "$TMPPATH" "$FILEPATH"

The files now play fine in Firefox.

All 4 comments

For now I've just hacked around this with a simple conversion script

Under File Storage -> Run a command
/etc/motioneye/convert.sh %f

convert.sh:

#!/bin/bash

FILEPATH="$1"
TMPPATH=$(mktemp).mp4

/usr/bin/ffmpeg -i "$FILEPATH" -pix_fmt yuv420p -vcodec libx264 -crf 20 "$TMPPATH"
/bin/rm -f "$FILEPATH"
/bin/mv "$TMPPATH" "$FILEPATH"

The files now play fine in Firefox.

Thanks !

YUV444 doesn't sound right. Motion sends images in YUV420 format to ffmpeg to encode. Please report this issue to motion project so they can give us some assistance.

I am running with this same problem. But it does play on Chrome (does not in Firefox).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

toshibochan picture toshibochan  路  5Comments

chrivosie picture chrivosie  路  5Comments

rvdeijk picture rvdeijk  路  4Comments

glyderman8 picture glyderman8  路  5Comments

ghubjules picture ghubjules  路  4Comments