Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

mp4 runs with audio but black screen - no video


Hi,

When playing an .mp4 file using jwplayer version 6 embedded on a web page it runs only the audio with a black screen instead of the video.

It runs fine locally on my PC with WMV etc.

I have checked a number of things such as the MIME types setting which is set to video/mp4 - the jwplayer runs .flv and .mp3 files fine.

I've also checked that the browser, Chrome on Windows 7, is an up-to-date version of flash (have also tied Firefox with the same result).

Here is the javascript code:

bc.. <div id='my-video'></div>
<script type='text/javascript'>
jwplayer('my-video').setup({
file: "http://localhost:9000/HomeVu1/HomeVu1/Work/MKTEST.mp4",
image: "http://localhost:9000/HomeVu1/HomeVu1/skin/HomeVu.jpg",
width: '480',
height: '270'
});
</script>
</p>



I am currently running this app locally on my machine so am unable to share it.

Thanks.


-Mike

20 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

It is most likely an encoding issue. Would need to see a link to debug properly though.

JW Player

User  
0 rated :

Hi,

I thought that might be the case - it's strange that the equivalent flv files are fine.

I'm creating these videos files from jpg images - perhaps there are limits to the number of images per second or something along those lines?

I could send you a sample file?

-mike

Ethan Feldman

JW Player Support Agent  
0 rated :

You can email us one – http://www.longtailvideo.com/contact-us

JW Player

User  
0 rated :

I have responded via the contact us page - thanks for offering to help.

To explain further what I want to achieve - it would be ideal to be able to view these files as mp4 for flexibility reasons:

But one specific reason is to be able to incorporate the captions feature - and attach an srt file.

Looking at the documentation about this it looks like it doesn't support flv formats.

I'm also having a problem trying to switch on the captions using the tracks attribute but the 'CC' option fails to appear in the player - here's the code I'm using:

bc.. <script type='text/javascript'>
jwplayer('my-video').setup({
file: "http://localhost:9000/HomeVu1/HomeVu1/Work/HV_movieAV1003.mp4",
image: "http://localhost:9000/HomeVu1/HomeVu1/skin/HomeVu.jpg",
tracks: [{
file: "http://localhost:9000/HomeVu1/HomeVu1/Work/test.srt",
label: "English",
kind: "captions",
"default": true
}],
width: '480',
height: '270'
});
</script>



Do I need to download a captions plugin for jwp 6.0 - I couldn't find any reference to this?

-mike

Ethan Feldman

JW Player Support Agent  
0 rated :

We support FLV and MP4.

Captions are supported in JW6 , not though a pluing, but though – http://www.longtailvideo.com/support/jw-player/28845/adding-video-captions

JW Player

User  
0 rated :

That's where I got the 'tracks' lines from.

But the captions control "CC" icon on the player control bar fails to appear and there are no subtitles - even if the subtitles aren't working I would have expected to see this captions control button.

I'm using a manually created srt file and have tried in both ansi and UTF-8 formats..

Have also tried an flv file and matched up the names of the flv file and the srt file just in case.


-mike

Ethan Feldman

JW Player Support Agent  
0 rated :

Here is a demo that you can use – http://www.longtailvideo.com/support/jw-player/29360/basic-vtt-captions

The source has the entire set up.

JW Player

User  
0 rated :

I have set it up as documented but the 'CC' key options fails to appear.

Are you sure the caption feature is available with the free jwplayer download?

-mike

JW Player

User  
0 rated :

The software is identical, whether you're using the free version or one of the paid versions. It's the same download, no matter what. The only thing that changes is what license key you plug into your page code.

According to the features list, CC is supported in all versions:

http://www.longtailvideo.com/jw-player/pricing/

Ethan Feldman

JW Player Support Agent  
0 rated :

Captions are available in the free version. Do you have a link?

JW Player

User  
0 rated :

No I don't - it's all on a local machine atm.

Should the captions key appear on the player controls as default or only when the tracks line in added to the player?


-mike

Ethan Feldman

JW Player Support Agent  
0 rated :

They should. I would need a link to debug properly.

JW Player

User  
0 rated :

Hi Ethan,

I appreciate the difficulty - I can see that there could be a problem running the player on a local website on a PC under Windows 7 (not saying there is definitely because it is more than likely how I've set things up!).

I wonder if anyone has successfully managed to use the Windows 7 platform to host the player and play mp4 files (flvs are fine) as well as being able to view captions?

To progress this I may need to consider using an alternative platform - what would be a good one to go for? I was thinking perhaps ubuntu for example?

The other thing I will be looking to do is to build this on an internet server so that it is accessible in order to get better support.

Thanks for your help so far.

-mike

Ethan Feldman

JW Player Support Agent  
0 rated :

I use xampp on my own Win7 machine and I am able to get mp4 files and captions working. This is just for localhost testing though.

JW Player

User  
0 rated :

Hi,

I've had some success with this problem in the last few days.

Having downloaded the latest version of jwplayer (6.5.3609) the captions are now working. But I am still having problems playing mp4 files (flvs being fine).

There is some a light at the end of the tunnel - it sort of work on Firefox, here is a summary:

Chrome - audio okay, subtitles okay but not video.

FF - all 3 displayed - but the first time it runs the initial 3 secs there is no video and then it comes in. Rerunning the video it starts straight away.

IE9 - fails - with 'error loading file cannot be played'

I've checked again and the mime setting for mp4 is mp4/video.

I am looking at browser debuggers (such as Chris Spederick's atm) to try and shed light - and would appreciate some suggestions.

Finally, I have mp4 files with two audio stream (voiceover on one and music on another) at the moment I am only getting one audio stream playing should the player play both?

Thanks

Mike

Ethan Feldman

JW Player Support Agent  
0 rated :

Hm, can I please see where you are running this? I would really need to see this at this point.

JW Player

User  
0 rated :

I've looked into this - I've created a stripped down app that requires no database and just has two web pages one to input the name of a video file and then one to play it.

I've taken it out of grails as a war file and deployed it with tomcat - I don't see a way of opening up my PC so that the app can be accessed on the internet. as my ISP does not offer static IP addresses.

If you can suggest a way around this I'd be delighted?

-Mike

Ethan Feldman

JW Player Support Agent  
-1 rated :

Can you send a zip that can be tested on localhost?

JW Player

User  
0 rated :

Hi Ethan,

The war file is too big to simply email - have emailed a link to you.

Thanks,

Mike

Ethan Feldman

JW Player Support Agent  
-1 rated :

Ok, thanks.

This question has received the maximum number of answers.