HLS (http live streaming) protocol-based video downloading method and device
A video and protocol technology, applied in the field of video communication, can solve the problem of slow video download speed, reduce the waiting time for error video clips, and improve the download speed
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0035] Please refer to figure 1 , the video download method based on the HLS protocol of the present embodiment comprises the following steps:
[0036] Step 101. Obtain the m3u8 file of the downloaded target video from the cloud server.
[0037] Step 102. Determine whether the video segment corresponding to the URL to be downloaded in the m3u8 file can be downloaded: if yes, go to step 103, otherwise go to step 104.
[0038] Step 103. Download the corresponding video clips according to the URL to be downloaded, and store the downloaded video clips in specified locations in the local disk respectively.
[0039] Step 104. Use the URL next to the URL to be downloaded as a new URL to be downloaded, and go to step 102.
[0040] According to the HLS protocol, after knowing the target video selected by the user for download, first obtain the m3u8 file of the target video from the cloud server, please refer to figure 2 The schematic diagram of the m3u8 file shown, where:
[0041]...
Embodiment 2
[0050] On the basis of Embodiment 1, this embodiment further limits the process of judging whether the video segment corresponding to the URL to be downloaded in the above-mentioned m3u8 file can be downloaded includes: judging that the video segment corresponding to the URL to be downloaded in the m3u8 file is within a predetermined time Whether the download is complete.
[0051] In practical applications, there are often many reasons why video clips cannot be downloaded, such as cloud server failure, network interruption, and so on. In either case, the video segment corresponding to the URL to be downloaded cannot be downloaded in a short period of time. Therefore, in this embodiment, it is judged whether the download of the video clip fails by judging whether the download of the video clip can be completed within a predetermined time. The above-mentioned predetermined time can be set by the administrator according to the size of the video segment and the average network sp...
Embodiment 3
[0054] This embodiment is further limited on the basis of the first embodiment: generate the local m3u8 file of the target video according to the path of the specified location where the video segment is located.
[0055] In this embodiment, a local m3u8 file is generated while the download of the video segment is completed. Preferably, the format of the local m3u8 file is the same as that of the cloud server, except that the URL in the local m3u8 file is a local address. by figure 2 The video clips in the shown m3u8 file are downloaded to the local disk C:\Users\Download as an example. After the download is complete, the generated local m3u8 file is as follows image 3 shown. Subsequent synthesis and playback of the target video is realized by generating the above local m3u8 file.
[0056] For traditional video downloading, a video file is presented to the user after the download is completed, and the user can click the video file to play it. However, after the downloadi...
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