DriftingSteps
DriftingSteps

Reputation: 526

jwplayer: video plays but there's no display?

I recently added two videos on this website (link not working) and I got the videos playing (at the bottom). The only problem is that the video plays but doesn't display anything. If you download the video and watch it locally, you'll see that the video is fine.
Since the video played on the website, I believe that the video link is correct. I've used the following script to make the video player working -

<script type="text/javascript" src="js/jwplayer.js"></script>
<script type="text/javascript">
    jwplayer("video1").setup({
        flashplayer: "player.swf",
        file: "images/vid1.mp4",
        width: 570,
        height: 320,
        image: "images/preview1.jpg"
    });
    jwplayer("video2").setup({
        flashplayer: "player.swf",
        file: "images/vid2.mp4",
        width: 570,
        height: 320,
        image: "images/preview2.jpg"
    });
</script>

I'm not sure what's wrong with this. Help is greatly appreciated :)

Upvotes: 2

Views: 5917

Answers (2)

donlaur
donlaur

Reputation: 1287

I downloaded the video, checked it, and the format was not one that Longtail supports. It needs to be mp4 with the H.264 codec.

Source: http://www.longtailvideo.com/support/jw-player/28836/media-format-support

MP4 videos using the H.264 video codec and the AAC audio codec. MP4 is of high quality and can be played in all browsers and devices. It is today's video format of choice.

The JW Player video encoding guide should help. http://www.longtailvideo.com/support/jw-player/28838/mp4-video-encoding

If you are not the video encoding type or do not want to download a new codec or application to encode I would suggest using youtube to upload and have them encode the video. You can then download the resulting mp4 file. If it works on youtube it should work using jw player.

Upvotes: 3

emaxsaun
emaxsaun

Reputation: 4201

The MP4 files need to be encoded in H.264. I just downloaded the vid1.mp4 file, and did a quick property inspector view in QuickTime, and the file is encoded in MPEG-4, which is not something that Flash, or HTML5 supports. If you do a re-encode to H.264, it will work. You can re-encode using this tool - http://handbrake.fr/

Upvotes: 4

Related Questions