CN114422831A - Media playing method and device, electronic equipment and readable storage medium - Google Patents
Media playing method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN114422831A CN114422831A CN202210066167.2A CN202210066167A CN114422831A CN 114422831 A CN114422831 A CN 114422831A CN 202210066167 A CN202210066167 A CN 202210066167A CN 114422831 A CN114422831 A CN 114422831A
- Authority
- CN
- China
- Prior art keywords
- playing
- information
- media file
- media
- data
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000004891 communication Methods 0.000 claims abstract description 29
- 238000004590 computer program Methods 0.000 claims description 9
- 238000007726 management method Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 230000005540 biological transmission Effects 0.000 description 6
- 230000009471 action Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 239000012634 fragment Substances 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/238—Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
- H04N21/2387—Stream processing in response to a playback request from an end-user, e.g. for trick-play
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/80—Responding to QoS
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing 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/434—Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network 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/65—Transmission of management data between client and server
- H04N21/658—Transmission by the client directed to the server
- H04N21/6587—Control parameters, e.g. trick play commands, viewpoint selection
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8456—Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a media playing method and device, electronic equipment and a readable storage medium. The media playing method is applied to terminal equipment, the terminal equipment is in communication connection with a server, and the media playing method comprises the following steps: sending a media accelerated playing request for playing a target media file to the server; receiving head information returned by the server according to the media accelerated playing request, wherein the head information carries first address information of a first segment of the target media file; and playing the first segment of the target media file. The embodiment of the invention improves the playing speed of the media file.
Description
Technical Field
The present invention relates to the field, and in particular, to a media playing method and apparatus, an electronic device, and a readable storage medium.
Background
However, as the technology develops and needs of users are more and more satisfied, the amount of data to be transmitted is more and more, and this results in a longer time for the media file to start the playing function.
Disclosure of Invention
An embodiment of the present invention provides a media playing method and apparatus, an electronic device, and a readable storage medium, so as to solve the problem that time consumed by starting a playing function of a media file is long.
The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a media playing method, applied to a terminal device, where the terminal device is in communication connection with a server, including the following steps:
under the condition of fast playing, sending a media accelerated playing request for playing a target media file to the server;
receiving head information returned by the server according to the media accelerated playing request, wherein the head information carries first address information of a first segment of a target media file;
and preferentially playing the first segment of the target media file according to the first address information carried in the head information.
In some embodiments, before the playing the first segment of the target media file, the method further comprises:
sending a first data request to the server based on the first address information;
and receiving the head data returned by the server according to the first data request, wherein the head data comprises the media file corresponding to the first segment.
In some embodiments, after receiving the header information returned by the server according to the media accelerated playback request, the method further includes:
receiving main body information sent by the server;
and filling the playing service logic of the target media file according to the main information, wherein the playing service logic comprises one or more items of subtitle information, duration information, resolution information and cache data of subsequent segments, and the subsequent segments are media segments after the first segment of the target media file.
In some embodiments, the populating a play service logic of the target media file according to the body information includes:
sending a second data request to the server according to second address information, wherein the second address information is carried in the main body information;
receiving main data returned by the server according to the second data request;
and filling the playing business logic of the target media file by using the main data.
In some embodiments, the header information carries file information of the target media file and necessary information for playing the target media file, and the body information carries unnecessary information for playing the target media file.
In some embodiments, the header information is comprised of one network layer packet of data, and the header information is less than or equal to 1400 bytes.
In a second aspect of the present invention, there is provided a media playing method applied to a server, where the server is in communication connection with a terminal device, and the method includes:
receiving a media accelerated playing request sent by the terminal equipment;
preferentially sending header information to the terminal equipment according to the media accelerated playing request, wherein the header information carries first address information of a first segment of a target media file;
and preferentially sending header data to the terminal equipment according to a first data request, wherein the first data request is generated by the terminal equipment according to the header information, and the header data comprises a media file corresponding to the first segment.
In some embodiments, after the preferentially sending the header data to the terminal device according to the first data request, the method further includes:
and sending the main body information to the server, wherein the main body information carries the subsequent segments after the first segment of the target media file.
In a third aspect of the present invention, there is provided a media playing apparatus, applied to a terminal device, where the terminal device is in communication connection with a server, including the following steps:
the playing request sending module is used for sending a media accelerated playing request for playing the target media file to the server;
a header information receiving module, configured to receive header information returned by the server according to the media accelerated play request, where the header information carries first address information of a first segment of a target media file;
and the playing module is used for playing the first segment of the target media file.
In some aspects of the implementation of the present invention, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of any one of the media playing methods when executing the program stored in the memory.
In some aspects of the present invention, there is also provided a readable storage medium, on which a computer program is stored, which when executed by a processor implements the media playing method described above.
According to the embodiment of the invention, the first address information of the first segment of the target media file is carried in the head information, and the content of the first segment can be obtained according to the first address information, so that the time for playing the first segment is shortened, and the playing speed of the media file is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
FIG. 1 is a flow chart of a media playing method according to an embodiment of the invention;
FIG. 2 is a flowchart of a media playing method according to an embodiment of the invention;
FIG. 3 is a block diagram of a media player according to an embodiment of the invention;
fig. 4 is a block diagram of an electronic device in an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
The invention provides a media playing method.
In some embodiments, the media playing method is applied to a terminal device, and the terminal device is in communication connection with a server.
In this embodiment, the terminal device may refer to a terminal device such as a smart phone, a tablet computer, or a computer, and the media to be played may specifically refer to a video media file or an audio media file.
As shown in fig. 1, in some embodiments, the media playing method includes the following steps:
step 101: and sending a media accelerated playing request for playing the target media file to the server.
In this embodiment, the media acceleration playing request may be triggered in different manners, for example, a user may request to play the media file by accessing a page corresponding to the media file or accessing a link corresponding to the media file, and when the user requests to play the media file, the terminal device sends the media acceleration playing request to the server.
In the related art, when playing a media file online, a terminal device generally needs to send a play request to a server, and based on the play request, the server sends a corresponding media file to the terminal device.
It is to be understood that if the playing of the media file can be completed in the manner in the related art, the playing of the media file can be performed directly based on the manner.
In this embodiment, when the media file cannot be played in the normal mode, the fast play mode is entered by sending a media accelerated play request.
In implementation, the fast play mode can be determined to enter through different modes, for example, the current network strength can be detected, and if the network strength is low, the fast play mode is entered.
In this embodiment, if the playback can be performed in the normal mode, a normal media playback request is sent to the server, and if the playback cannot be performed in the normal manner under the above conditions, the fast playback mode is started, and a media accelerated playback request is sent to the server.
Step 102: and receiving the head information returned by the server according to the media playing request.
During the file transmission process, header information (header) and data information (body) are usually included, wherein the volume of the header information is smaller than the volume of the data information, it should be understood that the volume of the header information is usually smaller and is usually used for realizing identification functions, such as identity recognition, object recognition, and the like.
For example, the identification may refer to terminal identification, and the object identification may refer to identifying whether the media file is a media file corresponding to the media playing request (or the media accelerated playing request). Whereas the volume of data information used to transfer the media file itself is relatively large.
It is understood that the header information and the data information are transmitted sequentially, i.e., the data information is disposed after the header information.
In this embodiment, the header information carries the first address information of the first segment of the target media file, and it can be understood that, in this embodiment, the first address information of the first segment of the target media file is added to the header information.
It should be understood that if the server receives a normal media playing request, all segments of the target media file are carried in the data information.
If the server receives the media accelerated playing request, the first address information of the first segment of the target media file is carried in the header information.
The target media file refers to a media file to be played, and specifically, refers to a media file requested to be played by the media accelerated play request.
The first segment refers to the first segment of the target media file in chronological order. It should be understood that, during the transmission process, the media file needs to be divided into a plurality of segments and independently transmitted in the form of segments, and the terminal device writes the received segments into the buffer area of the player instance to implement the playing of the media file.
In some embodiments, the method further comprises:
sending a first data request to the server based on the first address information;
and receiving the head data returned by the server according to the first data request, wherein the head data comprises the media file corresponding to the first segment.
And after the first address information of the first segment is obtained, sending a first data request based on the first address information to obtain a media file sent by a server.
Step 103: and preferentially playing the first segment of the target media file according to the first address information carried in the head information.
Since the header information in this embodiment carries the first address information of the first segment, the first address information can be obtained based on the obtained header information, and further, the data corresponding to the first segment is obtained based on the first address information.
It should be understood that the data information may also carry the first address information of the first segment.
In some embodiments, under the condition of fast playing, the data information may also carry all information of the target media file, that is, the data information in the fast playing mode is the same as the data information in the normal playing mode, so that the data information does not need to be adjusted, which is helpful to simplify the processing procedure.
If the header information and the data information are received, in this embodiment, the first segment of the target media file is preferentially played according to the first address information carried in the header information, which is helpful for improving the playing speed.
It should be understood that the volume of the header information is relatively small, the transmission speed of the header information is relatively fast, generally only one RTT (Round-Trip Time) interval is required, while the volume of the data information is relatively large, generally the data information needs to be split into a plurality of network layer data packets to be transmitted step by step, and meanwhile, the data information in certain specific formats can be analyzed after all corresponding network layer data packets are completely transmitted.
Therefore, after the transmission of the header information is completed, the technical scheme of the embodiment of the invention can realize the acquisition of the first segment of the target media file and execute the operation of starting playing based on the header information, can shorten the playing time and reduce the waiting time.
In some embodiments, after step 102, the method further comprises:
receiving main body information sent by the server;
and filling the playing service logic of the target media file according to the main information, wherein the playing service logic comprises one or more items of subtitle information, duration information, resolution information and cache data of subsequent segments, and the subsequent segments are media segments after the first segment of the target media file.
After the broadcast, the main information sent by the server is further acquired, and it can be understood that the content included in the main information is similar to that of the related art, and compared with the related art, the main difference of the technical solution of the present embodiment is that the main information in the present embodiment does not include the first address information of the first segment, but only includes the second address information of the subsequent segment.
In some embodiments, the header information carries file information of the target media file and necessary information for playing the target media file, and the body information carries unnecessary information for playing the target media file. Therefore, the first segment is called based on the head information, the media file can be played quickly, and then the required subtitles, duration information and resolution information can be further perfected based on the main body information, so that the continuous and continuous playing of the subsequent segments of the target media file is realized.
In some embodiments, the header information is composed of a network layer packet, and the header information is less than or equal to 1400 bytes, which can further reduce the transmission time of the header information, thereby improving the playing speed.
In other embodiments, the header information is composed of a plurality of network layer packets, for example, two network layer packets, and the header data may be limited to less than 2800 bytes, and the volume of the header information may be adjusted due to differences in network environments or devices depending on the network environment, for example, may be a different value less than 1000 bytes.
In some embodiments, the populating a play service logic of the target media file according to the body information includes:
sending a second data request to the server according to second address information, wherein the second address information is carried in the main body information;
receiving main data returned by the server according to the second data request;
and filling the playing business logic of the target media file by using the main data.
The technical solution of this embodiment may be understood that the terminal device first obtains the main body information, and then obtains the complete main body data based on the main body information, where the main body data refers to a file required for playing the target media file, and the main body information may be understood as index information for obtaining the main body data.
For example, after the body information is acquired, a callback operation may be triggered by a callback function based on the second address information to acquire complete body data, or the body data may be called by other operations, which is not further limited herein.
The invention also provides a media playing method, which is applied to the server, and the server is in communication connection with the terminal equipment.
As shown in fig. 2, in this embodiment, the server is configured to implement a management function and a content delivery function, which may be implemented by one server or two servers, and illustratively, a content server and a management server may be provided, where the management server is mainly configured to implement the management function, and illustratively, may include playing management of a media file, and the content server is mainly configured to deliver the media file to the terminal device based on management of the management server.
In this embodiment, the server includes two servers, i.e., a content server and a management server.
As shown in fig. 2, in one embodiment, the method comprises the steps of:
and the management server receives a media accelerated playing request sent by the terminal equipment.
Illustratively, a user accesses a certain media file at a terminal device, thereby triggering the playing of the media file, and further, generating a corresponding access request.
And the management server preferentially sends header information to the terminal equipment according to the media accelerated playing request, wherein the header information carries first address information of a first segment of the target media file.
In this embodiment, a small amount of critical necessary data required for the subsequent flow in the filtered return data is used as the broadcast information, for example, a download address of the first segment of media file to be used for broadcast, and is added to the header information. In particular, these critical essential data may be added to specific fields of the header information.
In this embodiment, in order to increase the playing speed and further increase the priority of sending the header information, for example, the priority of the header information is adjusted to be the highest, so that the header data carrying the first address information is sent to the terminal device first, so as to ensure fast playing.
And the content server receives a first data request sent by the terminal equipment, wherein the first data request is generated by the terminal equipment according to the first address information carried in the header information.
In this embodiment, the first data request is a media file request for acquiring complete header data by the terminal device, specifically, the terminal device parses the header information to obtain first address information, and then downloads a corresponding media file based on the first address to acquire the complete header data.
And the content server preferentially sends header data to the terminal equipment according to the first data request, wherein the header data comprises a media file corresponding to the first segment, and the management server sends broadcast data to the terminal equipment.
The header data and the broadcast data include key data necessary for starting playing of the media file, so that the broadcast file acquired by the terminal device includes the header data and the broadcast data, and after receiving the broadcast file, the terminal device triggers a playing process to start playing of the media file.
In this embodiment, the sending priority of the header data is also improved, so that the header data can be guaranteed to be sent to the terminal device at the first time, and fast playing is guaranteed.
In some embodiments, after the preferentially sending the header data to the terminal device according to the first data request, the method further includes:
and sending the main body information to the server, wherein the main body information carries the subsequent segments after the first segment of the target media file.
In this embodiment, after the header data is issued, the main body data may be sent to the terminal device through the content server.
Specifically, when the media file starts to be played, the terminal device continues to receive the body information at the same time, and obtains complete body data according to the body information. Here, after receiving the body information, the terminal device further obtains body data of the playing target media file from the content server based on the body information, where the body data can be understood as other data required for playing the complete target media file.
Based on the received main data, the terminal device further perfects all service logics for playing the target media file, and realizes continuous playing of the media file.
For example, the process may include filling subtitles into a playing screen, filling duration and resolution into a playing box, filling all media data segments into a playing buffer, and the like, and the process may specifically refer to the related art, and is not further limited and described herein.
As shown in fig. 2, in the data transmission process, the data may be directly transmitted between the server and the terminal device, or the data may be transferred and transmitted through the network library.
The embodiment of the invention also provides a media playing device which is applied to the terminal equipment, and the terminal equipment is in communication connection with the server.
As shown in fig. 3, in one embodiment, the media playing apparatus 300 includes:
a playing request sending module 301, configured to send a media accelerated playing request for playing a target media file to the server under a fast playing condition;
a header information receiving module 302, configured to receive header information returned by the server according to the media accelerated playing request, where the header information carries first address information of a first segment of the target media file;
the playing module 303 is configured to preferentially play the first segment of the target media file according to the first address information carried in the header information.
In some embodiments, further comprising:
a first data request sending module, configured to send a first data request to the server based on the first address information;
and the head data receiving module is used for receiving head data returned by the server according to the first data request, wherein the head data comprises a media file corresponding to the first segment.
In some embodiments, further comprising:
the main body information receiving module is used for receiving the main body information sent by the server;
and a service logic filling module, configured to fill a play service logic of the target media file according to the main information, where the play service logic includes one or more items of subtitle information, duration information, resolution information, and cache data of a subsequent segment, and the subsequent segment is a media segment subsequent to a first segment of the target media file.
In some embodiments, the business logic populating module comprises:
the sending submodule is used for sending a second data request to the server according to second address information, wherein the second address information is carried in the main body information;
the receiving submodule is used for receiving main data returned by the server according to the second data request;
and the filling submodule is used for filling the playing business logic of the target media file by using the main data.
In some embodiments, the header information carries file information of the target media file and necessary information for playing the target media file, and the body information carries unnecessary information for playing the target media file.
In some embodiments, the header information is comprised of one network layer packet of data, and the header information is less than or equal to 1400 bytes.
The embodiment of the invention also provides a media playing device which is applied to the server, and the server is in communication connection with the terminal equipment.
In some embodiments, the media playing device comprises:
a media accelerated playing request receiving module, configured to receive a media accelerated playing request sent by the terminal device;
a header information sending module, configured to preferentially send header information to the terminal device according to the media accelerated play request, where the header information carries first address information of a first segment of the target media file;
and a header data sending module, configured to preferentially send header data to the terminal device according to a first data request, where the first data request is generated by the terminal device according to the header information, and the header data includes a media file corresponding to the first segment.
In some embodiments, the media playing device further comprises:
and the main body information sending module is used for sending the main body information to the server, wherein the main body information carries subsequent fragments after the first fragment of the target media file.
The media playing device of this embodiment can implement the steps of the media playing method embodiment and can implement the same or similar technical effects, and details are not repeated here.
An embodiment of the present invention further provides an electronic device, as shown in fig. 4, including a processor 41, a communication interface 42, a memory 43, and a communication bus 44, where the processor 41, the communication interface 42, and the memory 43 complete mutual communication through the communication bus 44,
a memory 43 for storing a computer program;
the processor 51 is configured to implement the steps of the media playing method described above when executing the program stored in the memory.
In yet another aspect of the present invention, there is also provided a readable storage medium, on which a computer program is stored, which when executed by a processor, implements the media playing method as described in any of the above.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a NetworK Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a readable storage medium is further provided, which has instructions stored therein, and when the readable storage medium is run on a computer, the readable storage medium causes the computer to execute the media playing method described in any of the above embodiments.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the media playing method of any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The readable storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more available media integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy DisK, hard DisK, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State DisK (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, 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 identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.
Claims (11)
1. A media playing method is applied to terminal equipment, the terminal equipment is in communication connection with a server, and the media playing method is characterized by comprising the following steps:
under the condition of fast playing, sending a media accelerated playing request for playing a target media file to the server;
receiving head information returned by the server according to the media accelerated playing request, wherein the head information carries first address information of a first segment of the target media file;
and preferentially playing the first segment of the target media file according to the first address information carried in the head information.
2. The method of claim 1, wherein prior to playing the first segment of the target media file, the method further comprises:
sending a first data request to the server based on the first address information;
and receiving the head data returned by the server according to the first data request, wherein the head data comprises the media file corresponding to the first segment.
3. The method according to claim 1, wherein after receiving the header information returned by the server according to the media accelerated playback request, the method further comprises:
receiving main body information sent by the server;
and filling the playing service logic of the target media file according to the main information, wherein the playing service logic comprises one or more items of subtitle information, duration information, resolution information and cache data of subsequent segments, and the subsequent segments are media segments after the first segment of the target media file.
4. The method of claim 3, wherein the populating the play service logic of the target media file according to the body information comprises:
sending a second data request to the server according to second address information, wherein the second address information is carried in the main body information;
receiving main data returned by the server according to the second data request;
and filling the playing business logic of the target media file by using the main data.
5. The method according to claim 3 or 4, wherein the header information carries file information of the target media file and essential information for playing the target media file, and the body information carries non-essential information for playing the target media file.
6. The method of claim 5, wherein the header information comprises a network layer packet, and wherein the header information is less than or equal to 1400 bytes.
7. A media playing method is applied to a server, the server is in communication connection with a terminal device, and the media playing method is characterized by comprising the following steps:
receiving a media accelerated playing request sent by the terminal equipment;
preferentially sending header information to the terminal equipment according to the media accelerated playing request, wherein the header information carries first address information of a first segment of a target media file;
and preferentially sending header data to the terminal equipment according to a first data request, wherein the first data request is generated by the terminal equipment according to the header information, and the header data comprises a media file corresponding to the first segment.
8. The method of claim 7, wherein after the sending of the header data to the terminal device is prioritized according to the first data request, the method further comprises:
and sending the main body information to the server, wherein the main body information carries the subsequent segments after the first segment of the target media file.
9. A media playing device is applied to terminal equipment, the terminal equipment is in communication connection with a server, and the media playing device is characterized by comprising the following steps:
the playing request sending module is used for sending a media accelerated playing request for playing the target media file to the server under the condition of fast playing;
a header information receiving module, configured to receive header information returned by the server according to the media accelerated play request, where the header information carries first address information of a first segment of a target media file;
and the playing module is used for preferentially playing the first segment of the target media file according to the first address information carried in the head information.
10. An electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the media playback method of any one of claims 1 to 6 when executing a program stored in a memory, or
The steps of implementing the media playing method of claim 7 or 8.
11. A readable storage medium on which a computer program is stored, which when executed by a processor implements the media playback method of any one of claims 1 to 6, or
The steps of implementing the media playing method of claim 7 or 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210066167.2A CN114422831B (en) | 2022-01-20 | 2022-01-20 | Media playing method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210066167.2A CN114422831B (en) | 2022-01-20 | 2022-01-20 | Media playing method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114422831A true CN114422831A (en) | 2022-04-29 |
CN114422831B CN114422831B (en) | 2024-03-19 |
Family
ID=81276317
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210066167.2A Active CN114422831B (en) | 2022-01-20 | 2022-01-20 | Media playing method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114422831B (en) |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103475932A (en) * | 2013-09-05 | 2013-12-25 | 深圳Tcl新技术有限公司 | Seamless on-line playing method and device of network video and network television system |
US20140325018A1 (en) * | 2013-04-24 | 2014-10-30 | Huawei Technologies Co., Ltd. | Media file receiving and media file sending methods, apparatuses, and systems |
CN104333801A (en) * | 2014-11-28 | 2015-02-04 | 北京奇艺世纪科技有限公司 | MP4 media file transferring method, MP4 media file playing method, MP4 media file transferring device, MP4 media file playing method and MP4 media file playing system |
CN104506950A (en) * | 2014-12-29 | 2015-04-08 | 珠海全志科技股份有限公司 | Multithread download method and download device in network streaming media play, and download equipment |
US20150281308A1 (en) * | 2012-12-13 | 2015-10-01 | Tencent Technology (Shenzhen) Company Limitead | Method and system for downloading and playing media file, client, server, and storage medium |
CN105872607A (en) * | 2016-03-31 | 2016-08-17 | 乐视控股(北京)有限公司 | Method, server and terminal device for providing multimedia contents |
CN105898380A (en) * | 2015-12-14 | 2016-08-24 | 乐视云计算有限公司 | Rapid network video play starting method and device |
US20170195387A1 (en) * | 2015-12-30 | 2017-07-06 | Le Holdings (Beijing) Co., Ltd. | Method and Electronic Device for Increasing Start Play Speed |
CN109474854A (en) * | 2018-11-29 | 2019-03-15 | 广州市百果园信息技术有限公司 | Video broadcasting method, the generation method of playlist and relevant device |
CN109729386A (en) * | 2019-01-03 | 2019-05-07 | 深圳市网心科技有限公司 | A kind of video file opens broadcasting method, system and electronic equipment and storage medium |
CN110139123A (en) * | 2018-02-02 | 2019-08-16 | 腾讯科技(深圳)有限公司 | The broadcasting of files in stream media, transmission, treating method and apparatus |
CN110545489A (en) * | 2018-05-28 | 2019-12-06 | 中国电信股份有限公司 | self-adaptive streaming media playing method, system and client |
CN110677737A (en) * | 2019-10-08 | 2020-01-10 | 烽火通信科技股份有限公司 | HLS live broadcast quick playing method and system |
CN111031117A (en) * | 2019-12-02 | 2020-04-17 | 深圳市迅雷网络技术有限公司 | Multimedia file downloading method and related device |
CN112714365A (en) * | 2019-10-25 | 2021-04-27 | 上海哔哩哔哩科技有限公司 | Video playing method and system |
-
2022
- 2022-01-20 CN CN202210066167.2A patent/CN114422831B/en active Active
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150281308A1 (en) * | 2012-12-13 | 2015-10-01 | Tencent Technology (Shenzhen) Company Limitead | Method and system for downloading and playing media file, client, server, and storage medium |
US20140325018A1 (en) * | 2013-04-24 | 2014-10-30 | Huawei Technologies Co., Ltd. | Media file receiving and media file sending methods, apparatuses, and systems |
CN103475932A (en) * | 2013-09-05 | 2013-12-25 | 深圳Tcl新技术有限公司 | Seamless on-line playing method and device of network video and network television system |
CN104333801A (en) * | 2014-11-28 | 2015-02-04 | 北京奇艺世纪科技有限公司 | MP4 media file transferring method, MP4 media file playing method, MP4 media file transferring device, MP4 media file playing method and MP4 media file playing system |
CN104506950A (en) * | 2014-12-29 | 2015-04-08 | 珠海全志科技股份有限公司 | Multithread download method and download device in network streaming media play, and download equipment |
CN105898380A (en) * | 2015-12-14 | 2016-08-24 | 乐视云计算有限公司 | Rapid network video play starting method and device |
US20170195387A1 (en) * | 2015-12-30 | 2017-07-06 | Le Holdings (Beijing) Co., Ltd. | Method and Electronic Device for Increasing Start Play Speed |
WO2017166525A1 (en) * | 2016-03-31 | 2017-10-05 | 乐视控股(北京)有限公司 | Method for providing multimedia content, server and terminal device |
CN105872607A (en) * | 2016-03-31 | 2016-08-17 | 乐视控股(北京)有限公司 | Method, server and terminal device for providing multimedia contents |
CN110139123A (en) * | 2018-02-02 | 2019-08-16 | 腾讯科技(深圳)有限公司 | The broadcasting of files in stream media, transmission, treating method and apparatus |
CN110545489A (en) * | 2018-05-28 | 2019-12-06 | 中国电信股份有限公司 | self-adaptive streaming media playing method, system and client |
CN109474854A (en) * | 2018-11-29 | 2019-03-15 | 广州市百果园信息技术有限公司 | Video broadcasting method, the generation method of playlist and relevant device |
CN109729386A (en) * | 2019-01-03 | 2019-05-07 | 深圳市网心科技有限公司 | A kind of video file opens broadcasting method, system and electronic equipment and storage medium |
CN110677737A (en) * | 2019-10-08 | 2020-01-10 | 烽火通信科技股份有限公司 | HLS live broadcast quick playing method and system |
CN112714365A (en) * | 2019-10-25 | 2021-04-27 | 上海哔哩哔哩科技有限公司 | Video playing method and system |
CN111031117A (en) * | 2019-12-02 | 2020-04-17 | 深圳市迅雷网络技术有限公司 | Multimedia file downloading method and related device |
Also Published As
Publication number | Publication date |
---|---|
CN114422831B (en) | 2024-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021180025A1 (en) | Message processing method and apparatus, electronic device and medium | |
CN107832100B (en) | APK plug-in loading method and terminal thereof | |
CN113055451B (en) | Resource downloading method and device, electronic equipment and storage medium | |
CN109542361B (en) | Distributed storage system file reading method, system and related device | |
CN110247985B (en) | Resource downloading method and device, electronic equipment and medium | |
CN112087644B (en) | Pull stream request processing method, device and system, electronic equipment and storage medium | |
CN103945259B (en) | A kind of Online Video player method and device | |
CN111107438B (en) | Video loading method and device and electronic equipment | |
CN110460584B (en) | Access request processing method and device, electronic equipment and computer readable medium | |
EP3902266A1 (en) | Processing method for dragging video data and proxy server | |
CN112433920A (en) | Buried point data reporting method, device, equipment and medium | |
CN110401858B (en) | Video playing method and device, electronic equipment and storage medium | |
CN111372115A (en) | Application program access method and device and communication system | |
WO2024187989A1 (en) | Video storage method and apparatus, and video playback method, apparatus, and system | |
CN112584200A (en) | Screen projection method and system, electronic equipment and storage medium | |
CN111309485A (en) | Service calling method and device, electronic equipment and computer readable storage medium | |
CN111506747B (en) | File analysis method, device, electronic equipment and storage medium | |
CN114422831A (en) | Media playing method and device, electronic equipment and readable storage medium | |
CN113473247B (en) | Video playing request processing method, device and system and electronic equipment | |
CN113923481A (en) | Multimedia content playing method and device, electronic equipment and storage medium | |
CN111356006B (en) | Video playing method, device, server and storage medium | |
CN112149019A (en) | Method, apparatus, electronic device, and computer-readable medium for displaying information | |
CN115022694B (en) | Screen time statistics method, device, system, background server and medium | |
CN109347933B (en) | Method and device for establishing connection | |
CN113949921B (en) | Control method and control device for short video cache cleaning |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |