HTML5 Video Chrome - ffmpeg - mp4 working in all but Chrome HTML5 Video Chrome - ffmpeg - mp4 working in all but Chrome google-chrome google-chrome

HTML5 Video Chrome - ffmpeg - mp4 working in all but Chrome


The solution is to use the parameter "-pix_fmt yuv420p":

ps>ffmpeg.exe -i $input\$file -y -strict experimental -acodec aac -ac 2 -ab 160k -vcodec libx264 -s 640x480 -pix_fmt yuv420p -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b 1200k -f mp4 -threads 0 $output\$file.iphone.mp4

ffmpeg version N-46936-g8b6aeb1

Hopes this can help you with getting chrome compatible videos

Update1

See reference it may help you


Another source of error could be the transfer, rather than the decoding, of the video.

Try opening the ones that don't work using a "file://..." url: If that works, the problem is with the transport and has nothing to do with h264 or mp4.

Although both the given files play fine in my Chrome when hosted as html5, I see such a transport problem with an even bigger mp4 file. In that case, I can see cancelled requests in fiddler.

It appears to be a bug in Chrome and I have not yet found a workaround.


Chrome might be using some H.264 video driver acceleration that might break on older drivers... try to update the video drivers and see if it works.