Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 495
marca Avatar asked Mar 06 '12 21:03

marca


2 Answers

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.

like image 123
blahdiblah Avatar answered Nov 12 '22 07:11

blahdiblah


Please read chromium bug #117368, in which a developer explains that yuvj420p will not be supported soon:

Indeed, chromium doesn't support yuvj420p.

Generally we don't support video formats (or codecs) that aren't very widely used, because the support burden (maintaining code quality, fixing bugs, security reviews, etc) is out of proportion with user benefit (relative to everything else we can spend our time/energy on).

Closing as WorkingAsIntended. If the format becomes more widely popular we can reconsider including support for it. If there's another issue here that I'm missing, please reopen.

like image 24
Jorrit Schippers Avatar answered Nov 12 '22 07:11

Jorrit Schippers