Mateusz Winnicki
Mateusz Winnicki

Reputation: 151

video mp4 not loading

i got strange problem i added this player to my website. And few videos works , and few not. what may be the cause of that, do any1 knows ? The first three works fine, the last one nope. I got similar on other pages

    <video id="example_video_1" class="video-js vjs-default-skin"
    controls preload="auto" width="640" height="264"
  poster="http://serwer1340051.home.pl/test/drogi_images/chajzer.png"
 data-setup='{"example_option":true}'>
     <source src="http://serwer1340051.home.pl/test/dtvn_GDDKiA_chajzer_14.12.mp4" type='video/mp4' />
 </video>
<video id="example_video_1" class="video-js vjs-default-skin"
   controls preload="auto" width="640" height="264"
  poster="http://serwer1340051.home.pl/test/drogi_images/tvn_21_12.png"
    data-setup='{"example_option":true}'>
  <source src="http://serwer1340051.home.pl/test/ddtvn_GDDKiA_21.12.mp4" type='video/mp4' /> 
  </video>
<video id="example_video_1" class="video-js vjs-default-skin"
controls preload="auto" width="640" height="264"
  poster="http://serwer1340051.home.pl/test/drogi_images/tvn_28_12.png"
 data-setup='{"example_option":true}'>
   <source src="http://serwer1340051.home.pl/test/DD_TVN_GDDKiA_28.12.mp4" type='video/mp4' />
  </video>
  <video id="example_video_1" class="video-js vjs-default-skin"
    controls preload="auto" width="640" height="264"
  poster="http://serwer1340051.home.pl/test/drogi_images/20130111_TVN_09_46_95090294.png"
     data-setup='{"example_option":true}'>
    <source src="http://serwer1340051.home.pl/test/20130111_TVN_09_46_95090294.mp4" type='video/mp4' />
 </video>

Upvotes: 0

Views: 728

Answers (1)

kmas
kmas

Reputation: 6439

The codec in the last video is MPEG-4 Video (mp4v) and it is not supported by browsers.

I have checked DD_TVN_GDDKiA_28.12.mp4 codec which is H264. This one is fine.

Check this wikipedia page to know the supported formats by browser.

If you want to convert your MP4 file, use ffmpeg.


Here is a command line example :

ffmpeg -i 20130111_TVN_09_46_95090294.mp4 -vcodec libx264 output.mp4

Upvotes: 1

Related Questions