现在是凌晨5:30,我遇到了这个视频问题。
我之前完成了所有工作,现在,它有问题...... 我尝试改变编码,但它仍然不好......最糟糕的是,它从本地文件运行时有效,但不会从服务器运行(我在htaccess中添加文件类型)......
这是ffmpeg编码:
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"');
或:
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"');
或:
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"');
没有什么可以在Chrome中创建足够好的文件......
文件的网址:
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/f41355af09218d660a5d78a4012a7177.mp4
视频元素:
<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>
这会导致什么? 我尝试了一切,编码更改,HTML元素更改,htaccess更改,我尝试使用其他网站的视频,他们工作正常... 我不知道什么是问题...
有人可以帮忙......