Method for generating and playing video file, server and terminal
A technology for generating videos and files, which is applied in the field of video processing and can solve problems such as low target position accuracy and bit rate fluctuations.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0051] Such as figure 1 As shown, the first aspect of the present invention provides a method for generating video files, including:
[0052] S101. Divide the video stream into multiple TS files, obtain all key frames in each TS file, and record the display time stamp and file offset of each key frame in each TS file;
[0053] S102. According to the fragmentation sequences of the multiple TS files, generate n m3u8 files for describing the fragmentation sequences, and display the timestamp and file offset of each key frame in each TS file The corresponding tags are added to the n m3u8 files, where n is an integer not less than 1.
[0054] In the embodiment of the present application, the server side is the execution subject of the method for generating video files, and is used to obtain corresponding video streams according to user operation instructions, and then execute steps S101 and S102 on the obtained video streams.
[0055] Wherein, in step S101, after the server obtai...
Embodiment 2
[0076] Based on the technical idea corresponding to the method provided in the first aspect, the second aspect of the present invention provides a method for playing video files, such as image 3 shown, including:
[0077] S301. Analyze the obtained video file, and obtain n m3u8 files corresponding to the video file, a plurality of TS files contained in the n m3u8 files, and a display time stamp of each TS file, wherein n is not less than 1 an integer of
[0078] S302. Using the target time stamp skipped to the target location and the display time stamp of each TS file, find the TS file to which the target time stamp belongs from the plurality of TS files;
[0079] S303. Using the label corresponding to the display time stamp and file offset of each key frame in each TS file stored in the n m3u8 files, obtain each key frame in the TS file to which the target time stamp belongs. The display timestamp and file offset of the keyframe;
[0080] S304. According to the target tim...
Embodiment 3
[0103] Based on the same technical concept as the first aspect, the third aspect of the present invention provides a server, including a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the The following steps:
[0104] Divide the video stream into multiple TS files, obtain all key frames in each TS file, and record the display timestamp and file offset of each key frame in each TS file;
[0105] According to the slice sequences of the plurality of TS files, generate n m3u8 files for describing the slice sequences, and display timestamps and file offsets corresponding to each key frame in each TS file The tags are added to the n m3u8 files, where n is an integer not less than 1.
[0106] Preferably, when the program is executed by the processor, after recording the display time stamp and file offset of each key frame in each TS file, the following steps are also implemented:
[0107] Generate a dat file...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com