mp4 with pixel format yuvj420p won't play in Chrome 17, but plays in Safari, IE etc

marca picture marca · Mar 6, 2012 · Viewed 13.5k times · Source

File is from a Nikon D3s (mov) converted with ffmpeg to mp4. Working without problems with all other files (avi, flv, mp4 etc)

Please see file: http://shootitlive.s3.amazonaws.com/output.mp4 (Same non working result in Chrome when served from diffrent hosts, and always works in Safari and with flash in Firefox, Chromium)

/usr/local/bin/ffmpeg -i nonworking.MOV -acodec libfaac -ab 128k -vcodec libx264 -preset slow -crf 30 -threads 0 -s 768x576 -aspect 1.33333333333 -ar 48000 output.mp4

Cant find anything strange with (but dont really know what to look for):

ffmpeg -v 5 -i filename -f null - 2>error.log`

Any ideas?

Answer

blahdiblah picture blahdiblah · Mar 10, 2012

I think your problem is the pixel format.

From your Chrome bug report, the working video (working.mp4) has pix_fmt=yuv420p. The non-working video (qt_output.mp4) has pix_fmt=yuvj420p. In my testing, converting the problematic video to yuv makes it play. Converting the working video to yuvj makes it not play.

I'm not sure why my analysis of the pixel format differs from Alek's on the Chrome bug report, but that made the difference for me.

Try adding -pix_fmt yuv420p to your ffmpeg command.