MP4 Video Not Streaming - Encoding Issue?
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*
AVC Coding, 1280 800, 494 kbps
MPEG-4 Audio stereo, 44.1 kHz, 54 kbps
*The newest file that plays but won't stream*
JVT/AVC Coding, 860 676, ~15 fps, 132 kbps
MPEG-4 Audio mono, 48 kHz, 167 kbps
Is it the JVT/AVC coding that is causing the streaming issues?
Greg.Feb 04, 2014 02:41PM EST
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/Feb 04, 2014 02:41PM EST
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:
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.Feb 04, 2014 02:41PM EST
Hmm, can you try to encode the file in something else besides AVC?Feb 04, 2014 02:41PM EST
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.Feb 04, 2014 02:41PM EST
Np!Feb 04, 2014 02:41PM EST
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.Feb 04, 2014 02:41PM EST
@jdwang, where is the mp4 file? Do you have an example online trying to run it in the jw player?Feb 04, 2014 02:41PM EST
That fixed my other question, thanks mate. Can you tell the tech guys that it does not like handbrake :)Feb 04, 2014 02:41PM EST
how can I stream a rather large .mp4 video using this 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, SFeb 04, 2014 02:41PM EST
Can you provide a link to where you are running this?Feb 04, 2014 02:41PM EST
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,Feb 04, 2014 02:41PM EST
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>Feb 04, 2014 02:41PM EST
I copy and paste he code from a txt file into my HTML (dreamweaver program) where do I get the latest player?Feb 04, 2014 02:42PM EST
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/Feb 04, 2014 02:42PM EST
I used NERO RECODE to encode it.Feb 04, 2014 02:42PM EST
how come .flv files work fine?Feb 04, 2014 02:42PM EST
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.Feb 04, 2014 02:42PM EST
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?Feb 04, 2014 02:42PM EST
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.Feb 04, 2014 02:42PM EST
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.Feb 04, 2014 02:42PM EST
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 ).
Hope this helps.
MarioFeb 04, 2014 02:42PM EST
Mp4box.exeFeb 04, 2014 02:42PM EST
@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.
MarioFeb 04, 2014 02:42PM EST
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?
DenizFeb 04, 2014 02:42PM EST
Can you provide a link?Feb 04, 2014 02:42PM EST
That QT Index Swapper did the trick, thanksFeb 04, 2014 02:42PM EST
NpFeb 04, 2014 02:42PM EST
This QA is closed.