Method for generating and playing video file, server and terminal

The invention discloses a method for generating and playing a video file, a server and a terminal. The method comprises the steps of dividing a video stream into a plurality of TS files; obtaining all key frames in each TS file and recording a display time stamp of each key frame in each TS file and...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
1. Verfasser: HAN KEWEI
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention discloses a method for generating and playing a video file, a server and a terminal. The method comprises the steps of dividing a video stream into a plurality of TS files; obtaining all key frames in each TS file and recording a display time stamp of each key frame in each TS file and file offset; and generating n m3u8 files for describing a fragment sequence according to the fragment sequence of the plurality of TS files and adding the display time stamp of each key frame in each TS file and a label corresponding to the file offset to the n m3u8 files. According to the method for generating and playing the video file, the server and the terminal provided by the invention, on the basis of ensuring the playing jumping speed, the accuracy of jumping to a target position is also improved. 本发明公开了种生成和播放视频文件的方法、服务器及终端,将视频流分成多个TS文件,获取每个TS文件中的所有关键帧,并记录每个TS文件中的每个关键帧的显示时间戳和文件偏移量;根据所述多个TS文件的分片序列,生成用于描述所述分片序列的n个m3u8文件,并将每个TS文件中的每个关键帧的显示时间戳和文件偏移量对应的标签添加到所述n个m3u8文件中。本发明提供的生成和播放视频文件的方法、服务器及终端,能够在确保跳播速度的基础上使得跳