CN113840173B - Webpage video playing method, device, equipment, storage medium and program product - Google Patents

Webpage video playing method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN113840173B
CN113840173B CN202111097025.4A CN202111097025A CN113840173B CN 113840173 B CN113840173 B CN 113840173B CN 202111097025 A CN202111097025 A CN 202111097025A CN 113840173 B CN113840173 B CN 113840173B
Authority
CN
China
Prior art keywords
webpage
target video
coding standard
player
video
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111097025.4A
Other languages
Chinese (zh)
Other versions
CN113840173A (en
Inventor
常炎隆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111097025.4A priority Critical patent/CN113840173B/en
Publication of CN113840173A publication Critical patent/CN113840173A/en
Application granted granted Critical
Publication of CN113840173B publication Critical patent/CN113840173B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8166Monomedia components thereof involving executable data, e.g. software
    • H04N21/8173End-user applications, e.g. Web browser, game

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure provides a webpage video playing method, a webpage video playing device, electronic equipment, a computer readable storage medium and a computer program product, and relates to the technical field of media clouds. The method comprises the following steps: determining a target video to be played according to a playing request transmitted by a web browser; the method comprises the steps of controlling a webpage assembly component to determine an actual coding standard adopted by a target video; responding to the fact that the webpage player does not support the actual coding standard, and controlling the target video of the webpage assembly component to be converted into the coding standard supported by the webpage player to obtain a converted target video; and the control webpage assembly component sends the converted target video to a webpage player for playing. According to the method, the actual coding standard of the target video is determined efficiently by the webpage assembly component which directly interacts with the bottom hardware, and the actual coding standard is converted into the supported coding standard when the webpage player does not support the actual coding standard, so that the webpage player can normally play the converted target video, and the conversion time is shortened.

Description

Webpage video playing method, device, equipment, storage medium and program product
Technical Field
The disclosure relates to the technical field of data processing, in particular to the technical field of media cloud, and especially relates to a webpage video playing method, a device, electronic equipment, a computer readable storage medium and a computer program product.
Background
The player adopts a correct video parsing mode, which is an important premise that video content can be correctly presented to users. The video parsing mainly comprises: the video file can be correctly played only if the two video files are completely analyzed according to the encapsulation mode and the adopted coding standard.
With the gradual increase of the internet speed, the common users are more and more used to watch videos online through a browser, the resolution capability provided by the webpage processing frame is generally far weaker than that of professional video resolution application installed on a client operating system, but video files obtained by encoding according to a novel encoding standard are gradually popularized, and the webpage processing frame generally cannot provide better resolution and processing efficiency for the video files.
Disclosure of Invention
The embodiment of the disclosure provides a webpage video playing method, a webpage video playing device, electronic equipment, a computer readable storage medium and a computer program product.
In a first aspect, an embodiment of the present disclosure provides a method for playing a web video, including: determining a target video to be played according to a playing request transmitted by a web browser; the method comprises the steps of controlling a webpage assembly component to determine an actual coding standard adopted by a target video; responding to the fact that the webpage player does not support the actual coding standard, and controlling the target video of the webpage assembly component to be converted into the coding standard supported by the webpage player to obtain a converted target video; and the control webpage assembly component sends the converted target video to a webpage player for playing.
In a second aspect, an embodiment of the present disclosure provides a web video playing device, including: the target video determining unit is configured to determine target videos to be played according to a playing request transmitted by the web browser; an actual coding standard determining unit configured to control the web page assembly component to determine an actual coding standard adopted by the target video; the coding standard conversion unit is configured to control the conversion of the target video of the webpage assembly component into the coding standard supported by the webpage player to obtain a converted target video in response to the fact that the webpage player does not support the actual coding standard; the converted target video playing unit is configured to control the webpage assembling component to send the converted target video to the webpage player for playing.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to implement a web video playback method as described in any one of the implementations of the first aspect when executed.
In a fourth aspect, embodiments of the present disclosure provide a non-transitory computer-readable storage medium storing computer instructions for enabling a computer to implement a web video playback method as described in any one of the implementations of the first aspect when executed.
In a fifth aspect, embodiments of the present disclosure provide a computer program product comprising a computer program which, when executed by a processor, is capable of implementing a web video playback method as described in any one of the implementations of the first aspect.
The webpage video playing method provided by the embodiment of the disclosure comprises the following steps: determining a target video to be played according to a playing request transmitted by a web browser; the method comprises the steps of controlling a webpage assembly component to determine an actual coding standard adopted by a target video; responding to the fact that the webpage player does not support the actual coding standard, and controlling the target video of the webpage assembly component to be converted into the coding standard supported by the webpage player to obtain a converted target video; and the control webpage assembly component sends the converted target video to a webpage player for playing.
Aiming at the playing request of the target video transmitted through the web browser, the method and the device can efficiently determine the actual coding standard adopted by the target video by means of the capability of the web assembly component to directly interact with the bottom hardware, and convert the target video according to the supported coding standard when the web player does not support the actual coding standard, so that the web player can normally play the converted target video, and the playing capability of the web player is expanded. And because the operation amount of the code standard conversion is very huge, the execution time is shortened by means of the webpage assembly component, and the online video watching experience of a user through a browser webpage is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture in which the present disclosure may be applied;
fig. 2 is a flowchart of a web video playing method according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of a method for determining the actual encoding standard employed by a target video according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of a method for determining an actual encoding standard used for a target video according to file extension and file header information according to an embodiment of the present disclosure;
Fig. 5 is a block diagram of a web video playing device according to an embodiment of the present disclosure;
Fig. 6 is a schematic structural diagram of an electronic device adapted to perform a web video playing method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness. It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
FIG. 1 illustrates an exemplary system architecture 100 to which embodiments of the web video playback method, apparatus, electronic device, and computer-readable storage medium of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include a display 101 and a host 102, and a medium providing a communication link between the display 101 and the host 102, may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The display 101 is presented as a window of the output content of the host 102 as a user in front of the display 101, and the user can issue other operation instructions to the host 102 according to the content of the display 101, so as to control the host 102 to call the functional hardware formed by the host to complete corresponding operations, such as acquisition, decoding, rendering, and the like, of the video file. Various applications for implementing the above functions, such as a browser-like application, a video-on-demand-like application, and the like, may be installed on the host 102.
The host 102 may provide various services through various built-in applications, for example, a browser-like application that may provide efficient parsing and transcoding services for video on-line on demand through a browser web page, where the host 102 may implement the following effects when running the browser-like application: firstly, receiving a play request for a target video displayed in a web browser, which is sent by a user through an input device connected to a host 102; then, controlling a webpage assembly component to determine an actual coding standard adopted by the target video; then, when the web page player is found not to support the actual coding standard, controlling the target video of the web page assembly component to be converted into the coding standard supported by the web page player, and obtaining a converted target video; and finally, controlling the webpage assembly component to send the converted target video to a webpage player for playing.
The method for playing web page video provided in the following embodiments of the present disclosure is generally performed by the host 102 at the playing end, and accordingly, the web page video playing device is also generally disposed in the host 102.
It should be understood that the number of display screens, hosts in fig. 1 is merely illustrative. There may be any number of displays, hosts, as desired for the implementation.
Referring to fig. 2, fig. 2 is a flowchart of a web video playing method according to an embodiment of the disclosure, where the flowchart 200 includes the following steps:
step 201: determining a target video to be played according to a playing request transmitted by a web browser;
This step is intended for a play request of a target video, which is entered through a web browser by an execution subject of the web video play method (e.g., the host side 102 shown in fig. 1). I.e. the play request is generated by the user selecting for a video on demand page (web site) presented by a web browser, for example presented by the display 101 shown in fig. 1, pointing to the selected target video.
Specifically, the selection information pointing to the target video may take various forms, such as the number, code, location information, etc. of the target video in the current web page, and may also be a unique identity number of the whole network of the video on demand website.
Step 202: the method comprises the steps of controlling a webpage assembly component to determine an actual coding standard adopted by a target video;
On the basis of the determination of the target video in step 201, this step aims to determine the coding standard actually adopted by the target video (hereinafter collectively referred to as the actual coding standard throughout the text) by the above-described execution body control web page assembly component.
The English of the webpage assembly component is called WebAssembly, and the English is abbreviated as: WASM refers to Assembly running on a Web platform, and Assembly refers to Assembly code-instruction code that directly operates the CPU. The assembly code is equivalent to a language that machine code executed by the CPU can be converted into that which is suitable for human reading. A typical compiled execution link is a compiled language such as Cpp, rust, etc. compiled into assembly instructions, which are then converted into binary machine code for reading by the CPU, and other languages such as Java, python, etc. are virtual machines that use a generic set of hardware instructions running in the x86 class, and then execute their own "assembly language" (e.g., java Bytecode). The Web platform is a Java, python-like virtual machine environment on a browser that provides the virtual machine environment to execute some JavaScript (abbreviated JS) or other scripting language. WebAssembly can be regarded as the x86 hardware general instruction set of the Web platform, and is used as a layer of intermediate language, and the upper layer is docked Java, python, rust, cpp, so that the languages can be compiled into a uniform format for the Web platform to operate.
That is, in the conventional manner, the instructions received by the web browser are understood by other scripting languages such as JS, and the tasks for determining the actual coding standard are issued to the WASM component through the upper API written based on the JS language, which involves intermediate operations of language conversion, command conversion, data content conversion, storage location conversion, and the like between the upper scripting language and the lower assembly language, and thus is inefficient. The present disclosure uses the data transmission path established with the WASM component in advance to issue the task to the WASM component through the data transmission path, so as to replace part of JavaScript code by WASM in use, thereby executing the operation of the CPU more efficiently.
Most of common video resources which can be played on browser webpages are obtained by encoding by adopting an H.264 encoding standard, most of browsers or webpage players can support more video files obtained by encoding according to the H.264 encoding standard, but along with the advantage that the H.265 encoding standard can save half of bandwidth compared with the H.264 encoding standard, most of video files begin to gradually replace the H.265 encoding standard, but the browser or webpage player usually has poor support for the encoding standard.
Step 203: responding to the fact that the webpage player does not support the actual coding standard, and controlling the target video of the webpage assembly component to be converted into the coding standard supported by the webpage player to obtain a converted target video;
based on step 202, this step aims to control the web page assembly component target video to be converted into the coding standard supported by the web page player by the execution body when the execution body determines that the web page player does not support the actual coding standard, so as to obtain the converted target video.
For example, when the target video adopts the h.265 coding standard and the web page player is found to not support the h.265 coding standard, the target video can be converted into the h.264 coding standard supported by the web page player by the control web page assembly component, so as to obtain the converted target video obtained by coding according to the h.264 coding standard.
In particular, the various coding standards supported by the web player (e.g., H.264, MPEG, AVC, etc.) may be summarized and recorded as a list or collection to facilitate a determination of whether the actual coding standard belongs to a supported one.
Step 204: and the control webpage assembly component sends the converted target video to a webpage player for playing.
Based on step 203, this step aims to control the web page assembly component to send the converted target video to the web page player for playing by the execution subject, so that the user can see the video content of the converted target video through the web page player.
Aiming at the playing request of the target video transmitted through the web browser, the web video playing method provided by the embodiment of the invention can efficiently determine the actual coding standard adopted by the target video by means of the capability of the web page assembly component to directly interact with the bottom hardware, and convert the target video according to the supported coding standard when the web page player does not support the actual coding standard, so that the web page player can normally play the converted target video, and the playing capability of the web page player is expanded. And because the operation amount of the code standard conversion is very huge, the execution time is shortened by means of the webpage assembly component, and the online video watching experience of a user through a browser webpage is improved.
Referring to fig. 3, fig. 3 is a flowchart of a method for determining an actual encoding standard adopted by a target video according to an embodiment of the present disclosure to enhance understanding of the internal structure of a web page assembly component and how the process is implemented, wherein the flowchart 300 includes the following steps:
step 301: the method comprises the steps of controlling a decapsulation sub-component in a webpage assembly component to decapsulate a target video to obtain data to be decoded;
The step aims at decapsulating the target video by the decapsulation sub-component in the execution body control webpage assembly component to obtain data to be decoded.
Specifically, the decapsulation is to remove a "shell" encapsulated by the video file, for example, converting the format of the video file into the format of FLV, MP4, etc. is equivalent to encapsulating the rendered video data once, where the purpose of the encapsulation is to allow the player to quickly select the correct play kernel to decode and render.
Considering that the target video may be correctly packaged or may be incorrectly packaged, the unpacking subassembly can only take the file extension name of the target video as a reference (because the file extension name can be easily modified) when the unpacking is specifically performed, and is assisted by other parameters (such as recording some information related to the packaging mode in the file header) to complete the correct unpacking together, so that once the unpacking is performed according to the incorrect unpacking mode, the unpacked data is meaningless and cannot be used for presenting corresponding video pictures.
Step 302: and the decoding sub-assembly in the control webpage assembly decodes the data to be decoded, and determines an encoding mode corresponding to the decoding mode used when the decoding is successful as an actual encoding standard.
On the basis of step 301, this step aims to control, by the above-mentioned execution body, the decoding subcomponent in the web page assembly component to decode the data to be decoded, and determine the coding mode corresponding to the decoding mode used when the decoding is successful as the actual coding standard.
Specifically, when the decoding subcomponent can be based on some parameters for determining the coding mode, the coding mode can be determined directly according to the parameters, if the parameters cannot be obtained or the obtained parameters are proved to be unreliable, the actual coding standard can be determined in an attempt mode, and the sign of successful decoding is that the decoded data is not messy code and nonsensical data.
Multiple try threads may be established to expedite the determination efficiency even in support of using multi-threading techniques.
On the basis of the embodiment shown in fig. 3, the present disclosure further specifically provides a method for determining an actual encoding standard adopted by a target video according to a file extension name and file header information through fig. 4, and a flow 400 shown in fig. 4 includes the following steps:
Step 401: controlling a decapsulation sub-component to acquire file extension names and file header information of the target video;
the present step aims at the above-mentioned execution subject control decapsulation sub-component to obtain the file extension name and file header information of the target video, where the file extension name may correspond to the coding standard adopted by the file extension name in some form, and adopting different coding standards will generally record corresponding feature fields in the file header, so that the embodiments of the present disclosure are determined by these two parameters at the same time. The header information has a higher degree of confidence than the file extension that is easier to modify.
Step 402: judging whether the file extension name and the file header information are matched, if so, executing step 403, otherwise, executing step 404;
the file expansion name and the file header information are matched, namely the file expansion name and the file header information are commonly pointed to the same coding standard, and otherwise, the file expansion name and the file header information are not matched.
Step 403: controlling the decapsulation sub-assembly to decapsulate according to the encapsulation mode indicated by the file extension name;
The step is based on the result of the judgment in step 402 that the file extension name and the file header information are matched, and aims to control the decapsulation sub-component to decapsulate according to the encapsulation mode indicated by the file extension name by the execution main body. In practice, since the file extension name and the file header information both point to the same coding standard, the unpacking is performed according to the packing mode indicated by the file extension name or the file header information, which is the same.
Step 404: controlling the decapsulation sub-assembly to decapsulate according to the encapsulation mode indicated by the file header information;
The step is based on the result of the judgment in step 402 that the file extension name and the file header information are not matched, and aims to perform decapsulation by the execution body control decapsulation sub-component according to the encapsulation mode indicated by the file header information, which is a decision made in consideration of the fact that the file extension name can be easily modified and the possibility of modifying the file header information is low.
Step 405: and in response to failure after the decapsulation is carried out according to the encapsulation mode indicated by the file header information, controlling the decapsulation sub-component to randomly try other unexperienced decapsulation modes until the decapsulation is successful.
Based on step 404, this step aims at solving the problem that the unpacking is failed after the unpacking is performed according to the packing mode indicated by the file header information, that is, the information indicating the packing mode is also inaccurate in the record in the file header, so that the "most stupid" unpacking can be performed only by using the mode of trying, that is, the unpacking subassembly is controlled to randomly try other unpacking modes which are not tested until the unpacking is successful. Also, in the case of supporting the multi-threading technology, the determination efficiency can be accelerated in a manner of running a plurality of try threads for attempting different decapsulation manners in parallel.
It should be noted that, step 405 in this embodiment provides a feasible solution only for the case that the unpacking is failed in the packing manner indicated by the header information, which does not mean that there is only such a solution, and according to the actual situation, it may also attempt to find other parameters that also point to the packing manner, or feed back the unpacked message to the uploader of the target video, in order to receive the coding standard adopted by the uploader to generate the target file, and so on. Thus, step 405 may not be included in other embodiments.
On the basis of any embodiment, aiming at the branch of the web page player supporting the actual coding standard, the web page assembly component can be controlled to send the target video to the web page player for playing so as to complete the normal playing of the target video by the capability of the web page player. Meanwhile, in order to avoid that the webpage player can complete normal unpacking, decoding and rendering of the target video after determining the webpage player, the webpage player can also attach the determined actual coding standard and unpacking mode supported by the webpage player when the webpage assembly component sends the target video to the webpage player, so that the webpage player can accelerate the subsequent processing speed under the condition of knowing the information.
For deepening understanding, the disclosure further provides a specific implementation scheme in combination with a specific application scenario:
1) A user selects a video file presented on a video-on-demand website through a browser, so that a playing request of the video file to be played is generated to a webpage side JS processing frame;
2) The JS processing framework issues the task of analyzing the video file to WASM components;
3) The decapsulator under WASM module firstly decapsulates according to the suffix-AVI of the video file, but finds that the data to be decoded obtained after the decapsulation is wrong, so that the relevant field information pointing to the FLV encapsulation mode is found after the file header information is accessed, and finally the decapsulation is successfully completed according to the AVI mode to obtain the data to be decoded;
4) The decapsulator sends the data to be decoded to a decoder under WASM components;
5) The decoder judges that the data to be decoded adopts the coding standard of H.265, but the current webpage player does not support the coding standard, so the decoder sends the data to be decoded to a transcoder under a WASM component;
6) The transcoder transcodes the data to be decoded encoded according to the encoding standard of H.265 into transcoded data encoded according to the supported H.264 encoding standard;
7) The transcoder then sends the transcoded data and the standard of H.264 adopted after transcoding to a decoder;
8) The decoder decodes the transcoded data according to the received H.264 standard information to obtain data to be rendered;
9) And the decoder sends the data to be rendered to a renderer under the WASM component to complete rendering, and finally the renderer outputs the video file after rendering to an interface prepared by the webpage player.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of a web video playing apparatus, where an embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the web video playing apparatus 500 of the present embodiment may include: a target video determination unit 501, an actual coding standard determination unit 502, a coding standard conversion unit 503, and a converted target video playback unit 504. Wherein, the target video determining unit 501 is configured to determine a target video to be played according to a playing request transmitted through a web browser; an actual encoding standard determining unit 502 configured to control the web page assembly component to determine an actual encoding standard adopted by the target video; the coding standard conversion unit 503 is configured to control the conversion of the target video of the webpage assembly component into the coding standard supported by the webpage player to obtain a converted target video in response to the webpage player not supporting the actual coding standard; the converted target video playing unit 504 is configured to control the web page assembly component to send the converted target video to the web page player for playing.
In this embodiment, in the web video playing device 500: the specific processing and the technical effects of the target video determining unit 501, the actual encoding standard determining unit 502, the encoding standard converting unit 503, and the converted target video playing unit 504 may refer to the relevant descriptions of steps 201 to 204 in the corresponding embodiment of fig. 2, and are not repeated here.
In some alternative implementations of the present embodiment, the actual coding standard determining unit 502 may include:
The unpacking subunit is configured to control the unpacking subassembly in the webpage assembly component to unpack the target video to obtain data to be decoded;
and the decoding subunit is configured to control a decoding sub-component in the webpage assembly component to decode the data to be decoded, and determine an encoding mode corresponding to the decoding mode used when the decoding is successful as an actual encoding standard.
In some alternative implementations of the present embodiment, the decoding subunit may include:
the extension name and file header information acquisition module is configured to control the decapsulation sub-component to acquire the file extension name and file header information of the target video;
the unpacking module is configured to respond to the fact that the file header information is matched with the file extension name, and control the unpacking sub-assembly to unpack according to the packing mode indicated by the file extension name;
And the per-header decapsulation module is configured to control the decapsulation sub-assembly to decapsulate according to the encapsulation mode indicated by the header information in response to the header information not being matched with the file extension name.
In some optional implementations of this embodiment, the decoding subunit may further include:
And the random try module is configured to respond to failure after the decapsulation is carried out according to the encapsulation mode indicated by the file header information, and control the decapsulation sub-component to randomly try other untrimmed decapsulation modes until the decapsulation is successful.
In some optional implementations of the present embodiment, the coding standard conversion unit 503 may be further configured to:
And in response to the web page player not supporting the H.265 coding standard, controlling the web page assembly component to convert the coding standard of the target video conversion into the H.264 coding standard supported by the web page player, and obtaining the converted target video obtained by coding according to the H.264 coding standard.
In some optional implementations of this embodiment, the web video playing apparatus 500 may further include:
and the target video direct playing unit is configured to control the webpage assembling component to send the target video to the webpage player for playing in response to the webpage player supporting the actual coding standard.
This embodiment exists as an embodiment of the apparatus corresponding to the above-described method embodiment.
Aiming at the playing request of the target video transmitted through the web browser, the web video playing device provided by the embodiment of the disclosure determines the actual coding standard adopted by the target video with high efficiency by means of the capability of the web assembly component to interact with the bottom hardware directly, and converts the target video according to the supported coding standard when the web player does not support the actual coding standard, so that the web player can play the converted target video normally, and the playing capability of the web player is expanded. And because the operation amount of the code standard conversion is very huge, the execution time is shortened by means of the webpage assembly component, and the online video watching experience of a user through a browser webpage is improved.
According to an embodiment of the present disclosure, the present disclosure further provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, such that the at least one processor, when executed, implements the method for playing web video described in any of the embodiments above.
According to an embodiment of the present disclosure, there is also provided a readable storage medium storing computer instructions for enabling a computer to implement the web video playing method described in any of the above embodiments when executed.
The disclosed embodiments provide a computer program product which, when executed by a processor, enables the web video playing method described in any of the above embodiments.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM602, and RAM603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the respective methods and processes described above, such as a web video playback method. For example, in some embodiments, the web video playback method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the web video playback method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the web video playback method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and Virtual Private Server (VPS) PRIVATE SERVER service.
Aiming at the playing request of the target video transmitted through the web browser, the method and the device can efficiently determine the actual coding standard adopted by the target video by means of the capability of the web assembly component to directly interact with the bottom hardware, and convert the target video according to the supported coding standard when the web player does not support the actual coding standard, so that the web player can normally play the converted target video, and the playing capability of the web player is expanded. And because the operation amount of the code standard conversion is very huge, the execution time is shortened by means of the webpage assembly component, and the online video watching experience of a user through a browser webpage is improved.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (6)

1. A webpage video playing method comprises the following steps:
Determining a target video to be played according to a playing request transmitted by a web browser;
Controlling a decapsulation sub-component in a webpage assembly component to acquire file extension names and file header information of the target video; responding to the file header information matched with the file extension name, and controlling the decapsulation sub-assembly to decapsulate according to the encapsulation mode indicated by the file extension name to obtain data to be decoded; controlling the decapsulation sub-assembly to decapsulate according to the encapsulation mode indicated by the file header information to obtain the data to be decoded in response to the file header information not being matched with the file extension name; in response to failure after the unpacking according to the packing mode indicated by the file header information, controlling the unpacking subassembly to randomly try other untrimmed unpacking modes in a mode of concurrence of a plurality of try threads based on a multithreading technology until the unpacking is successful to obtain the data to be decoded; the decoding sub-assembly in the webpage assembly is controlled to decode the data to be decoded, and an encoding mode corresponding to a decoding mode used when the decoding is successful is determined to be an actual encoding standard;
Responding to the fact that the web page player does not support the actual coding standard, and controlling the web page assembly component to convert the target video into the coding standard supported by the web page player to obtain a converted target video;
controlling the webpage assembly component to send the converted target video to the webpage player for playing;
Responding to the web page player supporting the actual coding standard, and controlling the web page assembly component to send the target video to the web page player for playing; when the converted target video and the target video are sent to the webpage player, an actual coding standard and a decapsulation mode of the corresponding video supported by the webpage player are attached together, so that the webpage player directly plays according to the actual coding standard and the decapsulation mode.
2. The method of claim 1, wherein the controlling the web page assembly component to convert the target video to the coding standard supported by the web page player in response to the web page player not supporting the actual coding standard, comprises:
and in response to the web page player not supporting the H.265 coding standard, controlling the web page assembly component to convert the coding standard of the target video conversion into the H.264 coding standard supported by the web page player, and obtaining the converted target video obtained by coding according to the H.264 coding standard.
3. A web video playback apparatus comprising:
The target video determining unit is configured to determine target videos to be played according to a playing request transmitted by the web browser;
the actual coding standard determining unit is configured to control a decapsulation sub-component in the webpage assembly component to acquire file expansion names and file header information of the target video; responding to the file header information matched with the file extension name, and controlling the decapsulation sub-assembly to decapsulate according to the encapsulation mode indicated by the file extension name to obtain data to be decoded; controlling the decapsulation sub-assembly to decapsulate according to the encapsulation mode indicated by the file header information to obtain the data to be decoded in response to the file header information not being matched with the file extension name; in response to failure after the unpacking according to the packing mode indicated by the file header information, controlling the unpacking subassembly to randomly try other untrimmed unpacking modes in a mode of concurrence of a plurality of try threads based on a multithreading technology until the unpacking is successful to obtain the data to be decoded; the decoding sub-assembly in the webpage assembly is controlled to decode the data to be decoded, and an encoding mode corresponding to a decoding mode used when the decoding is successful is determined to be an actual encoding standard;
the encoding standard conversion unit is configured to control the webpage assembly component to convert the target video into the encoding standard supported by the webpage player to obtain a converted target video in response to the fact that the webpage player does not support the actual encoding standard;
The converted target video playing unit is configured to control the webpage assembling component to send the converted target video to the webpage player for playing;
The target video direct playing unit is configured to control the webpage assembly component to send the target video to the webpage player for playing in response to the webpage player supporting the actual coding standard; when the converted target video and the target video are sent to the webpage player, an actual coding standard and a decapsulation mode of the corresponding video supported by the webpage player are attached together, so that the webpage player directly plays according to the actual coding standard and the decapsulation mode.
4. The apparatus of claim 3, wherein the coding standard conversion unit is further configured to:
and in response to the web page player not supporting the H.265 coding standard, controlling the web page assembly component to convert the coding standard of the target video conversion into the H.264 coding standard supported by the web page player, and obtaining the converted target video obtained by coding according to the H.264 coding standard.
5. An electronic device, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the web video playback method of any one of claims 1-2.
6. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the web video playback method of any one of claims 1-2.
CN202111097025.4A 2021-09-18 2021-09-18 Webpage video playing method, device, equipment, storage medium and program product Active CN113840173B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111097025.4A CN113840173B (en) 2021-09-18 2021-09-18 Webpage video playing method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111097025.4A CN113840173B (en) 2021-09-18 2021-09-18 Webpage video playing method, device, equipment, storage medium and program product

Publications (2)

Publication Number Publication Date
CN113840173A CN113840173A (en) 2021-12-24
CN113840173B true CN113840173B (en) 2024-05-07

Family

ID=78959815

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111097025.4A Active CN113840173B (en) 2021-09-18 2021-09-18 Webpage video playing method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN113840173B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103037211A (en) * 2011-09-29 2013-04-10 展讯通信(上海)有限公司 Decoding processing method, device and playing equipment of streaming media files
CN110557670A (en) * 2019-09-17 2019-12-10 广州华多网络科技有限公司 Method, device, terminal and storage medium for playing video in webpage
CN111083167A (en) * 2019-12-31 2020-04-28 深圳市思博慧数据科技有限公司 Cross-browser H.265 video playing method
CN111629214A (en) * 2020-06-05 2020-09-04 北京百度网讯科技有限公司 Transcoding method, device, equipment and medium of video file
CN112312221A (en) * 2019-07-31 2021-02-02 广州弘度信息科技有限公司 Audio and video playing method, storage medium and device
CN112822518A (en) * 2021-04-19 2021-05-18 浙江华创视讯科技有限公司 Video playing method, device, system, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9596447B2 (en) * 2010-07-21 2017-03-14 Qualcomm Incorporated Providing frame packing type information for video coding
US8533754B2 (en) * 2011-06-03 2013-09-10 Limelight Networks, Inc. Embedded video player with modular ad processing
US11665219B2 (en) * 2017-07-10 2023-05-30 Qualcomm Incorporated Processing media data using a generic descriptor for file format boxes

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103037211A (en) * 2011-09-29 2013-04-10 展讯通信(上海)有限公司 Decoding processing method, device and playing equipment of streaming media files
CN112312221A (en) * 2019-07-31 2021-02-02 广州弘度信息科技有限公司 Audio and video playing method, storage medium and device
CN110557670A (en) * 2019-09-17 2019-12-10 广州华多网络科技有限公司 Method, device, terminal and storage medium for playing video in webpage
CN111083167A (en) * 2019-12-31 2020-04-28 深圳市思博慧数据科技有限公司 Cross-browser H.265 video playing method
CN111629214A (en) * 2020-06-05 2020-09-04 北京百度网讯科技有限公司 Transcoding method, device, equipment and medium of video file
CN112822518A (en) * 2021-04-19 2021-05-18 浙江华创视讯科技有限公司 Video playing method, device, system, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Study of abnormal appearances on the failed die by FIB milling technology;Liyuan Liu;《Proceedings of the 20th IEEE International Symposium on the Physical and Failure Analysis of Integrated Circuits (IPFA)》;20130916;全文 *
在线视频平台在广电及互联网行业的应用研究;李扬;《中国优秀硕士学位论文全文数据库》;20150315;全文 *
基于RTP协议的双向语音通信;张静, 裴未迟, 许刚;计算机工程;20030820(16);全文 *

Also Published As

Publication number Publication date
CN113840173A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
US9930308B2 (en) Platform-agnostic video player for mobile computing devices and desktop computers
US9542501B2 (en) System and method for presenting content in a client/server environment
US11482257B2 (en) Image display method and apparatus
EP3261351A1 (en) Multimedia redirection method, device and system
US9712589B2 (en) System and method for playing a video on mobile web environments
CN108337246B (en) Media playback apparatus and media service apparatus preventing playback delay
US9998513B2 (en) Selecting bitrate to stream encoded media based on tagging of important media segments
US11245885B2 (en) Method and system for playing media data
CN106470353B (en) Multimedia data processing method and device and electronic equipment
CN113411661B (en) Method, apparatus, device, storage medium and program product for recording information
CN112689197A (en) File format conversion method and device and computer storage medium
US8868785B1 (en) Method and apparatus for displaying multimedia content
CN114302176A (en) Video playing method and device
KR102232899B1 (en) System for cloud streaming service, method of cloud streaming service based on type of image and apparatus for the same
CN113840173B (en) Webpage video playing method, device, equipment, storage medium and program product
US10015232B2 (en) Systems and methods for transmitting images
CN113825016B (en) Video rendering method, apparatus, device, storage medium, and computer program product
CN115633191A (en) Video playing method, device, system, electronic equipment and readable storage medium
EP3229478B1 (en) Cloud streaming service system, image cloud streaming service method using application code, and device therefor
WO2021227532A1 (en) Browser-based frame extraction method and system
CN114339415A (en) Client video playing method and device, electronic equipment and readable medium
CN114501084A (en) Play starting method, device, equipment and medium of player
CN111866508A (en) Video processing method, device, medium and electronic equipment
KR102273143B1 (en) System for cloud streaming service, method of cloud streaming service based on still image and apparatus for the same
US12052447B1 (en) Dynamically moving transcoding of content between servers

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