Web page video recording method, device, electronic device, storage medium

By identifying the video tags of web videos, playing and combining audio data at a speed, the problem of low recording efficiency of traditional web videos is solved, and fast and efficient video recording is achieved.

CN116347116BActive Publication Date: 2025-07-04BEIJING CENTURY TAL EDUCATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310214040.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-01
Publication Date
2025-07-04
Estimated Expiration
2043-03-01

AI Technical Summary

Technical Problem

Traditional web video recording is inefficient and takes a long time, making it difficult to meet the needs of video recording business of millions of hours.

Method used

By loading the web address of the web page video, identifying the resource attributes of the video tag, obtaining audio data, and playing web page videos according to the playback rate of the video tag, adjusting the playback rate of the video and audio data to merge into the same rate, and using multimedia processing tools to merge video and audio data to achieve rapid recording.

Benefits of technology

It greatly shortens the video recording time and improves the recording efficiency, the system operation load is low and the processing efficiency is high.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116347116B_ABST
    Figure CN116347116B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, apparatus, electronic device and storage medium for web video recording, including: loading a web address of a web video to obtain a video tag of the web video; identifying resource attributes of the video tag to obtain audio data of the web video; playing the web video according to the playback rate of the video tag and recording the played web video to obtain video data of the web video; adjusting the playback rate of the video data and / or the playback rate of the audio data, and merging the video data and the audio data with the same playback rate to obtain recorded data of the web video. Thereby, the present disclosure can shorten the recording time of the web video to improve the video recording efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of multimedia data processing, and particularly relates to a method, device, electronic device, and storage medium for recording web videos. Background Art

[0002] With the continuous development of the Internet, online education has been favored by more and more institutions, teachers, and students due to its characteristics of being available for learning anytime and anywhere.

[0003] In existing online education solutions, teachers can play educational materials online and provide voice explanations and / or graphic annotations for the knowledge points played in the educational materials to achieve the purpose of online teaching. Among them, in order to facilitate students to consolidate and review the online teaching content after class, it is often necessary to record the online teaching video (web video) so as to achieve better learning effects by playing back the recorded online teaching video after class.

[0004] However, traditional web video recording is usually achieved by manually operating a screen recording tool while the video is played at the original speed. If it is necessary to meet the video recording service of millions of hours, it will take a lot of time and the recording efficiency is extremely low.

[0005] In view of this, there is an urgent need for a web video recording solution that can improve the processing efficiency. Summary of the Invention

[0006] In view of this, embodiments of the present disclosure provide a method, device, electronic device, and storage medium for recording web videos to at least partially solve the above problems.

[0007] According to a first aspect of the present disclosure, there is provided a method for loading a web address of a web video, obtaining a video tag of the web video; identifying a resource attribute of the video tag to obtain audio data of the web video; playing the web video according to a playback rate of the video tag, and recording the played web video to obtain video data of the web video; adjusting a playback rate of the video data and / or a playback rate of the audio data, and merging video data and audio data with the same playback rate to obtain recorded data of the web video.

[0008] According to a second aspect of the present disclosure, there is provided a web page video recording device, including: a resource acquisition module, configured to load a web page address of a web page video and obtain a video tag of the web page video; a data acquisition module, configured to identify a resource attribute of the video tag, obtain audio data of the web page video, play the web page video according to a playback rate of the video tag, and record the played web page video to obtain video data of the web page video; and a data merging module, configured to adjust a playback rate of the video data and / or a playback rate of the audio data, and merge the video data and the audio data having the same playback rate to obtain recorded data of the web page video.

[0009] According to a third aspect of the present disclosure, there is provided an electronic device, including: a processor; and a memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to execute the web page video recording method described in the first aspect above.

[0010] According to a fourth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the web page video recording method described in the first aspect.

[0011] The web page video recording solutions provided in various aspects of the present disclosure can implement the recording process of a web page video when playing the web page video at a multiple speed according to a set playback rate. Therefore, the video recording time can be significantly shortened, and the recording efficiency of the web page video is improved. In addition, each implementation step in the web page video recording solution of the present disclosure belongs to a lightweight processing means, the system operation load is low, and the processing efficiency is high. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In the following description of exemplary embodiments with reference to the accompanying drawings, more details, features, and advantages of the present disclosure are disclosed. In the drawings:

[0013] Figure 1 is a processing flow chart of the web page video recording method according to an exemplary embodiment of the present disclosure.

[0014] Figure 2 is a processing flow chart of the web page video recording method according to another exemplary embodiment of the present disclosure.

[0015] Figure 3 is a structural block diagram of the web page video recording device according to an exemplary embodiment of the present disclosure.

[0016] Figure 4 is a schematic architecture diagram of the electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0017] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.

[0018] It should be understood that the various steps described in the method embodiments of the present disclosure can be executed in different orders and / or executed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.

[0019] As used herein, the term "including" and its variants are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions executed by these devices, modules or units.

[0020] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly stated in the context, it should be understood as "one or more". The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.

[0021] As described in the background art section above, traditional web video recording solutions are usually implemented by manually operating a screen recording tool while the video is played at the original speed, which has problems such as long recording time and low recording efficiency. In view of this, the present disclosure discloses a web video recording solution that can improve the recording efficiency.

[0022] The following will describe the specific embodiments of the present disclosure in detail with reference to the accompanying drawings.

[0023] Figure 1 It is a flowchart of a web video recording method according to an exemplary embodiment of the present disclosure, which mainly includes the following steps:

[0024] Step S102, load the web address of the web video to obtain the video tag of the web video.

[0025] Optionally, an automated simulation tool can be used to create a headless browser, and the web address of the web video can be loaded through the headless browser to obtain the video tag of the web video.

[0026] Optionally, the automated simulation tool (which can also be called a browser automated simulation tool) can include but is not limited to puppeteer, selenium, etc.

[0027] Optionally, the headless browser can include but is not limited to the headless chrome browser.

[0028] Exemplarily, puppeteer can be used to create a headless browser. By opening the headless browser and loading the web address of the web video (for example, the URL address), the video tag of the web video (which can also be called the video tag) can be obtained.

[0029] Step S104, identify the resource attributes of the video tag to obtain the audio data of the web video.

[0030] Optionally, an automated simulation tool can be used to identify the resource attributes of the video tag to determine the video source address of the web video, and a multimedia processing tool can be used to extract the audio resource from the video source address to obtain the audio data of the web video.

[0031] Optionally, the multimedia processing tool can include but is not limited to FFmpeg.

[0032] Exemplarily, puppeteer can be used to identify the src attribute of the video tag to determine the video source address of the web video, and FFmpeg can be used to extract the audio resource (for example, the wav file) from the video source address to obtain the audio data of the web video. By using this technical means, after performing the speed restoration processing on the audio data, the presence of noise in the audio data can be avoided to improve the sound quality effect.

[0033] Optionally, the playback rate of the obtained audio data can be 1x rate (i.e., playing at the original speed), but it is not limited thereto. The playback rate of the obtained audio data can also be 2x rate, 4x rate, etc. The present disclosure does not limit this.

[0034] Step S106, play the web video according to the playback rate of the video tag, and record the played web video to obtain the video data of the web video.

[0035] Optionally, an automated simulation tool can be used to set the playback rate of the video tag for the headless browser to play the web video according to the playback rate of the video tag, and the automated simulation tool can be used to perform a recording operation on the video playback area of the headless browser to obtain the video data of the web video.

[0036] In this embodiment, the playback rate of the video data of the web video obtained should be the same as the playback rate of the video tag.

[0037] Optionally, the playback rate of the video tag may include but is not limited to 2x speed, 4x speed, 6x speed, 8x speed, 16x speed, etc.

[0038] Optionally, during the process of playing the web video in a headless browser, an automated simulation tool can be provided to stop the recording operation when it detects that the end-play event of the video tag is triggered.

[0039] Exemplarily, puppeteer can be used to set the playback rate of the video tag (e.g., Nx speed), so that based on the playback rate of the video tag, the headless browser plays the web video at Nx speed in its video playback area. And puppeteer-stream is used to perform the recording operation on the video playback area of the headless browser, while listening for the end-play event of the video tag. Until it detects that the end-play event is triggered, stop the recording operation on the video playback area of the web video, thereby obtaining the video data of the web video, and the playback rate of the obtained video data is Nx speed.

[0040] Thus, in this embodiment, by setting the playback rate of the video tag, when playing the web video at Nx speed, the recording operation of the web video can be completed within 1 / N of the duration, thereby effectively shortening the recording operation duration of the video data.

[0041] Step S108, adjust the playback rate of the video data and / or the playback rate of the audio data, and merge the video data and the audio data with the same playback rate to obtain the recorded data of the web video.

[0042] Optionally, according to the given adjustment rate, the playback rate of the video data and / or the playback rate of the audio data can be adjusted so that the playback rates of both the video data and the audio data are the same as the adjustment rate, thereby obtaining the video data and the audio data with the same playback rate.

[0043] In this embodiment, the adjustment rate can be set to 1x speed, 2x speed, 4x speed, etc., and the present disclosure does not limit this.

[0044] Optionally, the playback rate of the video data can be adjusted according to the playback rate of the audio data, thereby obtaining the video data and the audio data with the same playback rate.

[0045] Optionally, the playback rate of the audio data can be adjusted according to the playback rate of the video data, thereby obtaining the video data and the audio data with the same playback rate.

[0046] Optionally, the playback rate of video data can be adjusted through the following steps: parse the video data, obtain the playback rate attribute of the video data, and modify the playback rate attribute of the video data to adjust the playback rate of the video data.

[0047] Optionally, a video attribute modification tool can be used to parse the video data, and based on this, modify the playback rate attribute of the video data.

[0048] Exemplarily, the mp4reader.js plugin can be used to parse the video data, obtain the timescale attribute of the video data, and adjust the playback rate of the video data by modifying the timescale attribute. For example, by modifying the timescale attribute, the playback rate of the video data can be adjusted from N times the rate to 1 time the rate. Thus, in this embodiment, by modifying the playback rate attribute (timescale attribute) of the video data, fast (e.g., second-level) playback rate conversion processing can be achieved, with relatively high data conversion processing efficiency.

[0049] Optionally, before using the video attribute modification tool to parse the video data, the original data format of the video data can be converted to obtain video data with a target data format, where the target data format is a data format recognizable by the video attribute modification tool.

[0050] Generally, the data format of the video data obtained using puppeteer-stream is usually the webm format. In this case, the data format of the video data can be first converted from the webm format to the mp4 format using FFmpeg, and then the mp4reader.js plugin can be used to parse the video data in the mp4 format.

[0051] Exemplarily, FFmpeg can be used to merge video data and audio data with the same playback rate to obtain the recorded data of the web page video (which can also be called audiovisual data). Since the data merging process performed using FFmpeg is a lightweight process, the data merging process can be quickly completed in a relatively short time.

[0052] In summary, the web page video recording solution provided in this embodiment directly extracts the audio data of the web page video from the video source address of the web page video by identifying the video tag of the web page video, and by setting the playback rate of the video tag, the recording operation of the video data of the web page video can be performed when playing the web page video at a multiple speed. Thus, the recording solution of the present disclosure can effectively shorten the operation duration of video recording and improve the recording efficiency of web page videos.

[0053] Figure 2A web page video recording method showing another exemplary embodiment of the present disclosure mainly includes the following steps:

[0054] Step S202: Use an automated simulation tool to create a headless browser, and load the web page address of the web page video through the headless browser to determine the video tag of the web page video.

[0055] In this embodiment, puppeteer can be used to create a headless chrome browser, and by opening the headless chrome browser to load the web page address of the web page video (such as an online teaching video), the video tag of the web page video can be determined.

[0056] Step S204: Use an automated simulation tool to identify the resource attributes of the video tag to determine the video source address of the web page video, and use a multimedia processing tool to obtain the audio data of the web page video from the video source address.

[0057] In this embodiment, puppeteer can be used to identify the src attribute of the video tag of the web page video, and based on this, determine the video source address of the web page video, and use FFmpeg to extract the audio resource (wav file) in the video source address, so as to obtain the audio data of the web page video. Among them, the playback rate of the obtained audio data can be the original rate, or 2 times rate, 4 times rate, etc.

[0058] Step S206: Use an automated simulation tool to set the playback rate of the video tag for the headless browser to play the web page video according to the playback rate of the video tag, and use an automated simulation tool to perform a recording operation on the video playback area of the headless browser to obtain the video data of the web page video.

[0059] In this embodiment, puppeteer can be used to set the playback rate (such as N times rate) of the video tag of the web page video, so that the headless chrome browser can play the web page video at a multiple rate (such as N times rate) in the video playback area of the headless chrome browser according to the playback rate of the video tag, and use puppeteer-stream in puppeteer to perform a recording operation on the video playback area of the headless chrome browser to obtain the video data of the web page video. Among them, the playback rate of the obtained video data of the web page video should match the playback rate of the video tag.

[0060] In this embodiment, the playback rate of the video tag may include but is not limited to 2 times rate, 4 times rate, 6 times rate, 8 times rate, 16 times rate, etc., and the present disclosure does not limit this.

[0061] In this embodiment, during the process of playing a web video by a headless browser (headless chrome browser) according to the playback rate of the video tag, puppeteer-stream can be used to listen for the end-play event (end event) of the video tag, and when detecting that the end-play event is triggered, stop the recording operation of the video playback area of the headless browser, so as to obtain the complete video data of the web video.

[0062] Step S208: Use a video attribute modification tool to adjust the playback rate of the video data according to the playback rate of the audio data, so as to obtain the converted video data of the web video.

[0063] In this embodiment, the mp4reader.js plugin can be used to parse the video data to obtain the playback rate attribute (timescale attribute) of the video data, and according to the playback rate of the audio data, modify the playback rate attribute (timescale attribute) of the video data to obtain the converted video data with the same playback rate as the audio data.

[0064] Optionally, before using the video attribute modification tool to modify the playback rate attribute of the video data, a multimedia processing tool can be used to convert the original data format of the video data of the web video into a target data format recognizable by the video attribute modification tool.

[0065] Specifically, the data format of the video data obtained by puppeteer-stream performing the recording operation is usually the webm format. Therefore, before using the video attribute modification tool to modify the playback rate attribute of the video data, FFmpeg can be used to convert the data format of the video data of the web video from the webm format (i.e., the original data format) to the mp4 format (i.e., the target data format) recognizable by the mp4reader.js plugin, so that the mp4reader.js plugin can smoothly perform the adjustment process of the playback rate of the video data.

[0066] Step S210: Use a multimedia processing tool to merge the converted video data of the web video and the web video audio data to obtain the recorded data of the web video.

[0067] In this embodiment, FFmpeg can be used to merge the converted video data and the audio data with the same playback rate to obtain the recorded data (audio-visual data) of the web video.

[0068] In summary, by using the web video recording solution based on the automated simulation tool (puppeteer) and the multimedia processing tool (FFmpeg) in this embodiment, one only needs to manually configure the web address (URL address) of the web video to be recorded, and then the automatic and fast web video recording operation can be realized, which can greatly improve the recording efficiency of the web video. In addition, since the solution of this embodiment belongs to lightweight data processing, it has the advantage of low system operation load.

[0069] Figure 3 FIG. 4 is a structural block diagram of a web video recording device according to an exemplary embodiment of the present disclosure. As shown in the figure, the web video recording device 300 of this embodiment mainly includes a resource acquisition module 302, a data acquisition module 304, and a data merging module 306.

[0070] The resource acquisition module 302 is configured to load the web address of the web video and obtain the video tag of the web video.

[0071] The data acquisition module 304 is configured to identify the resource attributes of the video tag, obtain the audio data of the web video, play the web video according to the playback rate of the video tag, and record the played web video to obtain the video data of the web video.

[0072] The data merging module 306 is configured to adjust the playback rate of the video data and / or the playback rate of the audio data, and merge the video data and the audio data with the same playback rate to obtain the recorded data of the web video.

[0073] Optionally, the resource acquisition module 302 is further configured to: create a headless browser by using an automated simulation tool; load the web address of the web video through the headless browser to obtain the video tag of the web video.

[0074] Optionally, the data acquisition module 304 is further configured to: use the automated simulation tool to identify the resource attributes of the video tag to determine the video source address of the web video; use a multimedia processing tool to extract the audio resource from the video source address to obtain the audio data of the web video.

[0075] Optionally, the data acquisition module 304 is further configured to: use the automated simulation tool to set the playback rate of the video tag; provide the headless browser to play the web video according to the playback rate of the video tag, and use the automated simulation tool to perform a recording operation on the video playback area of the headless browser to obtain the video data of the web video; wherein, the playback rate of the video data of the web video is the same as the playback rate of the video tag.

[0076] Optionally, the data acquisition module 304 is further configured to: during the process that the headless browser plays the web page video according to the playback rate of the video tag, provide the automation simulation tool to stop the recording operation when detecting that the end playback event of the video tag is triggered.

[0077] Optionally, the playback rate of the video tag includes any one of 2x speed, 4x speed, 8x speed, and 16x speed.

[0078] Optionally, the data merging module 306 is further configured to adjust the playback rate of the video data and / or the playback rate of the audio data in any of the following ways:

[0079] Adjust the playback rate of the video data and / or the playback rate of the audio data according to a given adjustment rate, so that the playback rates of the video data and the audio data are both the same as the adjustment rate;

[0080] Adjust the playback rate of the video data according to the playback rate of the audio data, so that the playback rate of the video data is the same as the playback rate of the audio data;

[0081] Adjust the playback rate of the audio data according to the playback rate of the video data, so that the playback rate of the video data is the same as the playback rate of the audio data.

[0082] Optionally, the data merging module 306 is further configured to adjust the playback rate of the video data in the following way: parse the video data to obtain the playback rate attribute of the video data; modify the playback rate attribute of the video data to adjust the playback rate of the video data.

[0083] Optionally, the resource acquisition module 302 is further configured to: create a headless browser using an automated simulation tool, and load the web address of the web video through the headless browser to determine the video tag of the web video; the data acquisition module 304 is further configured to: use the automated simulation tool to identify the resource attributes of the video tag to determine the video source address of the web video, and use a multimedia processing tool to obtain the audio data of the web video from the video source address; use the automated simulation tool to set the playback rate of the video tag for the headless browser to play the web video according to the playback rate of the video tag, and use the automated simulation tool to perform a recording operation on the video playback area of the headless browser to obtain the video data of the web video; the data merging module 306 is further configured to: use a video attribute modification tool to adjust the playback rate of the video data of the web video according to the playback rate of the audio data of the web video to obtain the converted video data of the web video; use the multimedia processing tool to merge the converted video data of the web video and the audio data of the web video to obtain the recorded data of the web video.

[0084] Optionally, the automated simulation tool includes any one of puppeteer and selenium; the multimedia processing tool includes FFmpeg.

[0085] The embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, and the computer instructions are used to cause the computer to execute the web video recording method of the exemplary embodiment of the present disclosure.

[0086] The exemplary embodiment of the present disclosure provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program capable of being executed by the at least one processor, and when the computer program is executed by the at least one processor, it is used to cause the electronic device to execute the web video recording method according to the exemplary embodiment of the present disclosure.

[0087] Please refer to Figure 4, a block diagram of an electronic device 400 that can serve as a server or a client of the present disclosure will now be described. It is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0088] As Figure 4 shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the device 400 can also be stored. The computing unit 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0089] A plurality of components in the electronic device 400 are connected to the I / O interface 405, including: an input unit 406, an output unit 404, a storage unit 408, and a communication unit 409. The input unit 406 can be any type of device that can input information into the electronic device 400. The input unit 406 can receive input digital or character information, and generate key signal inputs related to the user settings and / or function controls of the electronic device. The output unit 406 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 404 can include but is not limited to magnetic disks, optical disks. The communication unit 409 allows the electronic device 400 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth™ device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.

[0090] The computing unit 401 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated 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 401 executes the various methods and processes described above. For example, in some embodiments, the web page video recording method as described above can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 400 via the ROM 402 and / or the communication unit 409. In some embodiments, the computing unit 401 can be configured to execute the above-described web page video recording method in any other suitable manner (e.g., by means of firmware).

[0091] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0092] In the context of the present disclosure, a machine-readable medium can 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. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can 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 disk, 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.

[0093] As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and / or device (e.g., a magnetic disk, an optical disk, a memory, a programmable logic device (PLD)) used to provide machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and / or data to a programmable processor.

[0094] To provide for interaction with a user, the systems and techniques described herein 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 the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic, speech, or tactile input).

[0095] The systems and techniques described herein can be implemented in a computing system that includes a back-end component (e.g., as a data server), or a computing system that includes a middleware component (e.g., an application server), or a computing system that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such back-end, 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: a local area network (LAN), a wide area network (WAN), and the Internet.

[0096] A computer system can include a client and a server. The client and the server are generally 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.

[0097] It should be noted that, according to the needs of implementation, the various components / steps described in the embodiments of the present disclosure can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the objectives of the embodiments of the present disclosure.

[0098] The above embodiments are only used to illustrate the embodiments of the present disclosure, rather than limiting the embodiments of the present disclosure. Those of ordinary skill in the relevant technical field can also make various changes and modifications without departing from the spirit and scope of the embodiments of the present disclosure. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present disclosure. The patent protection scope of the embodiments of the present disclosure shall be defined by the claims.

Claims

1. A method for recording web videos, characterized in that, Including: Loading the web address of a web page video to obtain the video tag of the web page video; Identifying the resource attribute of the video tag to obtain the audio data of the web page video; Playing the web page video according to the playback rate of the video tag and recording the played web page video to obtain the video data of the web page video; Adjusting the playback rate of the video data and / or the playback rate of the audio data, and merging the video data and audio data with the same playback rate to obtain the recorded data of the web page video; Wherein, the playback rate of the video tag includes any one of 2x speed, 4x speed, 6x speed, 8x speed, 16x speed.

2. The method according to claim 1, characterized in that The loading the web address of a web page video to obtain the video tag of the web page video includes: Creating a headless browser using an automated simulation tool; Loading the web address of the web page video by means of the headless browser to obtain the video tag of the web page video.

3. The method according to claim 2, wherein The identifying the resource attribute of the video tag to obtain the audio data of the web page video includes: Identifying the resource attribute of the video tag using the automated simulation tool to determine the video source address of the web page video; Extracting the audio resource from the video source address using a multimedia processing tool to obtain the audio data of the web page video.

4. The method according to claim 2, wherein The playing the web page video according to the playback rate of the video tag and recording the played web page video to obtain the video data of the web page video includes: Setting the playback rate of the video tag using the automated simulation tool; Providing the headless browser to play the web page video according to the playback rate of the video tag, and using the automated simulation tool to perform a recording operation on the video playback area of the headless browser to obtain the video data of the web page video; Wherein, the playback rate of the video data of the web page video is the same as the playback rate of the video tag.

5. The method according to claim 4, characterized in that The method further includes: During the process of the headless browser playing the web page video according to the playback rate of the video tag, providing the automated simulation tool to stop the recording operation when detecting that the end playback event of the video tag is triggered.

6. The method according to any one of claims 1 to 4, characterized in that, Adjusting the playback rate of the video data and / or the playback rate of the audio data by any of the following methods: Adjusting the playback rate of the video data and / or the playback rate of the audio data according to a given adjustment rate so that the playback rates of the video data and the audio data are both the same as the adjustment rate; Adjusting the playback rate of the video data according to the playback rate of the audio data so that the playback rate of the video data is the same as the playback rate of the audio data; Adjusting the playback rate of the audio data according to the playback rate of the video data so that the playback rate of the video data is the same as the playback rate of the audio data.

7. The method according to any one of claims 1 to 4, characterized in that, Adjusting the playback rate of the video data by the following method: Parsing the video data to obtain the playback rate attribute of the video data; Modifying the playback rate attribute of the video data to adjust the playback rate of the video data.

8. The method according to claim 1, wherein The method includes: Create a headless browser using an automated simulation tool, and load the web address of the web video through the headless browser to determine the video tags of the web video; Use the automated simulation tool to identify the resource attributes of the video tags to determine the video source address of the web video, and use a multimedia processing tool to obtain the audio data of the web video from the video source address; Use the automated simulation tool to set the playback rate of the video tags, so that the headless browser plays the web video according to the playback rate of the video tags, and use the automated simulation tool to perform a recording operation on the video playback area of the headless browser to obtain the video data of the web video; Use a video attribute modification tool to adjust the playback rate of the video data of the web video according to the playback rate of the audio data of the web video to obtain the converted video data of the web video; Use the multimedia processing tool to merge the converted video data of the web video and the audio data of the web video to obtain the recorded data of the web video.

9. The method according to claim 3 or 8, wherein The automated simulation tool includes any one of puppeteer and selenium; The multimedia processing tool includes FFmpeg.

10. A web video recording device, characterized in that, Comprising: A resource acquisition module for loading the web address of the web video to obtain the video tags of the web video; A data acquisition module for identifying the resource attributes of the video tags, obtaining the audio data of the web video, playing the web video according to the playback rate of the video tags, and recording the played web video to obtain the video data of the web video, wherein the playback rate of the video tags includes any one of 2x speed, 4x speed, 6x speed, 8x speed, and 16x speed; A data merging module for adjusting the playback rate of the video data and / or the playback rate of the audio data, and merging the video data and the audio data with the same playback rate to obtain the recorded data of the web video.

11. An electronic device, comprising: A processor; And A memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to execute the web video recording method according to any one of claims 1-9.

12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the web video recording method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Video recording method and apparatus, graphic processor and electronic device

    CN107277412A

  • Audio stream adaptive frequency scheme

    US20040156622A1