2012-06-27 103 views
0

目前有點困惑,我有2個.mp4文件,都帶有h.264編碼視頻。Safari中的HTML5視頻

 
| #Safari | Video 1 | Video 2 | 
| Windows | Failed | Played | 
| OSX | Played | Played | 

我的代碼

<video width="550" height="400" controls> 
    <source src="test/charlie.mp4" type="video/mp4" /> 
    <source src="test/charlie.ogv" type="video/ogg" /> 
    Nope. 
</video>  

視頻1

 
Status: HTTP/1.1 200 OK 
Date: Wed, 27 Jun 2012 09:19:02 GMT 
Server: Apache/2.2.22 (Debian) 
Last-Modified: Wed, 27 Jun 2012 08:06:41 GMT 
ETag: "aff04e8-49c7f3-4c36fb1f12640" 
Accept-Ranges: bytes 
Content-Length: 4835315 
Connection: close 
Content-Type: video/mp4 

視頻2

 
Status: HTTP/1.1 200 OK 
Date: Wed, 27 Jun 2012 09:18:37 GMT 
Server: Apache/2.2.22 (Debian) 
Last-Modified: Mon, 28 Dec 2009 05:06:33 GMT 
ETag: "aff04eb-45de48-47bc2de762840" 
Accept-Ranges: bytes 
Content-Length: 4578888 
Connection: close 
Content-Type: video/mp4 

我使用視頻1 FFmpeg的命令是

ffmpeg -y -i input.avi -vcodec libx264 -r 24 -preset medium -crf 20 -bufsize 20M -acodec libfaac -ac 2 -ar 44100 -ab 128k out.mp4

以前有人看過這種行爲嗎?

+0

您指的是什麼行爲? –

+0

事實上,它在osx中​​播放,但不是在窗口(相同的文件,相同的代碼,相同的瀏覽器) –

+0

你從視頻標籤捕獲錯誤事件嗎?看這裏例如 http://stackoverflow.com/questions/2741493/how -do-you-detect-html5-video-events –

回答

0

-preset medium看起來有點可疑。那究竟是什麼? IIUC H264取決於[levels](http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels),它們在設備和瀏覽器中具有不同的支持。