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

Active Publication Date: 2014-04-02
LE SHI ZHI ZIN ELECTRONIC TECHNOLOGY (TIANJIN) LTD
View PDF4 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In view of this, the present invention provides a video download method and device based on the HLS protocol to solve the problem of slow video download speed caused by downloading video segments one by one in order

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • HLS (http live streaming) protocol-based video downloading method and device
  • HLS (http live streaming) protocol-based video downloading method and device
  • HLS (http live streaming) protocol-based video downloading method and device

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides an HLS (http live streaming) protocol-based video downloading method and device. The method comprises the following steps: S1, acquiring an m3u8 file for downloading a target video from a cloud server; S2, judging whether a video clip corresponding to a URL (uniform resource locator) to be downloaded in the m3u8 file can be downloaded; if so, returning to S3; otherwise, entering S4; S3, downloading a corresponding video clip according to the URL to be downloaded, and respectively storing the various downloaded video clips at an appointed position in a local disk; S4, taking the next URL of URL to be downloaded as a new URL to be downloaded, and returning to the step S2. By the adoption of the method and the device, the time for waiting an error video clip in the video downloading process is reduced, and the downloading speed is increased.

Description

technical field [0001] The invention relates to the technical field of video communication, in particular to an HLS protocol-based video download method and device thereof. Background technique [0002] The HLS (Http live streaming) protocol is a streaming media transmission protocol based on the hypertext transfer protocol Http implemented by Apple. The HLS protocol segments the continuous media data with a huge capacity and divides it into a large number of small files for transmission, which caters to the needs of web pages. The file transmission of the server uses a constantly updated lightweight index file to control the download and playback of small media files after division, which can realize live streaming and on-demand streaming. The HLS protocol supports automatic switching of the bit rate on the premise of giving priority to fluency, and is currently widely used by major video websites. [0003] Through the HLS protocol, the video data is divided into video cli...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04N21/438H04N21/643H04N21/858H04N21/845
Inventor 苍鹏李强任海林
Owner LE SHI ZHI ZIN ELECTRONIC TECHNOLOGY (TIANJIN) LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products