# US 9,882,951 B2 · Method and device for playing streaming media, and non-transitory storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 9,882,951 B2
- Document ID: US9882951B2
- Status: Granted
- Kind: B2
- Application number: 14/691,961
- Filed: 2015-04-21
- Published: 2015-08-13
- Granted: 2018-01-30
- Earliest claimed: 2013-06-20
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Limited
- Inventors: Hongquan Zhou
- Web page: https://patentgrep.com/patent/US9882951B2

## CPC

- H04L 65/60: Network streaming of media packets
- H04L 65/612: for unicast
- H04L 65/764: {at the destination (reformatting of additional data in video clients H04N21/4355)}
- H04L 67/02: based on web technology, e.g. hypertext transfer protocol [HTTP]
- H04L 67/06: specially adapted for file transfer, e.g. file transfer protocol [FTP]
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

The present invention discloses a method and a device for playing streaming media, and a non-transitory storage medium, and the method comprises: obtaining an index file of a media stream, wherein the media stream includes the index file and at least two slice files, and time information and address information of each of the at least two slice files are recorded in the index file; obtaining all slice files of the media stream according to the index file; combining and converting all the slice files obtained into a local media file; and playing the local media file by a local media player, wherein, the local media file is of a format supported by the local media player. By the present invention, a media stream of a format not supported by the local media player can be played by the local media player.

## Claims

### Claim 1

A method for playing streaming media, comprising:
sending a media play request to a server and obtaining an index file of a media stream from the server, wherein the media stream comprises the index file and at least two slice files, and time information and address information of each of the at least two slice files are recorded in the index file;
obtaining all slice files of the media stream according to the index file;
combining and converting all the slice files obtained into a local media file; and
playing the local media file by a local media player;
wherein the local media file is of a format supported by the local media player;
wherein obtaining all slice files of the media stream according to the index file comprises:
parsing the index file to determine the address information of each slice file of the media stream and name information contained in the address information;
scanning a local storage device, and obtaining slice files already downloaded to the local storage device, wherein the slice files already downloaded have names the same as those of slice files of the media stream; and
obtaining, from the server, other slice files of the media stream except for the slice files already downloaded according to the address information.

### Claim 2 (depends on 1)

The method for playing streaming media according to claim 1, wherein combining and converting all the slice files obtained into the local media file comprises:
combining all the slice files obtained into a complete file according to the time information; and
converting the complete file into the local media file of the format supported by the local media player.

### Claim 3 (depends on 1)

The method for playing streaming media according to claim 1, wherein obtaining all the slice files of the media stream according to the index file comprises:
parsing the index file to determine the address information of each slice file of the media stream; and
obtaining each slice file from the server according to the address information of the slice file of the media stream.

### Claim 4 (depends on 1)

The method for playing streaming media according to claim 1, wherein, after obtaining all slice files of the media stream according to the index file, the method further comprises:
storing all the slice files obtained from the server into the local storage device.

### Claim 5 (depends on 1)

The method for playing streaming media according to claim 1, wherein, the media stream is based on Hypertext Transfer Protocol Live Streaming protocol, the index file is an M3U8 index file, and the slice file is a Transport Stream slice file.

### Claim 6 (depends on 1)

The method for playing streaming media according to claim 1, wherein, the local media file is of an FLV format, and the local media player is a Flash player.

### Claim 7

A device for playing streaming media, comprising a processor and a memory storing program codes, wherein the processor is configured to execute the stored program codes to:
send a media play request to a server and obtain an index file of a media stream from the server, wherein the media stream comprises the index file and at least two slice files, and time information and address information of each of the at least two slice files are recorded in the index file;
obtain all slice files of the media stream according to the index file;
combine and convert all the slice files obtained into a local media file; and
play the local media file by a local media player;
wherein the local media file is of a format supported by the local media player;
wherein the processor further performs the stored program codes to:
parse the index file to determine the address information of each slice file of the media stream and name information contained in the address information;
scan a local storage device and obtain slice files already downloaded to the local storage device, wherein the slice files already downloaded have names the same as those of slice files of the media stream; and
obtain, from the server, other slice files of the media stream except for the slice files already downloaded, according to the address information.

### Claim 8 (depends on 7)

The device for playing streaming media according to claim 7, wherein, the processor is further configured to execute the stored program codes:
combine all the slice files obtained into a complete file according to the time information; and
convert the complete file into the local media file of the format supported by the local media player.

### Claim 9 (depends on 7)

The device for playing streaming media according to claim 7, wherein, the processor is further configured to execute the stored program codes to:
parse the index file to determine the address information of each slice file of the media stream; and
obtain each slice file from the server according to the address information of the slice file of the media stream.

### Claim 10 (depends on 7)

The device for playing streaming media according to claim 7, wherein the processor is further configured to execute the stored program codes to store each slice file obtained into the local storage device.

### Claim 11 (depends on 7)

The device for playing streaming media according to claim 7, wherein, the media stream is based on Hypertext Transfer Protocol Live Streaming protocol, the index file is an M3U8 index file, and the slice file is a Transport Stream slice file.

### Claim 12 (depends on 7)

The device for playing streaming media according to claim 7, wherein, the local media file is of an FLV format, and the local media player is a Flash player.

### Claim 13

A non-transitory storage medium containing computer-executable instructions, which, when executed by a computer processor, are configured to perform a method for playing streaming media, wherein, the method comprises:
sending a media play request to a server and obtaining an index file of a media stream from the server, wherein the media stream comprises the index file and at least two slice files, and time information and address information of each of the at least two slice files are recorded in the index file;
obtaining all slice files of the media stream according to the index file;
combining and converting all the slice files obtained into a local media file; and
playing the local media file by a local media player
wherein the local media file is of a format supported by the local media player;
wherein the method further comprises:
parsing the index file to determine the address information of each slice file of the media stream and name information contained in the address information;
scanning a local storage device and obtain slice files already downloaded to the local storage device, wherein the slice files already downloaded have names the same as those of slice files of the media stream; and
obtaining, from the server, other slice files of the media stream except for the slice files already downloaded, according to the address information.
