0
votes

Little bit confused at the moment, I have 2 .mp4 files, both with h.264 encoded video.

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

My Code

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

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

Video 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

The ffmpeg command I am using for Video 1 is

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

Anyone seen this kind of behaviour before?

1
What behaviour are you referring to?bart s
the fact that it plays in osx but not windows (same file, same code, same browser)Jamie Taylor
Did you catch the error event from the video tag? see here for example stackoverflow.com/questions/2741493/…bart s
Safari doesn't even load the video so can't trigger the event, but at the same time it doesn't display my "nope" messageJamie Taylor
So the http headers are not from the failing video. Can you look in windows safari developer tools what requests (and headers) are sent out and update your question with the relevant infomationbart s

1 Answers

0
votes

-preset medium looks a bit suspicious. What is that exactly? IIUC H264 depends on [levels](http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Levels] which have varying support amongst devices and browsers.