CN110769326B - Method and device for loading video slice file and playing video file - Google Patents

Method and device for loading video slice file and playing video file Download PDF

Info

Publication number
CN110769326B
CN110769326B CN201911150081.2A CN201911150081A CN110769326B CN 110769326 B CN110769326 B CN 110769326B CN 201911150081 A CN201911150081 A CN 201911150081A CN 110769326 B CN110769326 B CN 110769326B
Authority
CN
China
Prior art keywords
file
video
slice
video slice
loading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911150081.2A
Other languages
Chinese (zh)
Other versions
CN110769326A (en
Inventor
李英阁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Cubesili Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Cubesili Information Technology Co Ltd filed Critical Guangzhou Cubesili Information Technology Co Ltd
Priority to CN201911150081.2A priority Critical patent/CN110769326B/en
Publication of CN110769326A publication Critical patent/CN110769326A/en
Application granted granted Critical
Publication of CN110769326B publication Critical patent/CN110769326B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47217End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the application provides a method and a device for loading a video slice file and playing the video file, which relate to the technical field of audio and video processing, wherein a video slice list request and a video slice file request are respectively instantiated into a first network protocol object and a second network protocol object; loading the video slice list file by using a first network protocol object, sequentially resolving the slice file addresses of the video slice files reversely from the video slice list file, and feeding the slice file addresses back to the play control module in real time; and receiving the address of the slice file forwarded by the play control module, and loading the corresponding video slice file by using the second network protocol object according to the address of the slice file. In this embodiment, in the process of analyzing the video slice list file to obtain the slice file address, the slice file address is analyzed and the video slice file is loaded at the same time by using an object instantiation mode, so that the time consumed for loading the video slice file on the first screen is reduced.

Description

Method and device for loading video slice file and playing video file
Technical Field
The present application relates to the field of audio and video processing technologies, and in particular, to a method and an apparatus for loading a video slice file and playing a video file, and further, to a computer device and a storage medium.
Background
Most on-demand players in the current market are developed based on ffmpeg (Fast Forward Mpeg) and VLC (VLC multimedia player) open source architectures, transport streams are cut into slice files by using ffmpeg for storage, and slice file addresses corresponding to the slice files corresponding to the transport streams are assembled into a playlist file containing metadata based on a streaming media network transport protocol of a hypertext transport protocol. When the on-demand playback is carried out, the address of the slice file is obtained from the on-demand media server by accessing the playlist file, and then the real audio and video stream is requested from the storage server through the address of the slice file so as to watch the played live broadcast.
In the live broadcasting process, the longer the live broadcasting time is, the more transport stream slices are, the larger the playlist file is, and the longer the time consumed for downloading the slice list file is; particularly, the higher the resolution and the code rate of the live video, the longer the time consumption for loading the video slice file, and the experience of watching live playback by a user is reduced.
Disclosure of Invention
The present application aims to solve at least one of the above technical drawbacks, in particular the problem of time consuming playback of live video.
In a first aspect, an embodiment of the present application provides a method for loading a video slice file, including the following steps:
instantiating a video slice list request and a video slice file request as a first network protocol object and a second network protocol object, respectively;
loading video slice list files by using the first network protocol object, sequentially resolving slice file addresses of the video slice files reversely from the video slice list files, and feeding the slice file addresses back to a play control module in real time;
and receiving the address of the slice file forwarded by the play control module, and starting and loading a corresponding video slice file by using the second network protocol object according to the address of the slice file.
In one embodiment, the step of loading a video slice list file using the first network protocol object comprises:
acquiring the video slice list address through the play control module, and analyzing the video slice list address to obtain a list server where the video slice file list is located;
loading the video slice list file from the list server using the first network protocol object.
In an embodiment, the step of starting and loading the corresponding video slice file according to the slice file address by using the second network protocol object includes:
analyzing the address of the slice file to obtain a slice server where the video slice file is located;
starting and loading the video slice file from the slice server using the second network protocol object.
In an embodiment, the step of sequentially resolving the slice file addresses of the video slice files inversely according to the video slice list file includes:
and on the basis of a streaming media network transmission protocol of a hypertext transfer protocol, sequentially and inversely resolving the slice file address of each video slice file from the video slice list file.
In a second aspect, an embodiment of the present application provides a method for playing a video file, including the following steps:
receiving a playing request of a user, and generating a video slice list request and a video slice file request for loading video slice data according to the playing request;
instantiating the video slice list request and the video slice file request as a first network protocol object and a second network protocol object, respectively;
loading video slice list files by using the first network protocol object, sequentially resolving slice file addresses of the video slice files reversely from the video slice list files, and feeding the slice file addresses back to a play control module in real time;
receiving the address of the slice file forwarded by the play control module, starting and loading a corresponding video slice file by using the second network protocol object according to the address of the slice file;
and analyzing and playing the video streams of the loaded video slice files in sequence.
In an embodiment, the step of sequentially parsing and playing the video stream of the loaded video slice file includes:
continuously analyzing the video slice files in sequence according to an MPEG-2 transport stream protocol to form video streams;
and decoding the video stream and then playing the decoded video stream in real time.
In a third aspect, an embodiment of the present application further provides a device for loading a video slice file, including:
the instantiation module is used for instantiating the video slice list request and the video slice file request into a first network protocol object and a second network protocol object respectively;
the list file loading module is used for loading video slice list files by using the first network protocol object, sequentially and reversely resolving slice file addresses of the video slice list files, and feeding the slice file addresses back to the play control module in real time;
and the slice file loading module is used for receiving the slice file address forwarded by the play control module, starting and loading the corresponding video slice file according to the slice file address by using the second network protocol object.
In a fourth aspect, an embodiment of the present application further provides a device for playing a video file, including:
the playing request receiving module is used for receiving a playing request of a user and generating a video slice list request and a video slice file request for loading video slice data according to the playing request;
an instantiation module, configured to instantiate the video slice list request and the video slice file request into a first network protocol object and a second network protocol object, respectively;
the list file loading module is used for loading video slice list files by using the first network protocol object, sequentially and reversely resolving slice file addresses of the video slice list files, and feeding the slice file addresses back to the play control module in real time;
the slice file loading module is used for receiving the slice file address forwarded by the play control module, starting and loading a corresponding video slice file according to the slice file address by using the second network protocol object;
and the video stream playing module is used for sequentially analyzing and playing the video streams of the loaded video slice files.
In a fifth aspect, the present application further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method for loading a video slice file or the method for playing a video file according to any of the above embodiments.
In a sixth aspect, the present application further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the steps of the method for loading a video slice file or the method for playing a video file as mentioned in any of the above embodiments.
The method, the apparatus, the device and the storage medium for loading the video slice file and playing the video file provided by the above embodiments respectively instantiate the video slice list request and the video slice file request as the first network protocol object and the second network protocol object; loading the video slice list file by using a first network protocol object, sequentially resolving the slice file addresses of the video slice files reversely from the video slice list file, and feeding the slice file addresses back to the play control module in real time; and receiving the address of the slice file forwarded by the play control module, starting and loading the corresponding video slice file by using a second network protocol object according to the address of the slice file. In the embodiment, in the process of analyzing the video slice list file to obtain the address of the slice file, the address of the slice file is analyzed and the video slice file is loaded simultaneously by using an object instantiation mode, so that the time consumed for loading the video slice file on the first screen is reduced.
Compared with a serial mode that one video corresponds to one object in the prior art, the embodiment respectively instantiates the video slice list request and the video slice file request into the first network protocol object and the second network protocol object through the parallel pipeline mode, and feeds the address of the slice file back to the play control module in real time in the process of analyzing the video slice list file by using the first network protocol object to obtain the address of the slice file, so that the second network protocol object can simultaneously analyze the address of the slice file and load the video slice file, and thus the time consumption of loading the video slice file on the first screen is reduced.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow diagram of a method for loading a video slice file according to an embodiment;
fig. 2 is a schematic diagram of a conventional loading method of a video slice file;
FIG. 3 is a flowchart of a method for playing a video file according to an embodiment;
FIG. 4 is a diagram illustrating a video file playing method according to an embodiment;
fig. 5 is a schematic structural diagram of a loading apparatus for a video slice file according to an embodiment;
fig. 6 is a schematic structural diagram of a playing apparatus for playing a video file according to an embodiment.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Fig. 1 is a flowchart of a loading method of a video slice file according to an embodiment, and as shown in fig. 1, the loading method of the video slice file may include the following steps:
and S110, instantiating the video slice list request and the video slice file request into a first network protocol object and a second network protocol object respectively.
For instantiation, in object-oriented programming, the process of creating an object with a class is often referred to as instantiation. In this embodiment, the video slice list request is instantiated as a first network protocol object and the video slice file request is instantiated as a second network protocol object.
S120, loading the video slice list file by using the first network protocol object, sequentially solving the slice file addresses of the video slice files reversely from the video slice list file, and feeding the slice file addresses back to the play control module in real time.
In this embodiment, the play control module carries the video slice list address of the video slice data. The method comprises the steps of obtaining a video slice list address through a play control module, analyzing the video slice list address to obtain a list server where a video slice file list is located, establishing communication connection with the list server, and loading the video slice list file from the list server by utilizing a first network protocol object.
And further decompressing the received video slice list file, continuously and sequentially resolving the slice file address of each video slice file from the received video slice list file based on a streaming media network transmission protocol of a hypertext transfer protocol, and feeding back the resolved slice file address to the play control module in real time. In an embodiment, the playing control module may be a virtual software control module, or may be a software and hardware combined control module.
S130, receiving the slice file address forwarded by the play control module, starting and loading a corresponding video slice file according to the slice file address by using the second network protocol object.
And after receiving the slicing file address fed back by the first network protocol object, the playing control module sends the slicing file address to the second network protocol object. And the second network protocol object is started after receiving the address of the slice file. And analyzing according to the address of the slice file by using a second network protocol object to obtain a slice server where the video slice file is located, establishing communication connection with the slice server, and loading the corresponding video slice file from the slice server.
Fig. 2 is a schematic diagram of a conventional loading method of a video slice file, and as shown in fig. 2, a user sets an address to request playing, where the set address includes a video slice list address. The method comprises the steps of obtaining a video slice list address through a play control module, resolving a list server where a video slice file list is located according to the video slice list address, and establishing a communication request video slice list file for the list server. After the video slice list file is loaded, decompressing the video slice list file, and analyzing the address of the slice file from the video slice list file by a streaming media network transmission protocol based on a hypertext transmission protocol. After the video slice list file is analyzed, the slice server where the video slice file is located is obtained according to the address analysis of the slice file, communication connection is established for the slice server, and the corresponding video slice file is loaded from the slice server. As can be seen from fig. 2, the conventional video slice file is loaded through the network download module based on the serial mode, and the video slice file is parsed after the video slice list file is parsed, and the conventional download method of the video slice file cannot meet the requirement of live playback. Based on the characteristics of live broadcast service, the longer the live broadcast time is, the more transport stream slices stored in the form of m3u8 are, the larger the video slice file list is, the larger the time consumption for downloading the video slice file list is, the higher the resolution and code rate of the live broadcast video are, the larger the video slice file with the same playing time length is, the larger the time consumption for downloading the video slice file is, so that the time consumption of the first screen is large when the live broadcast video is played back on demand, and even video loading is blocked.
In the loading method of a video slice file provided by this embodiment, a video slice list request and a video slice file request are instantiated as a first network protocol object and a second network protocol object, respectively; loading the video slice list file by using a first network protocol object, sequentially resolving the slice file addresses of the video slice files reversely from the video slice list file, and feeding the slice file addresses back to the play control module in real time; and receiving the address of the slice file forwarded by the play control module, starting and loading the corresponding video slice file by using a second network protocol object according to the address of the slice file. Compared with a serial mode that one video corresponds to one object in the prior art, the embodiment respectively instantiates the video slice list request and the video slice file request into the first network protocol object and the second network protocol object through the parallel pipeline mode, and feeds the address of the slice file back to the play control module in real time in the process of analyzing the video slice list file by using the first network protocol object to obtain the address of the slice file, so that the second network protocol object can simultaneously analyze the address of the slice file and load the video slice file, and thus the time consumption of loading the video slice file on the first screen is reduced.
Fig. 3 is a flowchart of a playing method of a video file according to an embodiment, and as shown in fig. 3, the playing method of the video file may include the following steps:
s310, receiving a playing request of a user, and generating a video slice list request and a video slice file request for loading video slice data according to the playing request.
In an embodiment, the video slice data may be a list file of audio-video files saved in the m3u8 protocol format. The user selects the live video for on-demand playback, the client receives a play request sent by the user, wherein the play request comprises a video slice list address of the live video, and a video slice list request and a video slice file request for loading video slice data are generated. And the video slice list address is used for determining the position of the video slice list file.
S320, instantiating the video slice list request and the video slice file request into a first network protocol object and a second network protocol object respectively.
In this embodiment, the video slice list request is instantiated as a first network protocol object and the video slice file request is instantiated as a second network protocol object using the method of instantiating an object.
S330, loading the video slice list file by using the first network protocol object, sequentially resolving the slice file address of each video slice file in an inverse mode for the video slice list file, and feeding the slice file address back to the playing control module in real time.
In this embodiment, the play control module carries the video slice list address of the video slice data. The method comprises the steps of obtaining a video slice list address through a play control module, analyzing the video slice list address to obtain a list server where a video slice file list is located, establishing communication connection with the list server, and loading the video slice list file from the list server by utilizing a first network protocol object.
And further decompressing the received video slice list file, continuously and sequentially resolving the slice file address of each video slice file from the received video slice list file based on a streaming media network transmission protocol of a hypertext transfer protocol, and feeding back the resolved slice file address to the play control module in real time.
S340, receiving the slice file address forwarded by the play control module, starting and loading the corresponding video slice file according to the slice file address by using the second network protocol object.
And after receiving the slicing file address fed back by the first network protocol object, the playing control module sends the slicing file address to the second network protocol object. And the second network protocol object is started after receiving the address of the slice file. And analyzing according to the address of the slice file by using a second network protocol object to obtain a slice server where the video slice file is located, establishing communication connection with the slice server, and loading the corresponding video slice file from the slice server.
And S350, analyzing and playing the video streams of the loaded video slice files in sequence.
Firstly, a loaded video slice file is sent to a decapsulation module to perform decapsulation operation, then the decapsulated slice file is encapsulated according to a set encapsulation format to obtain a coded file, the coded file is decoded to obtain an audio/video file, and the audio/video file is played.
In an embodiment, the video slice file is sequentially and continuously parsed according to an MPEG (Moving Picture Experts Group) transport stream protocol to form a video stream; and decoding the video stream and then playing the decoded video stream in real time. Further, it is possible to independently decode any section of the transport stream corresponding to the slice file using the MPEG2-TS protocol, thereby improving decoding efficiency.
In the video file playing method provided by this embodiment, the video slice list request and the video slice file request are instantiated as the first network protocol object and the second network protocol object, and the slice file address is fed back to the playing control module in real time in the process of analyzing the video slice list file by using the first network protocol object to obtain the slice file address, so that the second network protocol object can simultaneously analyze the slice file address and load the video slice file, thereby reducing the time consumed by loading the video slice file on the first screen. Furthermore, the threshold value of the first screen buffer can be properly increased, the first screen can be ensured to be played for a longer time, and the first screen is prevented from being loaded and blocked.
Fig. 4 is a schematic diagram of a video file playing method according to an embodiment, and as shown in fig. 4, a network download module is abstractly packaged to instantiate a video slice list request and a video slice file request as a first network protocol object and a second network protocol object, respectively. Specifically, the video file playing method may include the following steps:
and S11, the user sets an address to request playing.
Wherein the set address comprises a video slice list file address. The client receives a playing request sent by a user, wherein the playing request comprises a video slice list address of live video, generates a video slice list request and a video slice file request for loading video slice data, and sends the playing request to the playing control module. And the video slice list address is used for determining the position of the video slice list file.
Further, the video slice list request is instantiated as a first network protocol object and the video slice file request is instantiated as a second network protocol object using the method of instantiating an object.
And S12, resolving the list server where the video slice list file is located according to the video slice list address, and establishing a communication request data stream to the list server.
And S13, the decompression list server returns data, and the address of the slice file is resolved according to the streaming media network protocol.
In this step, the address of the slice file obtained by analysis is fed back to the play control module in real time.
Step S12 and step S13 are performed by the first network protocol object. Wherein steps S12 and S13 may be run in parallel.
And S14, resolving the slice server where the video slice file is located according to the slice file address, and establishing communication to the slice server.
This step S14 is executed by the second network protocol object, receives the address of the slice file forwarded by the play control module, starts and obtains the slice server where the video slice file is located according to the address resolution of the slice file by using the second network protocol object, establishes a communication connection to the slice server, and loads the corresponding video slice file from the slice server.
When the second network protocol object is started, steps S12, S13, and S14 may run in parallel.
And S15, sending the data received by the server to a decapsulation module for decapsulation.
And the server transmits the received transmission stream data of the video slice file to a decapsulation module, decapsulates the transmission stream data according to a certain protocol, and transmits the decapsulated video slice file to other layers for subsequent processing.
And S16, synchronizing the sound and picture synchronization module and then decoding and playing.
In this step, the audio and video synchronization module synchronizes audio and video streams obtained by parsing the video slice file, and decodes the audio and video streams into audio and video files for playing.
As can be clearly seen from fig. 4, the video slice list request and the video slice file request are respectively instantiated as a first network protocol object and a second network protocol object, so that in the process of analyzing the video slice list file by using the first network protocol object to obtain a slice file address, the second network protocol object is used to analyze the slice file address and load the video slice file, and the video slice list file and the loaded video slice file are analyzed and loaded at the same time.
Fig. 5 is a schematic structural diagram of a loading apparatus for a video slice file according to an embodiment, and as shown in fig. 5, the loading apparatus 100 for a video slice file may include: an instantiation module 110, a list file loading module 120, and a slice file loading module 130.
The instantiation module 110 is configured to instantiate the video slice list request and the video slice file request into a first network protocol object and a second network protocol object, respectively;
a list file loading module 120, configured to load a video slice list file by using the first network protocol object, sequentially and inversely resolve slice file addresses of the video slice list files, and feed back the slice file addresses to the play control module in real time;
and a slice file loading module 130, configured to receive the slice file address forwarded by the play control module, start and load a corresponding video slice file according to the slice file address by using the second network protocol object.
The loading device for video slice files provided in this embodiment instantiates the video slice list request and the video slice file request into the first network protocol object and the second network protocol object, respectively, so that in the process of analyzing the video slice list file by using the first network protocol object to obtain the address of the slice file, the second network protocol object is used to analyze the address of the slice file and load the video slice file, thereby reducing the time consumed by loading the video slice file on the first screen.
In an embodiment, the list file loading module 120 is configured to obtain the video slice list address through the play control module, and analyze the video slice list address to obtain a list server where the video slice file list is located; loading the video slice list file from the list server using the first network protocol object.
In an embodiment, the slice file loading module 130 is configured to analyze the address of the slice file to obtain a slice server where the video slice file is located; starting and loading the video slice file from the slice server using the second network protocol object.
In an embodiment, the list file loading module 120 is configured to sequentially and inversely resolve the slice file address of each video slice file for the video slice list file based on a streaming media network transport protocol of a hypertext transport protocol.
The loading device for the video slice file can be used for executing the loading method for the video slice file provided by any embodiment, and has corresponding functions and beneficial effects.
Fig. 6 is a schematic structural diagram of a playing apparatus for a video file according to an embodiment, and as shown in fig. 6, the playing apparatus 300 for a video file may include: a play request receiving module 310, an instantiation module 320, a list file loading module 330, a slice file loading module 340, and a video stream playing module 350.
The playing request receiving module 310 is configured to receive a playing request of a user, and generate a video slice list request and a video slice file request for loading video slice data according to the playing request;
an instantiation module 320 for instantiating the video slice list request and the video slice file request into a first network protocol object and a second network protocol object, respectively;
the list file loading module 330 is configured to load a video slice list file by using the first network protocol object, sequentially solve the slice file addresses of the video slice list files reversely, and feed back the slice file addresses to the play control module in real time;
a slice file loading module 340, configured to receive the slice file address forwarded by the play control module, start and load a corresponding video slice file according to the slice file address by using the second network protocol object;
and a video stream playing module 350, configured to sequentially parse and play the video streams of the loaded video slice files.
In the playing device for a video file provided by this embodiment, the video slice list request and the video slice file request are instantiated as the first network protocol object and the second network protocol object, so that in the process of analyzing the video slice list file by using the first network protocol object to obtain the address of the slice file, the second network protocol object is used to analyze the address of the slice file and load the video slice file, and the video slice list file and the loaded video slice file are analyzed and loaded at the same time.
In an embodiment, the video stream playing module 350 is configured to sequentially and continuously parse the video slice file according to an MPEG-2 transport stream protocol to form a video stream; and decoding the video stream and then playing the decoded video stream in real time.
The playing device of the video file can be used for executing the playing method of the video file provided by any embodiment, and has corresponding functions and beneficial effects.
The embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the method for loading a video slice file as in any of the above embodiments is implemented.
The embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the program, the method for playing a video file in any of the above embodiments is implemented.
Optionally, the computer device may be a mobile terminal, a tablet computer, a server, or the like. When the computer device provided by the above embodiment executes the method for loading a video slice file or the method for playing a video file provided by any of the above embodiments, the computer device has corresponding functions and advantages.
Embodiments of the present application also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for processing image segmentation information, including:
instantiating a video slice list request and a video slice file request as a first network protocol object and a second network protocol object, respectively;
loading video slice list files by using the first network protocol object, sequentially resolving slice file addresses of the video slice files reversely from the video slice list files, and feeding the slice file addresses back to a play control module in real time;
and receiving the address of the slice file forwarded by the play control module, and starting and loading a corresponding video slice file by using the second network protocol object according to the address of the slice file.
And, the computer executable instructions, when executed by the computer processor, are further for performing a method of playing a video file, comprising:
receiving a playing request of a user, and generating a video slice list request and a video slice file request for loading video slice data according to the playing request;
instantiating the video slice list request and the video slice file request as a first network protocol object and a second network protocol object, respectively;
loading video slice list files by using the first network protocol object, sequentially resolving slice file addresses of the video slice files reversely from the video slice list files, and feeding the slice file addresses back to a play control module in real time;
receiving the address of the slice file forwarded by the play control module, starting and loading a corresponding video slice file by using the second network protocol object according to the address of the slice file;
and analyzing and playing the video streams of the loaded video slice files in sequence.
Of course, the storage medium provided in the embodiments of the present application includes computer-executable instructions, and the computer-executable instructions are not limited to the operations of the processing method of image segmentation information as described above, and may also perform related operations in a loading method of a video slice file or a playing method of a video file provided in any embodiment of the present application, and have corresponding functions and advantages.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk, or an optical disk of a computer, and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) to execute the loading method of the video slice file or the playing method of the video file according to any embodiment of the present application.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present application, and it should be noted that, for those skilled in the art, several modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations should also be regarded as the protection scope of the present application.

Claims (9)

1. A method for loading a video slice file is characterized by comprising the following steps:
instantiating a video slice list request and a video slice file request as a first network protocol object and a second network protocol object, respectively;
loading video slice list files by using the first network protocol object, sequentially resolving slice file addresses of the video slice files reversely from the video slice list files, and feeding the slice file addresses back to a play control module in real time;
receiving the address of the slice file forwarded by the play control module, starting and loading a corresponding video slice file by using the second network protocol object according to the address of the slice file, wherein the method comprises the following steps:
analyzing the address of the slice file to obtain a slice server where the video slice file is located;
starting and loading the video slice file from the slice server using the second network protocol object.
2. The method for loading a video slice file according to claim 1, wherein the step of loading a video slice list file using the first network protocol object comprises:
acquiring the video slice list address through the play control module, and analyzing the video slice list address to obtain a list server where the video slice file list is located;
loading the video slice list file from the list server using the first network protocol object.
3. The method for loading video slice files according to claim 1, wherein the step of sequentially parsing back the slice file addresses of the video slice files from the video slice list file comprises:
and on the basis of a streaming media network transmission protocol of a hypertext transfer protocol, sequentially and inversely resolving the slice file address of each video slice file from the video slice list file.
4. A method for playing a video file is characterized by comprising the following steps:
receiving a playing request of a user, and generating a video slice list request and a video slice file request for loading video slice data according to the playing request;
instantiating the video slice list request and the video slice file request as a first network protocol object and a second network protocol object, respectively;
loading video slice list files by using the first network protocol object, sequentially resolving slice file addresses of the video slice files reversely from the video slice list files, and feeding the slice file addresses back to a play control module in real time;
receiving the address of the slice file forwarded by the play control module, starting and loading a corresponding video slice file by using the second network protocol object according to the address of the slice file;
and analyzing and playing the video streams of the loaded video slice files in sequence.
5. The method for playing back a video file according to claim 4, wherein the step of sequentially parsing and playing back the video stream of the loaded video slice file comprises:
continuously analyzing the video slice file in sequence according to an MPEG transport stream protocol to form a video stream;
and decoding the video stream and then playing the decoded video stream in real time.
6. An apparatus for loading a video slice file, comprising:
the instantiation module is used for instantiating the video slice list request and the video slice file request into a first network protocol object and a second network protocol object respectively;
the list file loading module is used for loading video slice list files by using the first network protocol object, sequentially and reversely resolving slice file addresses of the video slice list files, and feeding the slice file addresses back to the play control module in real time;
and the slice file loading module is used for receiving the slice file address forwarded by the play control module, starting and loading the corresponding video slice file according to the slice file address by using the second network protocol object.
7. A playback apparatus for a video file, comprising:
the playing request receiving module is used for receiving a playing request of a user and generating a video slice list request and a video slice file request for loading video slice data according to the playing request;
an instantiation module, configured to instantiate the video slice list request and the video slice file request into a first network protocol object and a second network protocol object, respectively;
the list file loading module is used for loading video slice list files by using the first network protocol object, sequentially and reversely resolving slice file addresses of the video slice list files, and feeding the slice file addresses back to the play control module in real time;
the slice file loading module is used for receiving the slice file address forwarded by the play control module, starting and loading a corresponding video slice file according to the slice file address by using the second network protocol object;
and the video stream playing module is used for sequentially analyzing and playing the video streams of the loaded video slice files.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of loading a video slice file according to any one of claims 1 to 3 or the method of playing a video file according to any one of claims 4 to 5 when executing said program.
9. A storage medium containing computer-executable instructions for performing the steps of the method of loading a video slice file according to any one of claims 1 to 3 or the method of playing a video file according to any one of claims 4 to 5 when executed by a computer processor.
CN201911150081.2A 2019-11-21 2019-11-21 Method and device for loading video slice file and playing video file Active CN110769326B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911150081.2A CN110769326B (en) 2019-11-21 2019-11-21 Method and device for loading video slice file and playing video file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911150081.2A CN110769326B (en) 2019-11-21 2019-11-21 Method and device for loading video slice file and playing video file

Publications (2)

Publication Number Publication Date
CN110769326A CN110769326A (en) 2020-02-07
CN110769326B true CN110769326B (en) 2022-03-01

Family

ID=69339126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911150081.2A Active CN110769326B (en) 2019-11-21 2019-11-21 Method and device for loading video slice file and playing video file

Country Status (1)

Country Link
CN (1) CN110769326B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023133960A1 (en) * 2022-01-12 2023-07-20 成都拟合未来科技有限公司 Display device, method and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9743124B2 (en) * 2013-09-12 2017-08-22 Wideorbit Inc. Systems and methods to deliver a personalized mediacast with an uninterrupted lead-in portion
CN105611328B (en) * 2015-12-25 2019-01-01 深圳Tcl新技术有限公司 Video data based on HLS Streaming Media accelerates method for down loading and device
CN107277081A (en) * 2016-04-06 2017-10-20 北京优朋普乐科技有限公司 Section method for down loading and device, the stream media system of stream medium data
CN106302465B (en) * 2016-08-17 2019-09-24 无锡天脉聚源传媒科技有限公司 A kind of method and device of playing audio-video data
CN106358047A (en) * 2016-10-09 2017-01-25 天脉聚源(北京)科技有限公司 Method and device for playing streaming media video
CN108063769B (en) * 2017-12-26 2020-10-02 南京中兴新软件有限责任公司 Method and device for realizing content service and content distribution network node

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Spark Streaming的快速视频转码方法;付眸;《计算机应用》;20180725;全文 *

Also Published As

Publication number Publication date
CN110769326A (en) 2020-02-07

Similar Documents

Publication Publication Date Title
KR102004006B1 (en) Extensions to trigger parameters table for interactive television
CN107634930B (en) Method and device for acquiring media data
EP3096526B1 (en) Communication apparatus, communication data generation method, and communication data processing method
US20090300145A1 (en) Media streaming with seamless ad insertion
KR20150020520A (en) Extensions to trigger parameters table for interactive television
US11284135B2 (en) Communication apparatus, communication data generation method, and communication data processing method
US11128897B2 (en) Method for initiating a transmission of a streaming content delivered to a client device and access point for implementing this method
US10958972B2 (en) Channel change method and apparatus
KR102598237B1 (en) Method and apparatus for digital broadcast services
CN111355976A (en) Video live broadcast method and system based on HEVC standard
CN110769326B (en) Method and device for loading video slice file and playing video file
CN106612462B (en) Fast forward and fast backward processing method and terminal
EP3352469A1 (en) Transmission device, reception device, and data processing method
EP3096525B1 (en) Communication apparatus, communication data generation method, and communication data processing method
EP2932683B1 (en) Method and apparatus for handling files in association with media content delivery
CN105379281B (en) Picture reference control for video decoding using a graphics processor
JP2007123984A (en) Content distribution system, stream transmission apparatus, receiving apparatus, and content distribution method
CN112437316A (en) Method and device for synchronously playing instant message and live video stream
EP3352463B1 (en) Transmission device, reception device for delivering non real time content in parallel to a broadcasting program
CN107005745B (en) Method and apparatus for encapsulating a stream of audiovisual content
WO2022253079A1 (en) Hls stream-based subtitle display method and device
CA3050636C (en) Reducing latency for streaming video
CN111405298A (en) Android end-to-end live broadcast method based on KCP protocol
CN117319711A (en) Program playing method, client, server, storage medium and program product
EP3732888A1 (en) Reducing latency for streaming video

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210112

Address after: 511442 3108, 79 Wanbo 2nd Road, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Applicant after: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 511442 29 floor, block B-1, Wanda Plaza, Huambo business district, Panyu District, Guangzhou, Guangdong.

Applicant before: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20200207

Assignee: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Contract record no.: X2021440000054

Denomination of invention: Method and device for loading video slice file and playing video file

License type: Common License

Record date: 20210208

GR01 Patent grant
GR01 Patent grant