Reputation: 29
When using ?start=secs
with nginx mp4
, video doesn't play for about 8 seconds although the audio keeps playing.
example:
http ://server/video.mp4 >>> plays correctly
http ://server/video.mp4?end=60 >>> plays correctly
http ://server/video.mp4?start=120 >>> starts audio playing with static image (video not working) for about 7-8 seconds.
I tried many MP4 files, all of them show first 7-8 seconds without video. All files have moov atom at beginning.
Seems like nginx
doesn't get the starting video frame correctly, any advice?
Upvotes: 0
Views: 569
Reputation: 31100
There is probably not a key frame at that point in time. Most encoders use a long GOP for better compression. X264 defaults to 250. Try encoding with more key frames, or picking times just before key frames.
Upvotes: 0