This module provides streaming media server support for MP4 files. User can send a HTTP request to the server with start argument which is measured in seconds (NOT in binary offset), and the server will respond with the stream such that its start position corresponds to the requested time, for example:
It is not a good idea to cache a large mp4 file, many video sites will cut a large video file into many small mp4 files, and each small mp4 file will be less than 80M(bytes), it will be a reasonable choice.
现在主流的CDN厂商对视频都支持Time Seeking了。Apache Traffic Server(CDN缓存开源方案)也支持MP4 Plugin来实现MP4 Time Seeking。
https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/mp4.en.html
This module provides streaming media server support for MP4 files. User can send a HTTP request to the server with start argument which is measured in seconds (NOT in binary offset), and the server will respond with the stream such that its start position corresponds to the requested time, for example:
This allows performing a random seeking at any time. We can use flash player, vlc, mplayer, firefox or chrome to play the streaming media.
Note
备注:对于
moov
在mdat
后面的,需要改写到前面。也有公开的工具支持,比如qt-faststart
。It is not a good idea to cache a large mp4 file, many video sites will cut a large video file into many small mp4 files, and each small mp4 file will be less than 80M(bytes), it will be a reasonable choice.
另外在nginx上也有插件支持mp4 seeking: http://nginx.org/en/docs/http/ngx_http_mp4_module.html