html5 video crashes in Chrome and Opera but works fine in Firefox
It's 5:30AM and I'm stuck with this video problem.
I had it all working before, and now, it has problems... I try to change encoding, but it's still not good... Worst part is that it works when it's runned from local file, but won't from server ( I add file types in htaccess )...
Here is the ffmpeg encoding:
exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libx264 -vpre hq -vpre ipod640 -acodec libfaac "upload/' .$newName. '.mp4"');
exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libvpx -acodec libvorbis -f webm "upload/' .$newName. '.webm"');
exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogv"');
exec('ffmpeg -i "' .$tmpName. '" -bt 50k -b 250k -ab 56k -ac 2 -s 480x320 -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogg"');
or:
exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.mp4"');
exec('ffmpeg -i "' .$tmpName. '" -vcodec libvpx -acodec libvorbis -f webm -aq 100 "upload/' .$newName. '.webm"');
exec('ffmpeg -i "' .$tmpName. '" -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogv"');
exec('ffmpeg -i "' .$tmpName. '" -vcodec libtheora -acodec libvorbis -aq 100 "upload/' .$newName. '.ogg"');
or:
exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.mp4"');
exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.webm"');
exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.ogv"');
exec('ffmpeg -i "' .$tmpName. '" "upload/' .$newName. '.ogg"');
Nothing create good enough file to play in Chrome...
URL of file(s):
http://urthots.com/homepage/upload/9b8a0c1a5af65c92936e3c6806181ec3.ogv
http://urthots.com/homepage/upload/9b8a0c1a5af65c92936e3c6806181ec3.ogg
http://urthots.com/homepage/upload/9b8a0c1a5af65c92936e3c6806181ec3.webm
http://urthots.com/homepage/upload/f41355af09开发者_如何学Go218d660a5d78a4012a7177.mp4
Video element:
<video poster="http://urthots.com/homepage/upload/images/xxx.jpg" >
<source src="http://urthots.com/homepage/upload/xxx.mp4" type="video/mp4" />
<source src="http://urthots.com/homepage/upload/xxx.webm" type="video/webm" />
<source src="http://urthots.com/homepage/upload/xxx.ogv" type="video/ogg; codecs=theora,vorbis" />
<source src="http://urthots.com/homepage/upload/xxx.ogg" type="video/ogg; codecs=theora,vorbis" />
</video>
What can cause this? I tried everything, encoding changing, HTML element changing, htaccess changing, I tried with videos from other sites, and they are working okay... I have no idea what is problem...
Can someone please help...
I believe is a codecs issue from the server side. You need to serve each browser with a particulary video format and codecs. Hope this can help you out: http://html5video.org/
精彩评论