Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I learned how to compile nginx with mp4 module. I also added proper directive in my website conf.

I am trying to play a mp4 using JW player and flow player. But the video doesn't buffer and play like youtube and similar sites. It takes a long time to start play. It seems it downloads the whole video and then plays it. I have tried changing the buffer limits but no luck.

I downloaded a youtube video and tried comparing it with my own video. The video from youtube starts playing immediate but my converted video doesn't. Maybe nginx only plays mp4 files in a specific codec and format ?

Note that I am not making a tube site or anything similar. So please don't suggest to migrate from nginx.

share|improve this question
    
This docs page says nginx supports H.264/AAC files. Youtube seems to use H.264 mostly - try to convert your videos to it. –  Dmitry Verkhoturov Apr 28 '12 at 8:41
    
@Dmitry Paskal I tried converting to the same codec used by a youtube file but it's not working. I compared both files in MediaInfo, very similar in details and almost same size. That's weird the youtube video starts playing normal while my own converted ones takes very long. I think I am missing something in converting the files. No sure what it is. Note that I tried various youtube files and made sure there is no browser cache problem. Full deleted history and refreshed. What's your opinion ? –  xperator Apr 28 '12 at 12:53
    
You're not revealing main information about that - which program you are using for conventing your videos and what is your conventing settings. Please upload screenshot with settings and program information. –  Dmitry Verkhoturov Apr 28 '12 at 17:32
    
@DmitryPaskal I tried many programs. Movavi Video Converter, Imtoo video converter, Xilisoft video converter, Freemake video converter, Any video converter. Most of them have a youtube convert preset. So I tried all of them and I hoped it would be close to a youtube codec video. And If using a custom preset, It's H264 250Kbit rate 25fps, AAC audio 96Kbit. If you are really able to solve this I would be glad to meet you in chat so we can speed up things. Thanks again! –  xperator Apr 28 '12 at 17:39
    
Try Miro video converter with codecs H264 and WebM and tell me your results. –  Dmitry Verkhoturov Apr 28 '12 at 17:41
show 2 more comments

1 Answer

up vote 1 down vote accepted

Ok I found the cause of the problem. For anyone who is having the same problem. Actually the issue is not related to nginx, web player(JW player in my case) or the video codecs you are using. It's the video file itself.

Found this in JW player's Troubleshooting Guide :

I can't seek: 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.

The application name is QTIndexSwapper 2.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.