CN112423099A - Video loading method and device and electronic equipment - Google Patents

Video loading method and device and electronic equipment Download PDF

Info

Publication number
CN112423099A
CN112423099A CN202011320532.5A CN202011320532A CN112423099A CN 112423099 A CN112423099 A CN 112423099A CN 202011320532 A CN202011320532 A CN 202011320532A CN 112423099 A CN112423099 A CN 112423099A
Authority
CN
China
Prior art keywords
video
player
play
hash value
current
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.)
Pending
Application number
CN202011320532.5A
Other languages
Chinese (zh)
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.)
Vivo Mobile Communication Hangzhou Co Ltd
Original Assignee
Vivo Mobile Communication Hangzhou 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 Vivo Mobile Communication Hangzhou Co Ltd filed Critical Vivo Mobile Communication Hangzhou Co Ltd
Priority to CN202011320532.5A priority Critical patent/CN112423099A/en
Publication of CN112423099A publication Critical patent/CN112423099A/en
Pending legal-status Critical Current

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/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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • 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/65Transmission of management data between client and server
    • H04N21/658Transmission by the client directed to the server
    • H04N21/6587Control parameters, e.g. trick play commands, viewpoint selection

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The application discloses a video loading method, a video loading device and electronic equipment, wherein the method comprises the following steps: acquiring a related video corresponding to a current video under the condition that a player is controlled to play the current video; controlling a preset preloading process to preload the associated video; and after the current video is played, controlling the player to play the associated video. According to the method and the device, due to the fact that the preset preloading process is controlled to preload the associated video, when the associated video is played, time consumed by the first frame of the video is reduced, and the playing starting speed of the video is improved; meanwhile, after the current video is played, the player is controlled to play the preloaded associated video, so that the video is played quickly.

Description

Video loading method and device and electronic equipment
Technical Field
The application belongs to the technical field of videos, and particularly relates to a video loading method and device and electronic equipment.
Background
Currently, as the intelligence of electronic devices increases, more and more users choose to watch videos using the electronic devices.
The electronic equipment calls the decoder to decode the video through the player, and then the video is played. The decoding process of the video is very time-consuming, which results in a slow video start-up speed during the video playing process.
Disclosure of Invention
The embodiment of the application aims to provide a video loading method, a video loading device and electronic equipment, and the technical problem that the video starting playing speed is low can be solved.
In order to solve the technical problem, the present application is implemented as follows:
in a first aspect, an embodiment of the present application provides a video loading method, including:
under the condition that a player is controlled to play a current video, acquiring a related video corresponding to the current video;
controlling a preset preloading process to preload the associated video;
and after the current video is played, controlling the player to play the associated video.
In a second aspect, an embodiment of the present application provides a video loading apparatus, including:
the acquisition module is used for acquiring a related video corresponding to the current video under the condition that the player is controlled to play the current video;
the pre-loading module is used for controlling a preset pre-loading process to pre-load the associated video;
and the playing module is used for controlling the player to play the associated video after the current video is played.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, under the condition that the player is controlled to play the current video, the associated video corresponding to the current video is obtained; controlling a preset preloading process to preload the associated video; and after the current video is played, controlling the player to play the associated video. In the embodiment of the application, the preset preloading process is controlled to preload the associated video, so that the time consumed by the first frame of the video is reduced and the video playing starting speed is increased when the associated video is played; meanwhile, after the current video is played, the player is controlled to play the preloaded associated video, so that the video is played quickly.
Drawings
Fig. 1 is a flowchart of a video loading method provided in an embodiment of the present application;
fig. 2 is a schematic view of an application scenario of a video loading method according to an embodiment of the present application;
fig. 3 is a block diagram of a video loading apparatus according to an embodiment of the present application;
fig. 4 is a block diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The following describes the detection provided by the embodiments of the present application in detail through specific embodiments and application scenarios thereof with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a flowchart of a video loading method according to an embodiment of the present application, where the video loading method according to the embodiment of the present application includes the following steps:
s101, under the condition that the current video is played by the player, acquiring the associated video corresponding to the current video.
The video loading method provided by this embodiment is applied to an electronic device, and when the electronic device controls a player to play a video, a hardware exchange layer of the electronic device creates a codec (ACodec) object, and the codec object is applied to call a hardware decoder of the electronic device to decode the video, so that the player plays the video.
As can be seen from the above, when controlling a player to work, a codec object needs to be correspondingly created, and the codec object consumes a large amount of memory, so as to avoid the memory being consumed by the codec object too much, the number of the codec objects may be limited to 16, that is, at most 16 players work simultaneously.
The associated videos in this embodiment may be understood as videos to be played, and the number of the associated videos in this embodiment may be 1 or multiple, where the specific number of the associated videos may be set by a user.
And S102, controlling a preset preloading progress to preload the associated video.
It should be understood that the player has 2 functions, one is a playing function, namely playing the video; the other is a pre-loading function, namely pre-loading the video to be played. Preloading for the associated video can thus be achieved by creating a player.
For example, in the case of playing video a using the player 1, if video a corresponds to 2 associated videos, video B and video C, the electronic device creates the player 2 for loading video B and creates the player 3 for loading video C.
When one player works, a coding and decoding object needs to be correspondingly established, and the coding and decoding object consumes a large memory; and when the player is used for preloading the associated video, the player needs to store the loaded video file into the memory. The memory consumed in this way of implementing the preloading of the video by creating the player is high.
In this embodiment, after the associated video is determined, a player does not need to be additionally created, but a preset preloading process is directly controlled to preload the associated video, wherein the preset preloading process can realize a preloading function of the player. In this way, there is no need to create a codec object; and the video file loaded by the preloading process can be stored in a disk, so that the memory consumption in the video preloading process is greatly reduced.
S103, after the current video is played, controlling the player to play the associated video.
In this embodiment, an optional case is that the number of the associated videos is 1, and then, after the current video is played, the player is controlled to play the associated video.
Alternatively, the number of the associated videos is multiple, and the player may be controlled to play the first ordered associated video after the current video is played according to the ordering of the associated videos.
For example, in the case of playing video a using a player, if video a corresponds to 3 associated videos, video B, video C, and video D, and the video B is ordered before video C and the video C is ordered before video D. Then, after the video a is played, the player is controlled to play the video B, and after the video B is played, the player is controlled to play the video C.
In the embodiment of the application, the preset preloading process is controlled to preload the associated video, so that the time consumed by the first frame of the video is reduced and the video playing starting speed is increased when the associated video is played; meanwhile, after the current video is played, the player is controlled to play the preloaded associated video, so that the video is played quickly.
Further, after the current video is played, controlling the player to play the associated video includes:
acquiring a first video format of the associated video and a second video format of the current video; and controlling the player to play the associated video according to the first video format and the second video format.
In the process of preloading the associated video, the associated video related information can be acquired, and the related information includes but is not limited to ftyp information, moov information and mdat information. Wherein the ftyp information can be understood as the data type of the video file; moov information can be understood as basic information of a video file, and includes a video format; the mdat information can be understood as media data of a video file.
Acquiring a video format in moov information of the associated video, and calling the video format of the associated video as a first video format; and acquiring a video format in the moov information of the current video, and calling the video format of the current video as a second video format. According to the first video format and the second video format, the player is controlled to play the associated video.
Further, how the player is controlled to play the associated video according to the first video format and the second video format is explained below.
The controlling the player to play the associated video according to the first video format and the second video format comprises:
under the condition that the first video format is consistent with the second video format, after the current video is played, controlling the player to play the associated video; and under the condition that the first video format is inconsistent with the second video format, restarting the player after the current video is played, and controlling the restarted player to play the associated video.
As described above, in the process of controlling the player to play a video, a codec object needs to be created at the hardware exchange layer of the electronic device, and the codec object is used for decoding the video. It should be noted that, the codec object is related to the video format of the video, and for the video with the same video format, the same codec can be used to decode the video; and for videos with different video formats, decoding by using a codec corresponding to each video format.
An optional implementation manner is that, in the case that the video format of the current video is consistent with the video format of the associated video, since the video formats of the current video and the associated video are the same, the codec object may be multiplexed, and after the player finishes playing the current video, the associated video is directly played.
Another optional implementation manner is that, in a case that the video format of the current video is inconsistent with the video format of the associated video, since another different encoder object needs to be created to play the associated video with the inconsistent video format, the player is controlled to restart after the current video is played, and the associated video is played by using the restarted player.
In this embodiment, when the video format of the current video is not consistent with the video format of the associated video, a new player does not need to be created to play the associated video in another video format, but 1 player is used to play the associated video, so that the memory loss during the video playing process is reduced.
Further, the obtaining of the associated video corresponding to the current video includes:
sending a video address request to a server; receiving address information sent by the server according to the video address request; acquiring an associated video file corresponding to the address information; and controlling the player to analyze the associated video file so as to play the associated video.
The address information sent by the server includes, but is not limited to, a uniform resource locator of the video file and a hash value of the video file, and it should be understood that the uniform resource locator of the video file can be understood as a unique address of the video file on the network, and in some cases, the uniform resource locator of the video file has timeliness.
For example: at the current moment, the uniform resource locator of the video a sent by the server is:
https://1400174353.vod2.myqcloud.com/d1db0086vodtranscq1400174353/3be406e45285890804804817002/v.f30.mp4
however, after a preset duration, for example, one hour, the url of the video a sent again by the server is:
https://1400174353.vod2.myqcloud.com/d1db0086vodtranscq1400174353/c7 620a7d16d09afe36529852ba249674/v.f30.mp4
as an alternative, a separator may be provided in the address information to distinguish between the uniform resource locator flag and the hash value in the address information. In some cases, the url in the address information is time-efficient, while the hash value in the address information is not.
As exemplified above: at the current moment, the address information of the video a sent by the server is:
https://1400174353.vod2.myqcloud.com/d1db0086vodtranscq1400174353/ 3be406e45285890804804817002/v.f30.mp4&helloworld&fg123hqldjwwoajsdgdfsgfj. Wherein the content of the first and second substances,&helloworld&is a separator in the address information and fg123 hqldjwoajjsdgdfsgfffj is the hash value of video a.
However, after a preset time period, for example, one hour, the address information of the video a sent again by the server is:
https://1400174353.vod2.myqcloud.com/d1db0086vodtranscq1400174353/c7 620a7d16d09afe36529852ba249674/v.f30.mp4&helloworld&fg123hqldjwwoajsdgdfsgfj
in this embodiment, after receiving the video address request, the server calculates a hash value of a video file corresponding to the video address request through a hash algorithm, stores the hash value in the address information, and sends the address information to the mobile terminal. On the premise that the data content of the video file is not changed, the hash value is not changed, that is, 2 hash values corresponding to 2 identical files are identical.
In addition, the electronic device has two following embodiments to acquire the current video file:
in one embodiment, a video file corresponding to the address information is stored in the local storage of the electronic device, and then the video file may be determined as the current video file.
In another embodiment, the electronic device may obtain the current video file corresponding to the address information from the server.
It should be understood that the essence of the electronic device pre-downloading the associated video is that the electronic device sends a video address request to the server and receives address information of the associated video sent by the server; and acquiring the corresponding associated video file according to the address information.
In one possible case, a video file corresponding to the address information is stored in a local storage of the electronic device, and then the video file may be determined as an associated video file.
Another possible situation is that a video file corresponding to the address information is not stored in the local storage, and the video file corresponding to the address information is acquired from the server, and in this case, a preset preloading process is controlled to preload the associated video.
Therefore, the following technical scheme for acquiring the current video file is also suitable for the electronic equipment to acquire the associated video file.
How to obtain the current video file corresponding to the address information is specifically described as follows:
further, the acquiring the associated video file corresponding to the address information includes: analyzing the address information to obtain a hash value of the associated video file; determining a plurality of preset hash values corresponding to a plurality of preset video files; and determining the associated video file according to the hash value of the associated video file and the preset hash values.
Further, the determining the associated video file according to the hash value of the associated video file and the preset hash values includes: determining a video file corresponding to a target hash value in the plurality of preset video files as the associated video file under the condition that the hash value identical to the hash value of the associated video file exists in the plurality of preset hash values; and sending a video playing request to a server according to the address information under the condition that the hash value which is the same as the hash value of the associated video file does not exist in the preset hash values, so that the server sends the associated video file.
In this embodiment, the address information is analyzed to obtain a hash value of the video file. Meanwhile, a plurality of preset hash values corresponding to a plurality of preset video files stored in the local memory are determined, wherein the preset files are video files already played by the player.
In an optional embodiment, the hash value of each preset video file is calculated to obtain a plurality of preset hash values.
Another optional implementation manner is that the local storage further stores address information corresponding to each preset video file, the address information stores hash values of the preset video files, and a plurality of preset hash values are obtained by analyzing the address information of each preset video file.
And judging whether the hash value identical to the hash value of the video file exists in the preset hash values.
When the hash value identical to the hash value of the video file exists in the preset hash values, the video file is played by the player, the hash value identical to the hash value of the video file in the preset hash values can be used as a target hash value, and the preset video file corresponding to the target hash value is determined as the current video file.
In this case, the current video file is directly acquired from the local storage, and the player is controlled to analyze the current video file to play the current video.
For example, the hash value of the current video file is "fg 123 hqldjwoajsddgfsgfj", the hash value of the preset video file 1 is "fg 123 hqldjwoajsddgfsgfj", the hash value of the preset video file 2 is "fg 124 hqldjwoajsddgfsgfj", and the hash value of the preset video file 3 is "fg 114 hqldjwoajsddgfsgfj". Since the hash value of the preset video file 1 is the same as the hash value of the current video file, the hash value of the preset video file 1 is determined as the target hash value, and the preset video file 1 is determined as the current video file.
And under the condition that the hash value identical to the hash value of the video file does not exist in the preset hash values, the video file is not played by the player, a video playing request is sent to the server, wherein the video playing request contains address information, and the server sends the current video file corresponding to the address information to the electronic equipment.
In this case, since the local storage does not store the cache of the current video file, the current video file needs to be loaded, and after the loading is completed, the player is controlled to play the current video.
In this embodiment, under the condition that the hash value of the video file is preset in the local storage and is consistent with the hash value of the video file, the corresponding video file can be directly obtained from the local storage, so that the video file does not need to be preloaded, the video starting and playing speed is increased, and the video can be started for a second.
For elaborating the embodiment, please refer to fig. 2, which is a combination of the following description and the accompanying drawings, which illustrates how the electronic device obtains the video file.
As shown in the figure, fig. 2 includes a client, a local server and a cloud server, where the client may be understood as an electronic device, the local server may be understood as a processing module in the electronic device, and the cloud server may be understood as a server.
The client sends the video playing request containing the address information to the local server, and the local server judges whether the video file corresponding to the address information is stored in the client or not according to the address information.
If so, the local server sends a corresponding request to the client, and the client acquires the video file from the local storage after receiving the request; if not, the local server sends the video playing request to the cloud server, and the cloud server sends the video file corresponding to the address information to the client.
As shown in fig. 3, the video loading apparatus 200 includes:
a first obtaining module 201, configured to obtain, when a player is controlled to play a current video, an associated video corresponding to the current video;
the preloading module 202 is configured to control a preset preloading process to preload the associated video;
a playing module 203, configured to control the player to play the associated video after the current video is played.
Optionally, the playing module 203 includes:
the acquisition unit is used for acquiring a first video format of the associated video and a second video format of the current video;
and the control unit is used for controlling the player to play the associated video according to the first video format and the second video format.
Optionally, the control unit is specifically configured to:
under the condition that the first video format is consistent with the second video format, after the current video is played, controlling the player to play the associated video;
and under the condition that the first video format is inconsistent with the second video format, restarting the player after the current video is played, and controlling the restarted player to play the associated video.
Optionally, the video loading apparatus 200 further includes:
the sending module is used for sending a video address request to the server;
the receiving module is used for receiving the address information sent by the server according to the video address request;
the second acquisition module is used for acquiring the associated video file corresponding to the address information;
and the control module is used for controlling the player to analyze the associated video file so as to play the associated video.
Optionally, the second obtaining module includes:
the analysis unit is used for analyzing the address information to obtain a hash value of the associated video file;
the first determining unit is used for determining a plurality of preset hash values corresponding to a plurality of preset video files;
and the second determining unit is used for determining the associated video file according to the hash value of the associated video file and the preset hash values.
Optionally, the second determining unit is specifically configured to:
determining a video file corresponding to a target hash value in the plurality of preset video files as the associated video file under the condition that the hash value identical to the hash value of the associated video file exists in the plurality of preset hash values;
and sending a video playing request to a server according to the address information under the condition that the hash value which is the same as the hash value of the associated video file does not exist in the preset hash values, so that the server sends the associated video file.
The video loading device in the embodiment of the present application may be a mobile terminal, or may be a component, an integrated circuit, or a chip in the terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The video loading device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The video loading apparatus provided in the embodiment of the present application can implement each process implemented by the video loading method in the method embodiment of fig. 1, and is not described here again to avoid repetition.
In the embodiment of the application, the preset preloading process is controlled to preload the associated video, so that the time consumed by the first frame of the video is reduced and the video playing starting speed is increased when the associated video is played; meanwhile, after the current video is played, the player is controlled to play the preloaded associated video, so that the video is played quickly.
Optionally, referring to fig. 4, fig. 4 is a schematic diagram of a hardware structure of an electronic device implementing the embodiment of the present application. As shown in the figure, an electronic device is further provided in this embodiment of the present application, and includes a processor 310, a memory 309, and a program or an instruction stored in the memory 309 and capable of being executed on the processor 310, where the program or the instruction is executed by the processor 310 to implement each process of the above-mentioned embodiment of the video loading method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.
The electronic device 300 includes, but is not limited to: radio frequency unit 301, network module 302, audio output unit 303, input unit 304, sensor 305, display unit 306, user input unit 307, interface unit 308, memory 309, and processor 310.
Those skilled in the art will appreciate that the electronic device 300 may further include a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 310 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 4 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 310 is configured to, under the condition that the player is controlled to play a current video, obtain an associated video corresponding to the current video;
controlling a preset preloading process to preload the associated video;
and after the current video is played, controlling the player to play the associated video.
Optionally, the processor 310 is further configured to obtain a first video format of the associated video and a second video format of the current video;
and controlling the player to play the associated video according to the first video format and the second video format.
Optionally, the processor 310 is further configured to, in a case that the first video format is consistent with the second video format, control the player to play the associated video after the current video is played;
and under the condition that the first video format is inconsistent with the second video format, restarting the player after the current video is played, and controlling the restarted player to play the associated video.
Optionally, the processor 310 is further configured to send a video address request to a server;
receiving address information sent by the server according to the video address request;
acquiring an associated video file corresponding to the address information;
and controlling the player to analyze the associated video file so as to play the associated video.
Optionally, the processor 310 is further configured to parse the address information to obtain a hash value of the associated video file;
determining a plurality of preset hash values corresponding to a plurality of preset video files;
and determining the associated video file according to the hash value of the associated video file and the preset hash values.
Optionally, the processor 310 is further configured to determine, when a hash value that is the same as the hash value of the associated video file exists in the plurality of preset hash values, a video file corresponding to a target hash value in the plurality of preset video files as the associated video file;
and sending a video playing request to a server according to the address information under the condition that the hash value which is the same as the hash value of the associated video file does not exist in the preset hash values, so that the server sends the associated video file.
In the embodiment of the application, the preset preloading process is controlled to preload the associated video, so that the time consumed by the first frame of the video is reduced and the video playing starting speed is increased when the associated video is played; meanwhile, after the current video is played, the player is controlled to play the preloaded associated video, so that the video is played quickly.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the video loading method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the above video loading method embodiment, and can achieve the same technical effect, and the details are not repeated here to avoid repetition.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A method for video loading, comprising:
under the condition that a player plays a current video, acquiring an associated video corresponding to the current video;
controlling a preset preloading process to preload the associated video;
and after the current video is played, controlling the player to play the associated video.
2. The video loading method according to claim 1, wherein said controlling the player to play the associated video after the current video is played comprises:
acquiring a first video format of the associated video and a second video format of the current video;
and controlling the player to play the associated video according to the first video format and the second video format.
3. The video loading method according to claim 2, wherein the controlling the player to play the associated video according to the first video format and the second video format comprises:
under the condition that the first video format is consistent with the second video format, after the current video is played, controlling the player to play the associated video;
and under the condition that the first video format is inconsistent with the second video format, restarting the player after the current video is played, and controlling the restarted player to play the associated video.
4. The video loading method according to claim 1, wherein the obtaining of the associated video corresponding to the current video comprises:
sending a video address request to a server;
receiving address information sent by the server according to the video address request;
acquiring an associated video file corresponding to the address information;
controlling the player to parse the associated video file to play the associated video;
wherein the address information includes a uniform resource locator of the associated video file and a hash value of the current video file.
5. The video loading method according to claim 4, wherein the obtaining of the associated video file corresponding to the address information comprises:
analyzing the address information to obtain a hash value of the associated video file;
determining a plurality of preset hash values corresponding to a plurality of preset video files;
and determining the associated video file according to the hash value of the associated video file and the preset hash values.
6. The video loading method according to claim 5, wherein the determining the associated video file according to the hash value of the associated video file and the preset hash values comprises:
determining a video file corresponding to a target hash value in the plurality of preset video files as the associated video file under the condition that the hash value identical to the hash value of the associated video file exists in the plurality of preset hash values;
under the condition that the hash value which is the same as the hash value of the associated video file does not exist in the preset hash values, sending a video playing request to a server according to the address information so that the server sends the associated video file;
and the target hash value is the hash value of the current video file.
7. A video loading apparatus, comprising:
the first acquisition module is used for acquiring a related video corresponding to a current video under the condition that the player is controlled to play the current video;
the pre-loading module is used for controlling a preset pre-loading process to pre-load the associated video;
and the playing module is used for controlling the player to play the associated video after the current video is played.
8. The video loading apparatus according to claim 7, wherein the playing module further comprises:
the acquisition unit is used for acquiring a first video format of the associated video and a second video format of the current video;
and the playing unit is used for controlling the player to play the associated video according to the first video format and the second video format.
9. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions when executed by the processor implementing the steps of the method of any one of claims 1-6.
10. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the method according to any one of claims 1-6.
CN202011320532.5A 2020-11-23 2020-11-23 Video loading method and device and electronic equipment Pending CN112423099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011320532.5A CN112423099A (en) 2020-11-23 2020-11-23 Video loading method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011320532.5A CN112423099A (en) 2020-11-23 2020-11-23 Video loading method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN112423099A true CN112423099A (en) 2021-02-26

Family

ID=74777350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011320532.5A Pending CN112423099A (en) 2020-11-23 2020-11-23 Video loading method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112423099A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023103889A1 (en) * 2021-12-08 2023-06-15 北京字节跳动网络技术有限公司 Video processing method and apparatus, electronic device, and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140301386A1 (en) * 2007-05-25 2014-10-09 Google Inc. Methods and systems for providing and playing videos having multiple tracks of timed text over a network
CN106550284A (en) * 2015-09-21 2017-03-29 北京国双科技有限公司 A kind of method and device for playing burst video
CN107613404A (en) * 2017-09-07 2018-01-19 北京达佳互联信息技术有限公司 Video broadcasting method, device and terminal
CN107835437A (en) * 2017-10-20 2018-03-23 广东省南方数字电视无线传播有限公司 Dispatching method and device based on more caching servers
CN109413474A (en) * 2018-12-19 2019-03-01 北京奇艺世纪科技有限公司 A kind of Online Video starts broadcasting accelerating method and device
CN110430461A (en) * 2019-08-28 2019-11-08 腾讯科技(深圳)有限公司 A kind of method, apparatus and video playback apparatus controlling video playing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140301386A1 (en) * 2007-05-25 2014-10-09 Google Inc. Methods and systems for providing and playing videos having multiple tracks of timed text over a network
CN106550284A (en) * 2015-09-21 2017-03-29 北京国双科技有限公司 A kind of method and device for playing burst video
CN107613404A (en) * 2017-09-07 2018-01-19 北京达佳互联信息技术有限公司 Video broadcasting method, device and terminal
CN107835437A (en) * 2017-10-20 2018-03-23 广东省南方数字电视无线传播有限公司 Dispatching method and device based on more caching servers
CN109413474A (en) * 2018-12-19 2019-03-01 北京奇艺世纪科技有限公司 A kind of Online Video starts broadcasting accelerating method and device
CN110430461A (en) * 2019-08-28 2019-11-08 腾讯科技(深圳)有限公司 A kind of method, apparatus and video playback apparatus controlling video playing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023103889A1 (en) * 2021-12-08 2023-06-15 北京字节跳动网络技术有限公司 Video processing method and apparatus, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
CN108174248B (en) Video playing method, video playing control device and storage medium
US8943164B2 (en) Apparatus and methods for retrieving/ downloading content on a communication device
CN110333947B (en) Method, device, equipment and medium for loading subcontracting resources of game application
US11025967B2 (en) Method for inserting information push into live video streaming, server, and terminal
CN110830735B (en) Video generation method and device, computer equipment and storage medium
CN106998494B (en) Video recording method and related device
CN110807128B (en) Video preloading method, device, equipment and storage medium
US20170075697A1 (en) Startup accelerating method and appartus
US10929460B2 (en) Method and apparatus for storing resource and electronic device
CN111930973A (en) Multimedia data playing method and device, electronic equipment and storage medium
EP2811399B1 (en) Method and terminal for starting music application
CN107333163A (en) A kind of method for processing video frequency and device, a kind of terminal and storage medium
CN105786839A (en) Application data acquisition method and apparatus
WO2016207735A1 (en) A system and methods thereof for auto-playing video content on mobile devices
CN111510755A (en) Audio and video switching method and device, computer equipment and readable storage medium
CN106470353B (en) Multimedia data processing method and device and electronic equipment
CN113672748A (en) Multimedia information playing method and device
CN112423099A (en) Video loading method and device and electronic equipment
CN104376009A (en) Microblog page enriching method, system and device
CN111050217B (en) Video playing method and device
CN110582024A (en) method and device for playing video
CN111767558A (en) Data access monitoring method, device and system
US10328336B1 (en) Concurrent game functionality and video content
US11442606B2 (en) User interface interaction method and system
CN114827724A (en) Video playing method and related equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210226

RJ01 Rejection of invention patent application after publication