An online video modification method and device, a storage medium and an electronic device

By generating a description file in the content delivery network and dynamically modifying the video content on the client side, the problem of excessive time consumption during online video modification is solved, enabling rapid online deployment and increased viewership.

CN116471459BActive Publication Date: 2026-08-25HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310517884.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-09
Publication Date
2026-08-25
Estimated Expiration
2043-05-09

AI Technical Summary

Technical Problem

In existing technologies, modifying online videos requires a significant amount of time for transcoding, slicing, and distribution, resulting in slow video upload speeds and impacting video popularity and viewership.

Method used

By taking the target video file offline in the content delivery network, a description file is generated to record the modification information of the content to be modified. The client then dynamically modifies and plays the video based on the description file, avoiding the need for the server to modify, transcode, and distribute the video source file.

Benefits of technology

This shortened the time it took for video files to be taken offline, reduced the loss of video popularity, and increased video views and platform revenue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116471459B_ABST
    Figure CN116471459B_ABST
Patent Text Reader

Abstract

The application provides an online video modification method and device, a storage medium and an electronic device. The video file of a target video in a content distribution network is processed offline. A description file is generated according to a pre-stored video source file of the target video. The description file is used to record modification information of to-be-modified content. The description file and the video file are processed online, so that when a video playing request for the target video is received by a client, the to-be-modified content in the video file is modified according to the description file, and the modified video file is played. It can be seen that the server only needs to generate the description file, and then the client dynamically modifies the to-be-modified content in the video file based on the description file and plays the video file, without waiting for the server to modify, transcode, split and distribute the video source file, thereby shortening the offline time of the video file, reducing the loss of video popularity, and promoting the increase of video playing quantity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video playback technology, and in particular to an online video modification method and apparatus, storage medium and electronic device. Background Technology

[0002] Currently, major video platforms release new programs daily. Program popularity and viewership are key metrics for these platforms, with top-tier IP dramas often generating significant user traffic and revenue. However, due to various reasons (such as celebrity violations, advertising breaches, or content errors), it's necessary to modify or replace online video content—in other words, to edit online videos.

[0003] In existing technologies, the process of modifying a video before it goes online involves: first, taking the video offline; then, modifying the video; and finally, transcoding, slicing, and distributing the modified video before it is re-uploaded. Because this entire process is time-consuming, the video upload speed is slow, and users cannot watch the video while it is offline, leading to a loss of video popularity and views, which in turn has a significant impact on the platform. Summary of the Invention

[0004] This application provides an online video modification method, apparatus, storage medium, and electronic device, aiming to solve the problem in the prior art that the modification of videos requires a lot of time for transcoding, slicing, and distribution, resulting in slow video upload speed, loss of video popularity and views, and thus a significant impact on the platform.

[0005] To achieve the above objectives, this application provides the following technical solution:

[0006] The first aspect of this application discloses an online video modification method, applied on a server side, the method comprising:

[0007] The video file of the target video in the content delivery network is taken offline; the target video is the online video to be modified, and the video file is obtained by preprocessing the video source file of the target video.

[0008] Based on the pre-stored video source file of the target video, a description file is generated; the description file is used to record modification information of the content to be modified.

[0009] The description file and the video file are processed for online access so that when the client receives a video playback request for the target video, it can modify the content to be modified in the video file according to the description file and play the modified video file.

[0010] A second aspect of this application discloses an online video editing device applied to a server, the device comprising:

[0011] The offline unit is used to remove the video file of the target video from the content delivery network; the target video is the online video to be modified, and the video file is obtained by preprocessing the video source file of the target video;

[0012] The generation unit is used to generate a description file based on the pre-stored video source file of the target video; the description file is used to record modification information of the content to be modified;

[0013] The online unit is used to process the description file and the video file online, so that when the client receives a video playback request for the target video, it can modify the content to be modified in the video file according to the description file and play the modified video file.

[0014] A third aspect of this application discloses an online video modification method applied to a client, the method comprising:

[0015] In response to a video playback request for a target video, if the video file of the target video exists in the content delivery network, it is determined whether a description file of the target video exists in the content delivery network; the video file of the target video is obtained by preprocessing the video source file of the target video, and the description file in the content delivery network is generated by the server based on the video source file of the online video to be modified, and the description file is used to record the modification information of the content to be modified;

[0016] If it exists, obtain the video file and description file of the target video;

[0017] Based on the description file, the content to be modified in the video file is modified, and the modified video file is played.

[0018] A fourth aspect of this application discloses an online video editing device, applied to a client, the device comprising:

[0019] The judgment unit is used to respond to a video playback request for a target video, and if the video file of the target video exists in the content distribution network, determine whether a description file of the target video exists in the content distribution network; the video file of the target video is obtained by preprocessing the video source file of the target video, and the description file in the content distribution network is generated by the server based on the video source file of the online video to be modified, and the description file is used to record the modification information of the content to be modified;

[0020] The first acquisition unit is used to acquire the video file and description file of the target video if they exist.

[0021] The first playback unit is used to modify the content to be modified in the video file according to the description file, and then play the modified video file.

[0022] The fifth aspect of this application discloses a storage medium storing an instruction set, wherein the instruction set, when executed by a processor, implements the online video modification method disclosed in the first aspect above, or the online video modification method disclosed in the third aspect.

[0023] The sixth aspect of this application discloses an electronic device, comprising:

[0024] Memory, used to store at least one set of instructions;

[0025] A processor is configured to execute a set of instructions stored in the memory, and to implement the online video modification method disclosed in the first aspect above, or the online video modification method disclosed in the third aspect, by executing the set of instructions.

[0026] Compared with the prior art, this application has the following advantages:

[0027] This application provides an online video modification method, apparatus, storage medium, and electronic device. The method includes: taking a target video file offline from a content delivery network; the target video is an online video to be modified, and the video file is obtained by preprocessing the target video's source file; generating a description file based on the pre-stored source file of the target video; the description file is used to record modification information of the content to be modified; and uploading the description file and the video file online, so that when the client receives a video playback request for the target video, it can modify the content to be modified in the video file according to the description file and play the modified video file. As can be seen, in this application, the server only needs to generate the description file to upload the video file, and then the client dynamically modifies the content to be modified in the video file based on the description file and plays it, without waiting for the server to modify, transcode, segment, and distribute the video source file. This shortens the video file's offline time, reduces the loss of video popularity, and promotes increased video playback. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0029] Figure 1 A flowchart of an online video editing method provided in this application;

[0030] Figure 2 A flowchart illustrating another method for online video editing provided in this application;

[0031] Figure 3 A flowchart illustrating another method for online video editing provided in this application;

[0032] Figure 4 A flowchart illustrating another method for online video editing provided in this application;

[0033] Figure 5 A flowchart illustrating another method for online video editing provided in this application;

[0034] Figure 6 Example diagram of an online video modification method provided in this application;

[0035] Figure 7 A schematic diagram of an online video editing device provided in this application;

[0036] Figure 8 Another structural schematic diagram of an online video editing device provided in this application;

[0037] Figure 9 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation

[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0039] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "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". Definitions of other terms will be given in the description below.

[0040] It should be noted that the concepts of "first" and "second" mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0041] It should be noted that the terms "a" and "a plurality of" used in this application disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0042] This application provides an online video editing method, which can be applied on a server-side basis. The method flowchart is shown below. Figure 1 As shown, it specifically includes:

[0043] S101. Take the video file of the target video offline from the content delivery network.

[0044] In this embodiment, the Content Delivery Network (CDN) pre-stores video files of multiple online videos (i.e., videos that have already been broadcast online).

[0045] When there is a need to modify a video, the video file of the target video in the content delivery network is taken offline. The target video is the online video to be modified, and the target video is obtained by preprocessing the video source file of the target video.

[0046] The process of removing a target video file from the content delivery network (CDN) specifically includes: sending a removal request to the CDN, enabling the CDN to determine the target video file to be removed based on the request, and then removing the target video file; specifically, changing the file identifier of the target video file from a first identifier to a second identifier. The first identifier indicates that the video file belongs to an online video, while the second identifier indicates that the video file belongs to a video that has already been removed. It should be noted that video files with the first identifier can be played, while video files with the second identifier cannot be played.

[0047] The video file includes video sub-files of multiple resolutions, including but not limited to smooth, standard definition, high definition, and ultra-high definition.

[0048] S102. Generate a description file based on the pre-stored video source file of the target video.

[0049] Optionally, the source video file of the target video can be pre-stored locally.

[0050] After the target video file is taken offline, a description file is generated based on the pre-stored source video file of the target video. The description file is used to record modification information for the content to be modified.

[0051] See Figure 2 The process of generating a description file based on the pre-stored video source file of the target video includes the following steps:

[0052] S201. Obtain the modification requirement document.

[0053] In this embodiment, the input modification requirement document is obtained; the modification requirement document is used to describe the modification requirements.

[0054] The modification requirements document must include at least the modification type and tag information for the content to be modified. The modification type indicates the modification operation to be performed on the content; modification types include, but are not limited to, blurring, removing, and cropping. The tag information for the content to be modified describes the attributes of the content. For example, the tag information could be the name of a violating user or the name of a non-compliant advertisement.

[0055] S202. Based on the tag information in the modification requirement document, use the recognition algorithm to determine whether there is content to be modified in each frame of the video source file. If yes, proceed to S203; otherwise, proceed to S204.

[0056] In this embodiment, the video source file includes multiple frames of images.

[0057] In this embodiment, a recognition algorithm is pre-written to identify images in each frame of the video source file that contain content to be modified.

[0058] In this embodiment, based on the tag information in the modification requirement document, an identification algorithm is used to determine whether there is content to be modified in each frame of the video source file. Specifically, for each frame of the video source file, based on the tag information in the modification requirement document, an identification algorithm is used to determine whether there is content in the frame that corresponds to the tag information, thereby determining whether there is content to be modified in the frame.

[0059] S203. Identify the image containing the content to be modified in the video source file as the target image, and obtain the modification parameters of the content to be modified in the target image. Use the modification type and modification parameters in the modification requirements document as the modification information.

[0060] In this embodiment, if there is content to be modified in each frame of the video source file, the image in the video file containing the content to be modified is determined as the target image, and the modification parameters of the content to be modified in the target image are obtained. The modification parameters include, but are not limited to, coordinate information and time nodes. The coordinate information is the coordinate of the area to be modified in the target image, and the time node is the playback time node of the target image.

[0061] In this embodiment, after obtaining the modification parameters of the content to be modified in the target image, the modification type in the modification requirement document and the obtained modification parameters are used as modification information.

[0062] S204. Modify the modification type and tag information in the requirements document as modification information.

[0063] In this embodiment, if no content to be modified exists in any of the frame images included in the video source file, it means that the image containing content to be modified cannot be identified in the video source file, and the modification type and tag information in the modification requirement document are used as the modification information.

[0064] S205. Generate a description file based on the modification information.

[0065] In this embodiment, a description file is generated based on the modification information. That is, the description file includes modification information of the content to be modified, and the modification information includes at least one set of modification parameters and modification type, or includes tag information and modification type, wherein the modification parameters include at least time node and coordinate information.

[0066] Optionally, users can refer to the video source file and manually generate a description file, so that the server can directly obtain the description file input by the user.

[0067] S103. Perform online processing on the description file and video file so that when the client receives a video playback request for the target video, it can modify the content to be modified in the video file according to the description file and play the modified video file.

[0068] In this embodiment, the description file and video file are uploaded to the content delivery network, and the file identifier of the video file and the file identifier of the description file are set to the first identifier.

[0069] It should be noted that the video file is taken offline in step S101, therefore, the video file is brought back online in step S103, which means bringing the video file back online.

[0070] It should be noted that after the description files and video files are uploaded, the correspondence between the video files and description files is stored in the content delivery network. Based on the stored correspondence between the files and description files, the corresponding description file can be found through the video file, and the corresponding video file can be found through the description file.

[0071] The description file and video file undergo online processing so that when a client receives a video playback request for a target video, it can retrieve the video file and description file of the target video through the content delivery network, modify the content to be modified in the video file according to the description file, and then play the modified video file after completing the modification. It should be noted that the video playback request received by the client is a request to play the video file corresponding to one of the preset resolutions of the target video; modifying the content to be modified in the video file according to the description file means modifying the video sub-file of the target resolution according to the description file. The target resolution is the preset resolution requested in the video playback request.

[0072] The process by which the client obtains the video file and description file of the target video through the content delivery network specifically includes: determining whether the description file of the target video exists in the content delivery network; if it exists, obtaining the description file and the video file of the target video.

[0073] The process of determining whether a description file for the target video exists in the content delivery network specifically includes: determining whether there is a corresponding relationship between the pre-stored video files and description files and the target video; if so, it is determined that a description file for the target video exists in the content delivery network, and the description file for the target video is the description file in the corresponding relationship.

[0074] The process of modifying the content to be modified in the video file according to the description file specifically includes: decoding the video file to obtain multiple frames of images arranged in playback order; if the description file includes modification parameters, then according to the modification parameters in the description file, the first operation is performed on each frame of images in the playback order; if the description file does not include modification parameters, then according to the tag information in the description file, the second operation is performed on each frame of images in the playback order.

[0075] The first operation includes: determining whether there is a time node in the modification parameters included in the description file that matches the playback time node of the image; if so, determining the area of ​​the content to be modified in the image based on the coordinate information in the modification parameters to which the matching time node belongs, and modifying the content of that area in the image according to the modification type in the description file.

[0076] The second operation includes: identifying the content to be modified in the image based on the label information included in the description file; if the image is found to contain content to be modified, then modifying the content to be modified in the image according to the modification type in the description file.

[0077] It should be noted that the essential processing in this application is all done on the client side. The server does not need to modify, transcode, split, or distribute the video source file. It only needs to send the description file of the modified content to the client along with the video file through the content delivery network. All processing is completed on the client side.

[0078] The online video modification method provided in this application involves taking the video file of a target video offline from a content delivery network. The target video is the online video to be modified, and the video file is obtained by preprocessing the target video's source file. A description file is generated based on the pre-stored source file of the target video. The description file records the modification information of the content to be modified. The description file and the video file are then uploaded online so that when the client receives a video playback request for the target video, it can modify the content to be modified in the video file according to the description file and play the modified video file. Therefore, in this solution, the server only needs to generate the description file to upload the video file. Then, the client dynamically modifies the content to be modified in the video file based on the description file and plays it, without waiting for the server to modify, transcode, segment, and distribute the video source file. This shortens the video file's offline time, reduces the loss of video popularity, promotes increased video views, and increases platform revenue.

[0079] See Figure 3 In the online video modification method provided in the above-described embodiments of this application, after step S102, the following steps may also be included:

[0080] S301. Based on the description file, modify the content to be modified in the video source file to obtain a new video source file.

[0081] In this embodiment, after generating the description file, the content to be modified in the video source file is modified based on the description file. Specifically, according to the description file, the images containing the content to be modified in each frame of the video source file are determined, and the images containing the content to be modified are modified to obtain a new video source file.

[0082] S302. Perform transcoding on the new video source file to obtain a transcoded video file.

[0083] In this embodiment, a new video source file is transcoded to obtain a transcoded video file. Specifically, the new video source file is transcoded according to multiple preset resolutions to obtain a transcoded video file, wherein the transcoded video file includes multiple transcoded video sub-files with preset resolutions. Each transcoded video sub-file corresponds to one preset resolution.

[0084] S303. Perform file slicing on the transcoded video file to obtain the target video file.

[0085] File slicing is performed on the transcoded video file, which means slicing the various transcoded video sub-files included in the transcoded video file to obtain the target video file. The target video file contains multiple video sub-files, and each video sub-file corresponds to a preset resolution.

[0086] S304. Send the target video file to the content delivery network so that the content delivery network can replace the re-uploaded video file with the target video file.

[0087] In this embodiment, the target video file is sent to the content delivery network so that the content delivery network can replace the re-uploaded video file with the target video file. In other words, the target video file is uploaded and the re-uploaded video file is taken offline.

[0088] It should be noted that the file identifier of the target video file after it is uploaded is the first identifier.

[0089] S305. Remove description files from the content delivery network.

[0090] In this embodiment, after the target video file is sent to the content delivery network, the description file in the content delivery network is taken offline.

[0091] It should be noted that the mapping between the pre-stored video files and description files, specifically the mapping between the description files and the description files, also needs to be deleted.

[0092] The method provided in this application involves modifying the content to be modified in the video source file, performing transcoding and file slicing operations to obtain the target video file, and then uploading the target video file to replace the re-uploaded video file. This allows the client to directly obtain the target video file for normal playback without dynamically modifying the video file before playback, thereby reducing network costs and load, and improving the response efficiency of client video playback.

[0093] This application also provides another online video modification method, which can be applied on the client side (i.e., the player side). The flowchart of the method is as follows. Figure 4 As shown, it specifically includes:

[0094] S401. In response to a video playback request for the target video, if the video file of the target video exists in the content delivery network, determine whether the description file of the target video exists in the content delivery network. If not, execute S402; if yes, execute S403.

[0095] The client receives a video playback request for the target video, responds to the request, and, if the video content of the target video exists in the content delivery network (CDN), determines whether a description file for the target video exists in the CDN. The target video file is pre-processed based on the target video source file, while the description file in the CDN is generated by the server based on the video source file of the online video to be modified. The description file records modification information for the content to be modified.

[0096] The existence of the target video's video file in the content delivery network can be understood as the target video's video file being online, meaning that the target video's video file has not been taken offline, or has been taken offline and then re-uploaded.

[0097] It should be noted that the target video is an online video.

[0098] It should be noted that when there is a need to modify an online video, the server takes the video file of the online video to be modified offline, generates a description file of the online video to be modified, and then uploads the video file and description file of the online video to be modified online, so that the description file of the online video to be modified can exist in the content delivery network.

[0099] The specific judgment process includes: determining whether there is a corresponding relationship between the pre-stored video files and description files and the target video. If there is, it is determined that the description file of the target video exists in the content delivery network. If there is no corresponding relationship, it is determined that the description file of the target video does not exist in the content delivery network. The description file of the target video is the description file in the corresponding relationship.

[0100] S402. Obtain the video file of the target video and play the video file.

[0101] In this embodiment, if the description file of the target video does not exist in the content delivery network, it means that there is no need to modify the video file of the target video, or the server has already completed the modification, transcoding, segmentation and uploading of the video source file of the target video, and directly obtained and played the video file of the target video.

[0102] S403. Obtain the video file and description file of the target video.

[0103] In this embodiment, if a description file for the target video exists in the content delivery network, then the video file and description file of the target video are obtained.

[0104] S404. Based on the description file, modify the content to be modified in the video file and play the modified video file.

[0105] In this embodiment, the content to be modified in the video file is modified according to the description file, that is, the content to be modified in the video file is modified dynamically.

[0106] In this embodiment, the description file includes at least one set of modification parameters and modification types, or includes tag information and modification types, wherein the modification parameters include at least time nodes and coordinate information.

[0107] After modifying the content to be modified in the video file, play the modified video file.

[0108] See Figure 5 The process of modifying the content to be modified in the video file based on the description file includes the following steps:

[0109] S501. Decode the video file to obtain multiple frames of images arranged in playback order.

[0110] In this embodiment, the video file is decoded to obtain multiple frames of images arranged in playback order.

[0111] S502. Determine whether the description file includes modification parameters. If yes, execute S503; otherwise, execute S504.

[0112] In this embodiment, the description file includes at least one set of modification parameters and modification types, or includes tag information and modification types, wherein the modification parameters include at least time nodes and coordinate information.

[0113] Optionally, the modified parameters can also include tag information.

[0114] In this embodiment, it is determined whether the description file includes modified parameters.

[0115] S503. Based on the modified parameters in the description file, perform the first operation on each frame of the image in the playback order.

[0116] If the description file includes modification parameters, then based on the modification parameters in the description file, the first operation is performed on each frame of the image in the playback order.

[0117] The first operation includes: determining whether there is a time node in the modification parameters included in the description file that matches the playback time node of the image; if so, determining the area of ​​the content to be modified in the image based on the coordinate information in the modification parameters to which the matching time node belongs, and modifying the content of that area in the image according to the modification type in the description file.

[0118] In this embodiment, when the description file includes modification parameters, the description file includes at least one set of modification parameters and modification type.

[0119] In this embodiment, the system determines whether there is content to be modified in the frame image by judging whether there is a time node in the modification parameters included in the description file that matches the playback time node of the image. If there is a time node in the modification parameters included in the description file that matches the playback time node of the image, it is determined that there is content to be modified in the frame image. If there is no time node in the modification parameters included in the description file that matches the playback time node of the image, it is determined that there is no content to be modified in the frame image.

[0120] In this embodiment, the region of the content to be modified in the image is determined based on the coordinate information in the modification parameters to which the time nodes that match the comparison belong. Specifically, the region enclosed by the coordinate information in the image is determined as the region of the content to be modified in the image.

[0121] S504. Based on the tag information in the description file, perform the second operation on each frame of the image in the playback order.

[0122] If the description file does not include modification parameters, then based on the tag information in the description file, the second operation is performed on each frame of the image in the playback order.

[0123] The second operation includes: identifying the content to be modified in the image based on the tag information included in the description file; if the image is found to contain content to be modified, then modifying the content to be modified in the image according to the modification type in the description file.

[0124] In this embodiment, based on the tag information included in the description file, the image is identified to be modified. Specifically, this includes: using a preset recognition scheme to identify the image to be modified, wherein the preset recognition scheme can be modified as needed.

[0125] In this embodiment, the content to be modified in the identified image is modified, including but not limited to mosaic processing or removal of the content to be modified in the identified image.

[0126] In the online video modification method provided in this application embodiment, the client dynamically modifies the content to be modified in the video file based on the description file and plays it, without waiting for the server to modify, transcode, split and distribute the video source file, thereby shortening the video file's offline time, reducing the loss of video popularity, promoting increased video playback volume and increasing platform revenue.

[0127] See Figure 6 The specific implementation process of the online video modification method mentioned above is illustrated with an example below:

[0128] S1. When there is a need to modify an online video, the server sends a request to the content delivery network to take the target video offline, where the target video is the online video to be modified.

[0129] S2. After receiving a request to take down the target video, the content delivery network takes down the video file of the target video.

[0130] S3. The server generates a description file based on the pre-stored video source file of the target video. Specifically, it obtains a modification requirement document, and based on the tag information in the modification requirement document, uses a recognition algorithm to determine whether there is content to be modified in each frame of the video source file. If so, the image in the video source file containing the content to be modified is identified as the target image, and the modification parameters of the content to be modified in the target image are obtained. The modification type and modification parameters in the modification requirement document are used as modification information. If not, the modification type and tag information in the modification requirement document are used as modification information, and a description file is generated based on the modification information.

[0131] S4. After generating the description file, the server sends the description file to the content delivery network.

[0132] S5. The server sends a request to the content delivery network to upload the target video.

[0133] S6. After receiving the description file, the content delivery network (CDN) stores the description file. Upon receiving a request to upload the target video, the CDN re-uploads the video file of the target video. This allows the client to send a request to the CDN to retrieve the video file of the target video after receiving a playback request. If the CDN currently has the description file of the target video, it sends both the video file and the description file to the client. The client then modifies the content to be modified in the video file according to the description file and plays the modified video file. The process of modifying the content to be modified in the video file is described in embodiments S501-S504 and will not be repeated here.

[0134] S7. After generating the description file, the server can also modify, transcode, and slice the content to be modified in the video source file based on the description file to obtain the target video file. Specifically, based on the description file, the content to be modified in the video source file is modified to obtain a new video source file, the new video source file is transcoded to obtain a transcoded video file, and the transcoded video file is sliced ​​to obtain the target video file.

[0135] S8. The server sends the target video file to the content delivery network.

[0136] S9. After receiving the target video file, the content delivery network stores the target video file and removes the video file and description file. This allows the client to send a request to the content delivery network to retrieve the video file of the target video after receiving a playback request for the target video. At this time, the content delivery network does not have the description file of the target video. The content delivery network only sends the video file of the target video to the client, and the client plays the target video file directly.

[0137] It should be noted that although the instructions are described in a specific order, this should not be interpreted as requiring these instructions to be executed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous.

[0138] It should be understood that the various steps described in the method embodiments disclosed in this application may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this application is not limited in this respect.

[0139] and Figure 1 Corresponding to the method described above, this application also provides an online video editing device for modifying videos. Figure 1 The specific implementation of the method, this device is applied to the server side, and the structural diagram of the device is shown below. Figure 7 As shown, it specifically includes:

[0140] The offline unit 701 is used to take the video file of the target video in the content delivery network offline; the target video is the online video to be modified, and the video file is obtained by preprocessing the video source file of the target video.

[0141] The generation unit 702 is used to generate a description file based on the pre-stored video source file of the target video; the description file is used to record modification information of the content to be modified;

[0142] The online unit 703 is used to process the description file and the video file online, so that when the client receives a video playback request for the target video, it can modify the content to be modified in the video file according to the description file and play the modified video file.

[0143] The online video editing device provided in this application embodiment allows the server to upload video files simply by generating a description file. The client then dynamically modifies the content to be modified in the video file based on the description file and plays it, without waiting for the server to modify, transcode, split, and distribute the video source file. This shortens the time it takes for the video file to go offline, thereby reducing the loss of video popularity, promoting increased video views, and increasing platform revenue.

[0144] In one embodiment of this application, based on the foregoing scheme, the generation unit 702 is specifically used for:

[0145] Obtain the modification requirement document; the modification requirement document includes at least the modification type and tag information; the tag information is used to describe the attributes of the content to be modified;

[0146] Based on the tag information in the modification requirement document, a recognition algorithm is used to determine whether there is content to be modified in each frame of the video source file.

[0147] If it exists, the image containing the content to be modified in the video source file is identified as the target image, and the modification parameters of the content to be modified in the target image are obtained. The modification type in the modification requirement document and the modification parameters are used as the modification information. The modification parameters include at least coordinate information and time nodes.

[0148] If it does not exist, the modification type and tag information in the modification requirement document will be used as the modification information;

[0149] Based on the modified information, a description file is generated.

[0150] In one embodiment of this application, based on the foregoing solution, it can also be configured as follows:

[0151] The modification unit is used to modify the content to be modified in the video source file based on the description file to obtain a new video source file;

[0152] The transcoding unit is used to perform a transcoding operation on the new video source file to obtain a transcoded video file;

[0153] The slicing unit is used to perform file slicing processing on the transcoded video file to obtain the target video file;

[0154] A sending unit is configured to send the target video file to the content delivery network, so that the content delivery network replaces the re-uploaded video file with the target video file.

[0155] The description file in the content delivery network is taken offline.

[0156] and Figure 4 Corresponding to the method described above, this application also provides an online video editing device for modifying videos. Figure 4 The specific implementation of the method, the device applied to the client, the structural diagram of the device is as follows. Figure 8 As shown, it specifically includes:

[0157] The judgment unit 801 is used to respond to a video playback request for a target video, and if the video file of the target video exists in the content distribution network, determine whether a description file of the target video exists in the content distribution network; the video file of the target video is obtained by preprocessing the video source file of the target video, and the description file in the content distribution network is generated by the server based on the video source file of the online video to be modified, and the description file is used to record the modification information of the content to be modified;

[0158] The first acquisition unit 802 is used to acquire the video file and description file of the target video if they exist.

[0159] The playback unit 803 is used to modify the content to be modified in the video file according to the description file, and play the modified video file.

[0160] The online video editing device provided in this application embodiment allows the client to dynamically modify the content to be modified in the video file based on the description file and then play it, without waiting for the server to modify, transcode, split, and distribute the video source file. This shortens the time the video file is taken offline, thereby reducing the loss of video popularity, promoting increased video playback volume, and increasing platform revenue.

[0161] In one embodiment of this application, based on the foregoing scheme, the description file includes at least one set of modification parameters and modification types, or includes tag information and modification types. The modification parameters at least include time nodes and coordinate information. When the playback unit 803 modifies the content to be modified in the video file according to the description file and plays the modified video file, it is specifically used for:

[0162] The video file is decoded to obtain multiple frames of images arranged in playback order;

[0163] If the description file includes modification parameters, then according to the modification parameters in the description file, the first operation is performed on each frame of the image in the playback order.

[0164] If the description file does not include modification parameters, then according to the tag information in the description file, the second operation is performed on each frame of the image in the playback order.

[0165] The first operation includes: determining whether there is a time node in the modification parameters included in the description file that matches the playback time node of the image; if so, determining the area of ​​the content to be modified in the image based on the coordinate information in the modification parameters to which the matching time node belongs, and modifying the content of the area in the image according to the modification type in the description file.

[0166] The second operation includes: identifying the content to be modified in the image based on the tag information included in the description file; if the image is found to contain content to be modified, then modifying the identified content to be modified in the image according to the modification type in the description file.

[0167] In one embodiment of this application, based on the foregoing solution, it can also be configured as follows:

[0168] The second acquisition unit is configured to acquire the video file of the target video and play the video file if the description file of the target video does not exist in the content delivery network.

[0169] This application also provides a storage medium storing an instruction set, wherein the online video modification method disclosed in any of the above embodiments is executed when the instruction set is run.

[0170] This application also provides an electronic device, the structural schematic diagram of which is shown below. Figure 9 As shown, it specifically includes a memory 901 for storing at least one set of instructions; and a processor 902 for executing the set of instructions stored in the memory, by executing the online video modification method disclosed in any of the embodiments above.

[0171] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

[0172] While several specific implementation details are included in the foregoing discussion, these should not be construed as limiting the scope of the disclosure herein. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0173] The above description is merely a preferred embodiment disclosed in this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. A method for modifying online videos, characterized in that, Applied to the server side, the method includes: The video file of the target video in the content delivery network is taken offline; the target video is the online video to be modified, and the video file is obtained by preprocessing the video source file of the target video; Based on the pre-stored video source file of the target video, a description file is generated; the description file is used to record modification information of the content to be modified. The description file and the video file are processed for online access so that when the client receives a video playback request for the target video, it can modify the content to be modified in the video file according to the description file and play the modified video file. The step of generating a description file based on the pre-stored video source file of the target video includes: Obtain the modification requirements document; Based on the tag information in the modification requirement document, a recognition algorithm is used to determine whether there is content to be modified in each frame of the video source file. If it exists, the image containing the content to be modified in the video source file is identified as the target image, and the modification parameters of the content to be modified in the target image are obtained. The modification type in the modification requirement document and the modification parameters are used as the modification information. If it does not exist, the modification type and tag information in the modification requirement document will be used as the modification information; Based on the modified information, a description file is generated.

2. The method according to claim 1, characterized in that, The modification requirement document shall include at least the modification type and tag information; the tag information is used to describe the attributes of the content to be modified; the modification parameters shall include at least coordinate information and time nodes.

3. The method according to claim 1, characterized in that, After generating the description file based on the pre-stored video source file of the target video, the process further includes: Based on the description file, the content to be modified in the video source file is modified to obtain a new video source file; The new video source file is transcoded to obtain a transcoded video file; The transcoded video file is sliced ​​to obtain the target video file; The target video file is sent to the content delivery network so that the content delivery network can replace the re-uploaded video file with the target video file. The description file in the content delivery network is taken offline.

4. An online video editing device, characterized in that, Applied to a server, the device includes: The offline unit is used to remove the video file of the target video from the content delivery network; the target video is the online video to be modified, and the video file is obtained by preprocessing the video source file of the target video; The generation unit is used to generate a description file based on the pre-stored video source file of the target video; the description file is used to record modification information of the content to be modified; The online unit is used to process the description file and the video file online, so that when the client receives a video playback request for the target video, it can modify the content to be modified in the video file according to the description file and play the modified video file. The generation unit is specifically used for: Obtain the modification requirements document; Based on the tag information in the modification requirement document, a recognition algorithm is used to determine whether there is content to be modified in each frame of the video source file. If it exists, the image containing the content to be modified in the video source file is identified as the target image, and the modification parameters of the content to be modified in the target image are obtained. The modification type in the modification requirement document and the modification parameters are used as the modification information. If it does not exist, the modification type and tag information in the modification requirement document will be used as the modification information; Based on the modified information, a description file is generated.

5. A method for online video editing, characterized in that, Applied to a client, the method includes: In response to a video playback request for a target video, if the video file of the target video exists in the content delivery network (CDN), it is determined whether a description file for the target video exists in the CDN. The video file of the target video is obtained by preprocessing the video source file of the target video. The description file in the CDN is generated by the server based on the video source file of the online video to be modified. The description file is used to record modification information of the content to be modified. The process of the server generating the description file based on the video source file of the online video to be modified includes: obtaining a modification requirement document; based on the tag information in the modification requirement document, using a recognition algorithm, determining whether there is content to be modified in each frame of the video source file; if it exists, identifying the image in the video source file containing the content to be modified as the target image, and obtaining the modification parameters of the content to be modified in the target image, using the modification type in the modification requirement document and the modification parameters as the modification information; if it does not exist, using the modification type and tag information in the modification requirement document as the modification information; and generating a description file based on the modification information. If it exists, obtain the video file and description file of the target video; Based on the description file, the content to be modified in the video file is modified, and the modified video file is played.

6. The method according to claim 5, characterized in that, The description file includes at least one set of modification parameters and modification types, or includes tag information and modification types. The modification parameters at least include time nodes and coordinate information. Modifying the content to be modified in the video file based on the description file includes: The video file is decoded to obtain multiple frames of images arranged in playback order; If the description file includes modification parameters, then according to the modification parameters in the description file, the first operation is performed on each frame of the image in the playback order. If the description file does not include modification parameters, then according to the tag information in the description file, the second operation is performed on each frame of the image in the playback order. The first operation includes: determining whether there is a time node in the modification parameters included in the description file that matches the playback time node of the image; if so, determining the area of ​​the content to be modified in the image based on the coordinate information in the modification parameters to which the matching time node belongs, and modifying the content of the area in the image according to the modification type in the description file. The second operation includes: identifying the content to be modified in the image based on the tag information included in the description file; if the image is found to contain content to be modified, then modifying the identified content to be modified in the image according to the modification type in the description file.

7. The method according to claim 5, characterized in that, Also includes: If the description file of the target video does not exist in the content delivery network, then the video file of the target video is obtained and played.

8. An online video editing device, characterized in that, Applied to a client, the device includes: A judgment unit, in response to a video playback request for a target video, determines whether a description file for the target video exists in the content distribution network (CDN) if the video file of the target video exists therein. The video file of the target video is pre-processed based on the video source file of the target video. The description file in the CDN is generated by the server based on the video source file of the online video to be modified, and the description file records modification information of the content to be modified. The process by which the server generates the description file based on the video source file of the online video to be modified includes: obtaining a modification requirement document; determining, using a recognition algorithm, whether content to be modified exists in each frame of the video source file based on the tag information in the modification requirement document; if it exists, identifying the image in the video source file containing the content to be modified as the target image, and obtaining the modification parameters of the content to be modified in the target image, using the modification type in the modification requirement document and the modification parameters as the modification information; if it does not exist, using the modification type and tag information in the modification requirement document as the modification information; and generating a description file based on the modification information. The first acquisition unit is used to acquire the video file and description file of the target video if they exist. The first playback unit is used to modify the content to be modified in the video file according to the description file, and then play the modified video file.

9. A storage medium, characterized in that, The storage medium stores an instruction set, wherein when the instruction set is executed by a processor, it implements the online video modification method as described in any one of claims 1-3, or the online video modification method as described in any one of claims 5-7.

10. An electronic device, characterized in that, include: Memory, used to store at least one set of instructions; A processor is configured to execute a set of instructions stored in the memory, and to implement the online video modification method as described in any one of claims 1-3, or the online video modification method as described in any one of claims 5-7, by executing the set of instructions.

Citation Information

Patent Citations

  • Video playing method and device, equipment and medium

    CN109640173A