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

MP4 Video Not Streaming - Encoding Issue?


Hey everyone.

I have uploaded video to JWPlayer in the past and they have worked well. However, after uploading my most recent video, the player will not play the video until the entire video has loaded. It will play, but It won't stream as it goes along like the other videos basically.

Here are two examples:

A streaming video: http://www.thepokerbank.com/videos/wilcox/3/
The newest video that doesn't stream: http://www.thepokerbank.com/videos/wilcox/4/

The only thing that I can think has caused this is the way the video has been encoded. With the video that streams, I had the mp4 encoded by someone else. I encoded the newest video myself using Handbrake (I have a Mac). I encoded it using h264 and aac.

Here's the encoding information that MPEG streamclip tells me about the files:

*The file that streams okay*

Video Tracks:
AVC Coding, 1280 800, 494 kbps

Audio Tracks:
MPEG-4 Audio stereo, 44.1 kHz, 54 kbps

*The newest file that plays but won't stream*

Video Tracks:
JVT/AVC Coding, 860 676, ~15 fps, 132 kbps

Audio Tracks:
MPEG-4 Audio mono, 48 kHz, 167 kbps


Is it the JVT/AVC coding that is causing the streaming issues?

Thanks,
Greg.

27 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Hi Greg,

From – http://www.longtailvideo.com/support/jw-player/40/troubleshooting-guide

I'm using an MP4 file

If your MP4 files cannot be seeked before they are completely downloaded, you will have to fix the MOOV atom (it contains the seeking information) located at the end of your video. Use this little application to parse your videos and add the necessary cue points. - http://renaun.com/blog/2007/08/22/234/

JW Player

User  
0 rated :

Hey Ethan,

Thanks for the link and apologies for not checking the guide first.

I ran the file through the program but came up with this error:

File.size: 111808841
Reading Atom Metadata: [code: ftyp,size: 28,offset: 0]
Reading Atom Metadata: [code: free,size: 132,offset: 28]
Reading Atom Metadata: [code: mdat,size: 110691598,offset: 160]
Reading Atom Metadata: [code: moov,size: 1116951,offset: 110691758]
Reading Atom Metadata: [code: free,size: 132,offset: 111808709]
ACTION: Parsing Bytes for Information 111808841
ERROR: The MOOV atom is not located at the end of the file, the file is ready for progressive download or it is a invalid file
Completed Time: 0.695s


Do you have any idea about where I could be going wrong?

Greg.

Ethan Feldman

JW Player Support Agent  
0 rated :

Hmm, can you try to encode the file in something else besides AVC?

JW Player

User  
0 rated :

OKay, I encoded it using MPEG Streamclip and it works like a charm. Maybe JWPlayer is not a big fan of AVC, which is what Handbrake can only seem to output.

Thanks.

Ethan Feldman

JW Player Support Agent  
0 rated :

Np!

JW Player

User  
0 rated :

Hi Ethan,
I have a similar problem,and found the mp4 video with audio mono can't be played by jw-desktop-player,but the mp4 video with audio stereo can be played by desktop player,I think the problem may be caused by the audio decoder,could you give me a suggestion?
Thank you very much.

Ethan Feldman

JW Player Support Agent  
0 rated :

@jdwang, where is the mp4 file? Do you have an example online trying to run it in the jw player?

JW Player

User  
0 rated :

Hi Ethan
That fixed my other question, thanks mate. Can you tell the tech guys that it does not like handbrake :)

JW Player

User  
0 rated :

how can I stream a rather large .mp4 video using this script?

<script type="text/javascript" src="http://www.lastdaypeople.com/flash_z18/swfobject.js"></script> <div id="player">This text will be replaced</div> <script type="text/javascript"> var so = new SWFObject('http://www.lastdaypeople.com/flash_z18/player.swf','mpl','588','360','9'); so.addParam('allowscriptaccess','always'); so.addParam('allowfullscreen','true'); so.addParam('flashvars','&file=http://www.lastdaypeople.com/flash_z18/judgmentset.mp4&image=http://www.lastdaypeople.com/flash_z18/camera2.jpg'); so.write('player'); </script>

The video pops but it doesn't play right away. It starts the download process first, then after a good while the audio comes on without picture? Is this script missing something?

Alex, S

Ethan Feldman

JW Player Support Agent  
0 rated :

Can you provide a link to where you are running this?

JW Player

User  
0 rated :

http://www.lastdaypeople.com/Revelation_seventeen.html

There you go. It works, but it takes forever to open and it only plays the audio. I know it's large file, but I know there is a way to play while it downloads. Maybe the code needs a little tweak somewhere in there.

Thanks,

Ethan Feldman

JW Player Support Agent  
0 rated :

Hi Alex,

http://www.lastdaypeople.com/flash_z18/rome.mp4, how did you encode thus file?

Also, you are using an older player (4.2) on this page.

Please refer to – http://www.longtailvideo.com/support/jw-player/40/troubleshooting-guide

I'm using an MP4 file

If your MP4 files cannot be seeked before they are completely downloaded, you will have to fix the MOOV atom (it contains the seeking information) located at the end of your video. Use this little application to parse your videos and add the necessary cue points.



<a href="http://renaun.com/blog/2007/08/22/234/" target="_blank">Use this little application to parse your videos and add the necessary cue points</a>

JW Player

User  
0 rated :

I copy and paste he code from a txt file into my HTML (dreamweaver program) where do I get the latest player?

Ethan Feldman

JW Player Support Agent  
0 rated :

I didn’t mean how how you did the code, I meant how did you encode the mp4?

You just need to run that application on the mp4 file to fix it.

The latest player is available here – http://www.longtailvideo.com/players/jw-flv-player/

JW Player

User  
0 rated :

I used NERO RECODE to encode it.

JW Player

User  
0 rated :

how come .flv files work fine?

Ethan Feldman

JW Player Support Agent  
0 rated :

Does NERO RECODE encode the file into H.264?

You need H.264 in order for MP4 files to work in Flash.

http://renaun.com/air/QTIndexSwapper.air is the application you need to run your own files.

Please let me know, thanks.

JW Player

User  
0 rated :

I see. Well, NERO RECODE only encodes files into MPEG-2. That's probably why is not working. Can I encode it in this format and then use quick time to re-encode it into H.264? Will that work?

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes, that will work. That is probably why it was not working all along. Flash itself requires videos to be encoded in H.264 in order for them to work, and since the JW Player is built on Flash, it requires this as well.

JW Player

User  
0 rated :

I was having this issue with video recorded with the "blackmagic video recorder" and was able to resolve it by opening the H264 based mp4 file in Quicktime 7 (MAC) and then doing a "Save As". It then produced an MOV files that with stream through the JW player without having to re-encode.

JW Player

User  
0 rated :

Hi Everyone,

As an addition to this thread, I would also like to mention that if you are using any ffmpeg based encoders ( like Handbrake, etc ) there is a parameter that will move the MOOV atom to the beginning of the file during encoding. It is the -qt-faststart parameter.

Here is a great resource ( a bit of a long read ) about how flash plays with different file formats and it's capabilities. I was a good guide to help me set up some optimal encoding parameters through this player ( or any flash based for that matter ).

http://www.kaourantin.net/2007/08/what-just-happened-to-video-on-web_20.html

Hope this helps.
Mario

JW Player

User  
0 rated :

Mp4box.exe

JW Player

User  
0 rated :

@Eagle: Yes, I have worked with Mp4box.exe, and you could use the "-hint" parameter for the same effect, but I have found it to be problematic when I played it through the JWPlayer ( sometimes, it would not be able to seek ). It could very likely be my build, so that is also a great lead.

In addition to my last post, here is a link to the "qt-fastfast.exe" ( windows only ) for people to CLI mp4's that need the tweak as well.

http://notboring.org/devblog/2009/07/qt-faststartexe-binary-for-windows/

Mario

JW Player

User  
0 rated :

We seem to be having the same issue. But QTIndexSwapper is reporting that our videos are encoded correctly.

We encode videos using Apple Compressor using Quicktime Conversion. The option "Fast Start" is enabled.

We are at EdgeCast, (your documentation about pseudo-streaming mentions this CDN as one that was tested to work with your player for pseudo-streaming).

The player is setup with the options ec_seek and provider=http.

When these options are enabled, the video begins to play as usual. I am able to seek to a point ahead of the current playhead which has already been downloaded. But if i seek to a point not yet loaded, the video starts back from the beginning, and the playhead remains at the place where it was clicked.

Can you provide some more information about what problem may be, how you managed to get this working with EdgeCast?

Deniz

Ethan Feldman

JW Player Support Agent  
0 rated :

Can you provide a link?

JW Player

User  
0 rated :

That QT Index Swapper did the trick, thanks

Ethan Feldman

JW Player Support Agent  
0 rated :

Np

This question has received the maximum number of answers.