Browser video title editing method and device, storage medium and program product
By simulating and editing video titles in the browser, the title layout problem in video review is solved, the review efficiency and simplicity of operation are improved, and new videos that meet the standards are quickly generated.
Patent Information
- Application Number
- CN202510607450.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-06-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the video review process, the reviewers faced problems such as unreasonable text layout of the video title paragraph and errors in snippeting, which led to frequent downloading of video processing software and reprocessing of videos, which increased the threshold for use and consumed a lot of time and energy.
Provides a browser video title editing method, which simulates the original title currently displayed by receiving and playing the target video in the browser, and displays the simulated title in the preset area, allowing the reviewer to edit and preview the title in real time and generates the adjusted latest video.
Improves video auditing efficiency, reduces the operational complexity and time consumption of auditors, allows quick title correction work, and generates new target videos that meet standards.
Smart Images

Figure CN120128748A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of self-media technology, and in particular to a browser video title editing method, device, storage medium and program product. Background Art
[0002] In the process of video review, reviewers often face many problems. For example, the text layout of the title section in the video is unreasonable, and the word breaks and sentences are wrong. Once such problems occur, the video needs to be reprocessed.
[0003] However, traditional video editing tools usually require reviewers to download professional video processing software and obtain the original video files before they can perform operations. This undoubtedly increases the usage threshold for reviewers and greatly limits the possibility of real-time collaboration.
[0004] The current review process also consumes a lot of time and energy. When the reviewer finds problems with the title segment of a popular science video, the video will be rejected and the producer will be asked to modify it. After the producer receives the rejected video, he needs to use video processing tools (such as Jianying, etc.) to reprocess it, and upload it to the platform again after it is qualified for review. If there are still errors, this back-and-forth modification and review process may be repeated many times, which greatly consumes the time and energy of both parties. Summary of the invention
[0005] In view of this, the embodiments of the present disclosure provide a browser video title editing method, device, storage medium and program product, which can realize real-time editing and preview of the browser video title segment content. After the review is passed, the adjusted latest video can be synthesized, effectively improving the efficiency of video review.
[0006] In a first aspect, the embodiment of the present disclosure provides a method for editing a video title in a browser, which adopts the following technical solution: Receive and play a target video in any browser, simulate the original title currently displayed in the target video, and display the simulated title in a preset area, wherein the preset area at least completely covers the display area of the original title in the target video; When a preset condition is met, pausing the playing of the target video; By monitoring the editing event, the simulated title is modified to obtain a new simulated title; When receiving a preview instruction triggered by a reviewer, playing the target video based on the time node in the preview instruction, and synchronously displaying the new simulated title in the preset area; After the target video is reviewed, a new target video is obtained based on the new simulated title.
[0007] Optionally, simulating the original title currently displayed in the target video and displaying the simulated title in a preset area includes: The preset area is a title editing area. When receiving and playing the target video on any browser, create and hide the title editing area; When the preset condition is met, display the title editing area in the target video, and the displayed title editing area completely covers the display area of the original title in the target video; Extract the metadata of the original title, and based on the metadata, simulate the original title in the title editing area and display the simulated title.
[0008] Optionally, simulating the original title currently displayed in the target video and displaying the simulated title in a preset area includes: The preset area is a canvas. When receiving and playing the target video on any browser, create the canvas, and the canvas completely covers the display area of the target video; Clear all content in the canvas; Render all the frame content of the current video frame of the target video onto the canvas; Determine whether the current playback time of the target video is within the display time range of any original title of the target video; If so, the content displayed on the canvas includes a simulated title; If not, the content displayed on the canvas does not include a simulated title; When the target video plays to the next video frame, store the content in the canvas as a simulated video frame, and clear all content in the canvas again.
[0009] Optionally, simulating the original title currently displayed in the target video and displaying the simulated title in a preset area includes: The preset area is a canvas. When receiving and playing the target video on any browser, create the canvas, and the canvas completely covers the display area of the target video; Clear all content in the canvas; When the current playback time of the target video is within the display time range of any original title of the target video, render all the frame content of the current video frame of the target video onto the canvas, and the content displayed on the canvas includes a simulated title; When the target video plays to the next video frame, store the content in the canvas as a simulated video frame, and clear all content in the canvas again.
[0010] Optionally, the preset condition includes at least one of the following conditions: The current playing time of the target video is within the display time range of any original title of the target video; The display area of any original title is clicked.
[0011] Optionally, the modifying the simulated title by listening to the editing event to obtain a new simulated title includes: Obtaining the original string of the simulated title; By listening to the editing event, obtaining the current string generated by the reviewer's real-time modification of the simulated title; Obtaining the different characters between the original string and the current string; If the different characters conform to the preset verification rule, storing the current string; When the modification of the simulated title is completed, the latest stored current string is the new simulated title.
[0012] Optionally, the obtaining a new target video based on the new simulated title includes: Storing the new simulated title and recording the display time range of the new simulated title; Based on the display time range of the new simulated title, synchronizing the new simulated title to the target video to generate a new target video.
[0013] Optionally, the obtaining a new target video based on the new simulated title includes: After modifying the simulated title in the simulated video frame, re-storing the simulated video frame containing the new simulated title; Serializing and combining the stored simulated video frames according to the playing time sequence to generate a new target video.
[0014] Optionally, the obtaining a new target video based on the new simulated title includes: After modifying the simulated title in the simulated video frame, re-storing the simulated video frame containing the new simulated title; Recording the time stamps of the stored simulated video frames, and using the stored simulated video frames to replace the original video frames at the corresponding time points in the target video one by one according to the time stamps to generate a new target video.
[0015] Optionally, the browser video title editing method further includes: Obtaining a reference title set, where the reference title set includes all reference titles of the target video and the start appearance time of each reference title; When the current playback time of the target video is equal to the start appearance time of any reference title, display the reference title in a preset reference area.
[0016] In a second aspect, embodiments of the present disclosure further provide a browser video title editing system, which adopts the following technical solutions: A title simulation module, configured to receive and play the target video on any browser, simulate the original title currently displayed in the target video, and display the simulated title in a preset area, where the preset area at least completely covers the display area of the original title in the target video; A pause playback module, configured to pause the playback of the target video when a preset condition is met; A title modification module, configured to modify the simulated title by listening to an editing event to obtain a new simulated title; A synchronous display module, configured to play the target video based on the time node in the preview instruction when receiving a preview instruction triggered by an auditor, and synchronously display the new simulated title in the preset area; A new video acquisition module, configured to obtain a new target video based on the new simulated title after the target video is audited.
[0017] In a third aspect, embodiments of the present disclosure further provide a computer device, which adopts the following technical solutions: The computer device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the above browser video title editing methods.
[0018] In a fourth aspect, embodiments of the present disclosure further provide a computer-readable storage medium, which stores computer instructions for causing a computer to execute any one of the above browser video title editing methods.
[0019] In a fifth aspect, embodiments of the present disclosure further provide a computer program product, including computer programs / instructions, and when the computer programs / instructions are executed by a processor, the steps of any one of the above methods are implemented.
[0020] The browser video title editing method provided by the embodiments of the present disclosure automatically simulates the original title currently displayed when playing a target video in the browser, and displays the simulated title in a preset area. This simulated title can be directly modified by the reviewer. The preset area should at least completely cover the display position of the original title in the target video, so that when the reviewer edits the simulated title, they will not be interfered by the original title and can focus more on the editing work. Moreover, throughout the review process, operations are always centered around the simulated title, and the original title remains unaffected. Based on this, the reviewer can modify and improve the simulated title multiple times according to actual needs, and flexibly adjust the title content to achieve the best effect. When preset conditions are met, the playback of the target video is paused, which can provide a stable editing environment for the reviewer. After the editing is completed, in response to the preview instruction triggered by the reviewer, the target video is played at the time node required by the reviewer, and the new simulated title is synchronously displayed. The reviewer can intuitively see the actual effect of the new simulated title during the video playback. This preview function helps the reviewer promptly discover whether the new simulated title is appropriate. If it is still inappropriate, the reviewer can modify and improve the simulated title multiple times according to actual needs, and flexibly adjust the title content to achieve the best effect. In this way, the reviewer can quickly complete the correction of all titles. After the review of the target video is completed, based on the new simulated title, a target video containing the new title is generated.
[0021] The above description is only an overview of the technical solution of the present disclosure. In order to understand the technical means of the present disclosure more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features, and advantages of the present disclosure more obvious and understandable, the following preferred embodiments are specifically given and described in detail in conjunction with the accompanying drawings as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the accompanying drawings required for use in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0023] Figure 1 It is a flowchart of the browser video title editing method provided by the embodiments of the present disclosure; Figure 2 It is the first flowchart of the video title simulation method provided by the embodiments of the present disclosure; Figure 3 It is the second flowchart of the video title simulation method provided by the embodiments of the present disclosure; Figure 4The third process schematic diagram of the video title simulation method provided by the embodiments of the present disclosure; Figure 5 The process schematic diagram of the simulated title update method provided by the embodiments of the present disclosure; Figure 6 The principle block diagram of the browser video title editing system provided by the embodiments of the present disclosure; Figure 7 The structural schematic diagram of a computer device provided by the embodiments of the present disclosure. Detailed implementation manners
[0024] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0025] It should be clear that the following uses specific specific examples to illustrate the implementation manners of the present disclosure, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The present disclosure can also be implemented or applied through other different specific implementation manners, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present disclosure without creative efforts belong to the scope of protection of the present disclosure.
[0026] It should also be noted that the following describes various aspects of the embodiments within the scope of the appended claims. It should be obvious that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is illustrative only. Based on the present disclosure, those skilled in the art should understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, this device and / or practice this method can be implemented using other structures and / or functions in addition to one or more of the aspects described herein.
[0027] It also needs to be noted that the drawings provided in the following embodiments only illustrate the basic concept of the present disclosure in a schematic manner, and only show the components related to the present disclosure in the drawings, rather than being drawn according to the number, shape and size of the components in actual implementation. The type, quantity and proportion of each component in its actual implementation can be an arbitrary change, and the component layout type may also be more complex.
[0028] In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0029] Referring to Figure 1 , the present disclosure provides a method for editing a browser video title, including the following steps: S1: Receive and play a target video on any browser, simulate the original title currently displayed in the target video, and display the simulated title in a preset area, where the preset area at least completely covers the display area of the original title in the target video; S2: Pause the playback of the target video when a preset condition is met; S3: Modify the simulated title by listening for an edit event to obtain a new simulated title; S4: When a preview instruction triggered by a reviewer is received, play the target video based on the time node in the preview instruction, and synchronously display the new simulated title in the preset area; S5: After the target video is reviewed, obtain a new target video based on the new simulated title.
[0030] In the method for editing a browser video title provided by the present disclosure, when playing a target video on a browser, the original title currently displayed is automatically simulated, and the simulated title is displayed in a preset area. This simulated title can be directly modified by the reviewer. The preset area at least completely covers the display position of the original title in the target video, so that when the reviewer edits the simulated title, they will not be interfered by the original title and can focus more on the editing work. Moreover, throughout the review process, operations are always centered around the simulated title, and the original title remains unaffected. Based on this, the reviewer can modify and improve the simulated title multiple times according to actual needs, and flexibly adjust the title content to achieve the best effect.
[0031] Pausing the playback of the target video when a preset condition is met can provide a stable editing environment for the reviewer. After the editing is completed, in response to the preview instruction triggered by the reviewer, the target video is played at the time node required by the reviewer, and the new simulated title is synchronously displayed. The reviewer can intuitively see the actual effect of the new simulated title during the video playback. This preview function helps the reviewer promptly discover whether the new simulated title is appropriate. If it is still not appropriate, the reviewer can modify and improve the simulated title multiple times according to actual needs, and flexibly adjust the title content to achieve the best effect. In this way, the reviewer can quickly complete the correction of all titles. After the target video is reviewed, a new target video containing the new title is generated based on the new simulated title.
[0032] In summary, this method has strong compatibility and can realize real-time editing, adjustment and display of the content of the video title segment on any browser, and can synthesize new videos, which greatly facilitates the reviewers to calibrate and modify the content of the video title segment. It not only avoids the tediousness of repeated modification by the producers, but also reduces the workload of repeated review by the reviewers, and significantly improves the review efficiency.
[0033] In S1, after the video is produced, the producer uniformly delivers it to the reviewer for review. After receiving the video file, the reviewer can open the video file in any browser that supports video playback to view it. At this time, the video file is the target video in the pending review state.
[0034] The main requirement of the reviewer is to review whether the title in the target video has reasonable emotional expression, line breaks, etc. To facilitate the reviewer to directly modify the non-compliant title in the browser while viewing the video playback, the browser video title editing method provided by the present disclosure enables the reviewer to directly modify the simulated title by simulating the video title, thereby realizing efficient and convenient review and modification operations.
[0035] In the first embodiment, the preset area is the title editing area, and the simulation of the video title is completed by using the title editing area. Referring to Figure 2 the first process schematic diagram of the video title simulation method shown, "simulating the original title currently displayed in the target video and displaying the simulated title in the preset area" includes the following steps: S11: While receiving and playing the target video in any browser, create and hide the title editing area; S12: When the preset conditions are met, display the title editing area in the target video, and the displayed title editing area completely covers the display area of the original title in the target video; S13: Extract the metadata of the original title, and based on the metadata, simulate the original title in the title editing area and display the simulated title.
[0036] In S11, a div element with the contenteditable (editable) attribute is created in the browser page. This element is for the reviewer to directly edit the content of the title segment. The area where this element is located is the title editing area. The title editing area is overlaid on the target video to completely cover the title area in the original video. In the initial state, by controlling the value of the editTitleFlag (editing mode control variable), the title editing area is set to be hidden. At the same time, a style binding function is implemented for this editing area. By binding the titleStyleCss (title style control variable), the title style is dynamically controlled. This function corresponds to the adaptive title style. The adaptive title style specifically means listening to the changes of the browser window and dynamically adjusting the font size, line height, spacing, etc. of the title according to the width of the video container, so as to ensure that the title simulated in the title editing area later can maintain the same visual effect as the original title in the target video on different screen sizes, and realize the simulation and restoration of the original video title style.
[0037] In S12 and S13, the preset conditions include at least one of the following conditions: the current playback time of the target video is within the display time range of any original title of the target video; the display area of any original title is clicked. When either of these two conditions is met, the hidden title editing area is displayed for the reviewer to use.
[0038] Among them, when the browser loads the target video, the display time range of the original title is determined. Each original title is associated with a set of time parameters in seconds, namely the start time and the end time. These time data are recorded and stored in the system's data structure, such as an array or an object. When the original title is re-edited, the saved time markers will not change, and only the text content of the original title is updated. During the playback of the target video, the current playback time is continuously monitored. When the current playback time reaches the start time of a certain original title, it means that the reviewer needs to review this title at this time.
[0039] Among them, the click on the display area of any original title is a user interaction event, indicating that the reviewer clicks on the area where the original title is displayed in the video playback interface. This operation means that the reviewer needs to review this title.
[0040] Therefore, metadata of the original title being displayed in the target video is extracted, such as style attributes like font, font size, color, line height, spacing, etc. Based on this metadata, the original title is rendered and displayed in the title editing area. The simulated title in the title editing area will overlay the original title of the target video, so that when the target video is played, the simulated title can be displayed synchronously without affecting the reviewer's viewing of the target video. When the playback time exceeds the end time of the original title, the title editing area is hidden again. Since the time markers associated with the original title remain unchanged during the editing process, the re-edited title can be played and displayed at the originally correct time. When the target video starts playing a new original title, the new original title is re-rendered to the title editing area, thereby updating the title content in this editing area. In this way, it can be ensured that the original title is always mapped to the title editing area located on the upper layer.
[0041] In the second embodiment, the preset area is a canvas. When simulating the target video frame by frame through the canvas, the original title of the target video is also included. Refer to Figure 3 the second process schematic diagram of the video title simulation method shown, "simulate the original title currently displayed in the target video and display the simulated title in the preset area" includes the following steps: S14: When receiving and playing the target video on any browser, create a canvas that completely covers the display area of the target video; S15: Clear all the content in the canvas; S16: Render all the frame content of the current video frame of the target video onto the canvas; S17: Determine whether the current playback time of the target video is within the display time range of any original title of the target video; if so, execute S18; if not, execute S19; S18: The content displayed on the canvas includes the simulated title; S19: The content displayed on the canvas does not include the simulated title; S110: When the target video plays to the next video frame, store the content in the canvas as a simulated video frame and clear all the content in the canvas again.
[0042] In S14, by creating a canvas (Canvas) with the same size as the display area of the target video and covering it on the video playback area, when the target video is played subsequently, what the reviewer sees is the content displayed on the canvas.
[0043] In S15, obtain the context of the Canvas element and call the clearRect method to clear all the content on the canvas to ensure that the canvas is clean before each drawing.
[0044] In S16, during the playback of the target video, the video DOM element corresponding to the current video frame is cached, and the drawImage method is used to draw the complete picture content of the current video frame onto the canvas for rendering. If there is already a title in the picture, the fillText method is used to draw the title content on the canvas, and at the same time, according to the width and height of the canvas and the preset font size, color and other information, the style of the title content is set, thus completing the simulation of the current video frame. To ensure smooth display of the title content and not overly consume resources, during the playback of the target video, the video frame processing method requestVideoFrameCallback is used for recursive call to achieve frame-by-frame update of the video.
[0045] In S17 - S110, by judging whether the current playback time is within the display time range of any original title of the target video, it is determined whether the current video frame contains an original title. If the current video frame contains an original title, the content drawn on the canvas will also include the corresponding title, and this title is the simulated title. On the contrary, if the current video frame does not contain an original title, the simulated title will not be included in the content drawn on the canvas. Whether the content drawn on the canvas contains the simulated title or not, when playing to the next video frame, the content in the canvas needs to be extracted and stored as a simulated video frame. Subsequently, all the content in the canvas is cleared to continue simulating the next video frame until the target video is completely played.
[0046] For each video frame, only during the first playback, the corresponding simulated video frame will be drawn through the canvas. If it is played repeatedly or previewed later, the simulated video frame drawn during the first round of playback is shown, but this simulated video frame supports modification by the reviewer. After the modification is completed, the simulated video frame is updated. By this method, during the playback of the target video, the currently played video frame is simulated in real time, and the simulated video frame is superimposed on the actual playback picture of the target video, so that the reviewer can modify the title in the simulated video frame while watching the video.
[0047] In the third embodiment, the preset area is the canvas, and only the video frames of the target video involving the original title are simulated using the canvas. Refer to Figure 4 The third flow diagram of the video title simulation method shown, "simulate the original title currently displayed in the target video and display the simulated title in the preset area" includes the following steps: S111: When receiving and playing the target video on any browser, create a canvas that completely covers the display area of the target video; S112: Clear all the content in the canvas; S113: When the current playing time of the target video is within the display time range of any original title of the target video, render all the picture contents of the current video frame of the target video onto the canvas, and the content displayed on the canvas includes the simulated title; S114: When the target video plays to the next video frame, store the content in the canvas as a simulated video frame, and clear all the content in the canvas again.
[0048] In the third embodiment, if the current video frame contains an original title, simulate it through the canvas and overlay the simulation result on the actual playing screen so that the reviewer can modify the title. On the contrary, if the current video frame does not contain an original title, skip the simulation step and directly continue to play the next video frame. By this method, during the playback of the target video, only when the current video frame contains an original title, the current video frame is simulated through the canvas, and there is no need to simulate all video frames.
[0049] In S2, when the current playing time of the target video is within the display time range of any original title of the target video or any display area of the original title is clicked, automatically pause the playback of the target video. This trigger mechanism facilitates the reviewer to focus on the currently displayed simulated title in the preset area, so as to conduct a detailed review and necessary modifications.
[0050] In S3, the reviewer can directly modify the simulated title within the preset area. After the modification is completed, a new simulated title is obtained.
[0051] In practical applications, clear title modification criteria are usually formulated for reviewers. Therefore, the browser video title editing method of the present disclosure also provides a solution to standardize the title modification by reviewers to ensure that the title modification complies with the established criteria. Referring to Figure 5 the flowchart of the simulated title update method shown, "modifying the simulated title by listening to the edit event and obtaining a new simulated title" includes the following steps: S31: Obtain the original string of the simulated title; S32: By listening to the edit event, obtain the current string generated by the reviewer's real-time modification of the simulated title; S33: Obtain the different characters between the original string and the current string; S34: Determine whether the different characters conform to the preset verification rules; if so, execute S35; if not, execute S36; S35: Store the current string; S36: Send a prompt and restore the simulated title to the original string; S37: When the modification of the simulated title is completed, the latest stored current string is the new simulated title.
[0052] In the above solution, by listening to the @input event, the modifications made by the reviewer to the simulated title are monitored in real time. Each modification or operation such as entering a new character by the reviewer will generate a new current string. By calling the getDiffWords method, the different characters between the current string and the original string can be quickly extracted.
[0053] Among them, the specific method for obtaining different characters is as follows: create an empty list (or a preset array) to store the different characters found during the comparison of the two strings. Compare the lengths of the original string and the current string. The shorter one is the first string, and the longer one is the second string. Initialize two index variables to record the current comparison positions of the first string and the second string respectively, and set their initial values to 0. Use a loop (such as a while loop) to traverse the first string and the second string simultaneously. The loop condition is that neither index exceeds the length range of the corresponding string. If the characters at the current position of the first string and the second string are the same, increment both indexes by 1 and continue to compare the characters at the next position. If the characters at the current position of the two strings are different, add the character at the current position of the second string to the list used to store different characters, and then only increment the index of the second string by 1 and continue the subsequent comparison. When the traversal of the first string is completed (i.e., the index of the first string is equal to its length), for the remaining characters in the second string that have not participated in the comparison, check whether each character appears in the first string in turn. If a certain character does not appear in the first string, add this character to the list storing different characters. Convert the list storing different characters into a string and return this string containing all different characters.
[0054] Among them, the preset verification rules can be formulated according to actual needs. For example, the preset verification rules include illegal character verification and line break limit verification. Among them, illegal character verification is used to check whether there are other characters in the different characters except punctuation marks and line breaks, and line break limit verification is used to check whether the title exceeds the display boundary of the target video. In this way, it is restricted that the reviewer can only modify, delete or add punctuation marks and line breaks in the title content, but cannot change other original characters.
[0055] Furthermore, if the different characters are only line breaks, the handleResize method is triggered to recalculate the font size, line height, spacing, etc. of the simulated title to adapt to the new layout.
[0056] In S4, the reviewer triggers a preview instruction by clicking the "Preview" button or the playback progress bar, etc. The instruction contains the start playback time of the new simulated title or the playback time specified by the reviewer. The browser starts playing the target video from this time node. Meanwhile, the new simulated title will also be synchronously displayed in the preset area for the reviewer to view the modified title content.
[0057] Furthermore, set a shortcut key in the browser interface or the preset area. When the reviewer clicks this shortcut key, it automatically jumps to the video position where the original title is played, and the corresponding simulated title will also be synchronously displayed in the preset area. In addition, construct a timeline in the browser interface. According to the start time of each original title in the target video, mark the playback nodes on the timeline. When the reviewer clicks any one of the playback nodes, it automatically jumps to the corresponding playback position of the target video, facilitating the reviewer to quickly view the title.
[0058] Among them, the method for the preset area to display the new simulated title is as follows: obtain the title array through the getTitleList() method. This array stores the information related to the new simulated title. The new simulated title may be displayed in multiple lines, and each line is presented in the form of an array. Use the dynamic v-for directive to traverse the title list and record the number of titles in each line. During the display process, style and display control are required. Dynamically adjust the title style by binding titleStyleCss, and dynamically adjust the font size, line height, and spacing of the title according to the size of the video container. At the same time, set a method to monitor the change of the window size and update the title style in real time. These styles include but are not limited to font size, color, line height, letter spacing, etc., to ensure that the title style remains unchanged during the simulation process. Control the display of the new simulated title through showTitleFlag. In the title rendering link, dynamically generate multiple title elements based on the title array obtained by traversing. In terms of animation display, ensure that the title animation is consistent with the video animation. Calculate the number of characters already displayed according to the current video playback time and the start time of the new simulated title. You can use a timer combined with the video playback rate to simulate the typewriter effect and fill the new simulated title into the preset area character by character, or adopt the display effect of the original title to display the new simulated title. Split the title content into multiple lines using the line break character \n and dynamically fill the content in the corresponding text nodes of each line. Use a timer and recursive calls to ensure that the title content display process is smooth and does not occupy too many resources.
[0059] In S5, through the above steps, the reviewer can directly modify the title in the browser and preview the modified effect. When the reviewer has completed the review of all titles in the target video, trigger an instruction indicating that the review is completed by clicking the "Complete" button or voice control, etc. Based on this instruction, a new target video with titles meeting the standards is generated.
[0060] For different video title simulation methods in S1, the subsequent methods for obtaining new target videos are also correspondingly different. When the preset area is the title editing area, there are multiple implementation methods for obtaining a new target video. The following will be exemplarily described through three embodiments, and each embodiment corresponds to one implementation method.
[0061] In the first embodiment, store the new simulated title and record the display time range of the new simulated title; based on the display time range of the new simulated title, synchronize the new simulated title to the target video to generate a new target video. This direct synchronization method has a simple logic. It can directly record the title and the display time range and then synchronize them to the video without complex intermediate steps. Moreover, it can accurately control the specific position and time of the modified title displayed in the target video, meeting the scenarios with high-precision requirements for title display.
[0062] In the second embodiment, create a subtitle file template. The subtitle file template contains at least one title placeholder and the time information of the title placeholder; by comparing the display time range of the new simulated title with the time information in the subtitle file template, determine the target placeholder from at least one title placeholder; replace the content of the target placeholder with the new simulated title to generate a subtitle file, and embed the subtitle file into the target video to form a new target video. Herein, the title placeholder refers to a symbol or text mark used to represent the actual title content, which plays a temporary substitution role to facilitate replacing the specific title content according to the actual modification requirements in subsequent processing. The time information of the title placeholder refers to the time range corresponding to the title placeholder and specifying the time when the title is displayed in the video. This subtitle template replacement method, after presetting the subtitle file template, only needs to replace the placeholder after modifying the simulated title, with high efficiency when processing multiple title modifications, saving time and workload. The subtitle file format is universal, and most video players and processing tools support it, facilitating operations and sharing among different platforms. This method supports sending the generated subtitle file to the production personnel of the target video, and the production personnel can use professional tools to generate a new target video, or it also supports directly generating a new target video based on the subtitle file at the backend without the need for reviewers to download professional tools.
[0063] In the third embodiment, based on the display time range of the new simulated title, the title video segment and the non-title video segment are split from the target video; the title video segment is rendered frame by frame on the canvas, and the title content therein is modified based on the new simulated title to obtain the modified title video segment; the modified title video segment is combined with the non-title video segment to form a new target video. This video segmentation processing method can perform frame-by-frame processing on the title video segment to achieve rich title effects and animations, ensure that the modified title is perfectly integrated with the main picture of the original video, and avoid situations that affect the viewing experience, such as the title not matching the picture style, the display position being unreasonable, or the title covering the picture content.
[0064] In the case where the preset area is the canvas and the target video is simulated frame by frame, the method of "obtaining a new target video based on the new simulated title" is as follows: after modifying the simulated title in the simulated video frame, the simulated video frame containing the new simulated title is stored again; the stored simulated video frames are serially combined according to the playback time sequence to generate a new target video. This method dynamically updates the simulated video frames in response to the modification of the title by the reviewer, and after the review is completed, recombines the simulated video frames into a new target video to ensure the smoothness during the playback of the new target video.
[0065] When the preset area is the canvas and only the video frames of the target video related to the original title are simulated, the method of "obtaining a new target video based on the new simulated title" is as follows: After modifying the simulated title in the simulated video frames, store the simulated video frames containing the new simulated title again; record the timestamps of the stored simulated video frames, and according to the timestamps, use the stored simulated video frames to replace the original video frames at the corresponding time points in the target video one by one to generate a new target video. On the basis of this scheme, judge the association method between the original title and the video frames. If the original title exists independently, that is, the original title is presented in the form of an independent track, an independent rendering layer, etc., rather than being embedded in the video frames, it means that the original title itself is an independent data object, and each video frame displays the original title by referring to this independent data object. Correspondingly, each simulated video frame will also refer to this independent data object. In this case, when modifying the simulated title in any simulated video frame, the modification will be automatically synchronized to all other simulated video frames that refer to this simulated title. After the modification is completed, store all the simulated video frames with the updated simulated title uniformly. During the storage process, accurately record the timestamps of these simulated video frames on the video timeline for subsequent positioning. According to the recorded timestamps, replace the original video frames at the corresponding time points in the target video with the stored simulated video frames one by one in order. Since the title has been updated synchronously, the titles at all relevant positions in the new target video after replacement are the same new title, and the coherence and consistency of the title can be ensured without additional adjustment. This scheme realizes one modification and multiple synchronous updates through an independent title data object, which can greatly improve the title modification efficiency and reduce the manual verification cost. Moreover, since the simulated video frames simulate the title by referring to the independent data object of the original title in the target video, during preview, the reviewer does not need to check the modification of the title frame by frame, and the browser will present the overall modified effect uniformly.
[0066] If the original title is embedded in the video frame, that is, the original title becomes part of the video frame image data, it means that the titles of each video frame are independent of each other. After modifying the simulated title in the simulated video frame, based on the display time range of the new simulated title, synchronously modify the simulated titles of the remaining simulated video frames within this display time range. After the modification is completed, re-store the simulated video frames containing the new simulated titles, and accurately record the timestamps of these simulated video frames on the video timeline. According to the recorded timestamps, sequentially replace the original video frames at the corresponding time points in the target video with the stored simulated video frames one by one. This scheme for generating a new target video can accurately modify each video frame with an independently embedded title, flexibly meet the personalized modification requirements of different video frame titles, and make the title presentation of the new target video conform to diverse expectations. Since after modifying the simulated title in the simulated video frame, based on the display time range of the new simulated title, synchronously modify the simulated titles of the remaining simulated video frames within this display time range, ensuring the consistency within the corresponding time range on the timeline after the title modification. Therefore, when previewing, the browser can still uniformly present the modified overall effect.
[0067] Optionally, obtain a reference title set, which includes all reference titles of the target video and the start appearance time of each reference title; when the current playback time of the target video is equal to the start appearance time of any reference title, display the reference title in a preset reference area. Among them, the reference title set can be sent by the production staff of the target video or extracted from pre-prepared video materials. For the target video, different original titles may be played at different stages. By displaying the current required reference title in the reference area, it is convenient for the review personnel to conduct reviews based on the reference title. At the same time, when the current playback time of the target video is equal to the start appearance time of any reference title, it is possible to automatically correct typos in the original title according to the reference title.
[0068] In summary, by using the contenteditable attribute and the canvas, the method realizes the online editing of the target video, effectively reducing the workload and time cost of preview. The reviewer can quickly and intuitively see the rendering effect of the title modification in the whole video, timely evaluate whether the modification meets the expectations, and can quickly modify it again if not satisfied. For example, in a long science popularization video, if you want to modify the unified title, you can immediately see the complete preview effect of the synchronous update of all relevant frame titles after the modification, without waiting for frame-by-frame rendering or manually switching to view. To ensure the animation smoothness, you can also use requestAnimationFrame to replace the traditional timer. When the video pauses or the title segment ends, clear the relevant timer and animation frames to avoid resource waste, and use the browser video frame operation method requestVideoFrameCallback to replace listening to video events to achieve performance optimization.
[0069] Referring to Figure 6 , the present disclosure provides a browser video title editing system, including: A title simulation module 101, configured to receive and play the target video on any browser, simulate the original title currently displayed in the target video, and display the simulated title in a preset area, where the preset area at least completely covers the display area of the original title in the target video; A pause playback module 102, configured to pause the playback of the target video when a preset condition is met; A title modification module 103, configured to modify the simulated title by listening to the editing event to obtain a new simulated title; A synchronous display module 104, configured to play the target video based on the time node in the preview instruction when receiving the preview instruction triggered by the reviewer, and synchronously display the new simulated title in the preset area; A new video acquisition module 105, configured to obtain a new target video based on the new simulated title after the review of the target video is completed.
[0070] The various change methods and specific examples in the above-provided browser video title editing method are equally applicable to the browser video title editing system provided by the present disclosure. Through the foregoing detailed description of the browser video title editing method, those skilled in the art can clearly know the implementation method of the browser video title editing system. For the sake of simplicity of the specification, it will not be elaborated herein.
[0071] A computer device according to an embodiment of the present disclosure includes a memory and a processor. The memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0072] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the computer device to perform desired functions. In an embodiment of the present disclosure, the processor is used to run the computer-readable instructions stored in the memory, so that the computer device executes all or part of the steps of the browser video title editing method according to the foregoing embodiments of the present disclosure.
[0073] Those skilled in the art should understand that, in order to solve the technical problem of how to obtain good user experience effects, well-known structures such as communication buses and interfaces may also be included in this embodiment, and these well-known structures should also be included in the protection scope of the present disclosure.
[0074] As Figure 7 FIG. is a schematic structural diagram of a computer device provided by an embodiment of the present disclosure. It shows a schematic structural diagram of a computer device suitable for implementing the computer device in the embodiments of the present disclosure. Figure 7 The shown computer device is only an example and should not bring any limitations to the functions and usage scope of the embodiments of the present disclosure.
[0075] As Figure 7 As shown, the computer device may include a processor (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer device are also stored. The processor, ROM, and RAM are connected to each other through a bus. An input / output (I / O) interface is also connected to the bus.
[0076] Generally, the following devices may be connected to the I / O interface: an input device including, for example, a sensor or a visual information acquisition device, etc.; an output device including, for example, a display screen, etc.; a storage device including, for example, a magnetic tape, a hard disk, etc.; and a communication device. The communication device may allow the computer device to communicate wirelessly or wiredly with other devices (such as edge computing devices) to exchange data. Although Figure 7A computer device with various devices is shown, but it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.
[0077] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processor, all or part of the steps of the browser video title editing method according to the embodiments of the present disclosure are executed.
[0078] For a detailed description of this embodiment, reference can be made to the corresponding descriptions in the foregoing embodiments, and details will not be repeated here.
[0079] A computer-readable storage medium according to an embodiment of the present disclosure stores non-temporary computer-readable instructions. When the non-temporary computer-readable instructions are run by a processor, all or part of the steps of the browser video title editing methods according to the foregoing embodiments of the present disclosure are executed.
[0080] The above-mentioned computer-readable storage medium includes but is not limited to: optical storage media (such as CD-ROMs and DVDs), magneto-optical storage media (such as MOs), magnetic storage media (such as magnetic tapes or external hard drives), media with built-in rewritable non-volatile memories (such as memory cards), and media with built-in ROMs (such as ROM cartridges).
[0081] For a detailed description of this embodiment, reference can be made to the corresponding descriptions in the foregoing embodiments, and details will not be repeated here.
[0082] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of the present disclosure. In addition, the above-mentioned specific details are only for illustrative and easy-to-understand purposes, and not for limitation. The above details do not limit the present disclosure to necessarily adopt the above specific details for implementation.
[0083] In this disclosure, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. The block diagrams of devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and do not intend to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any way. Words such as "including", "comprising", "having", etc. are open-ended words, meaning "including but not limited to", and can be used interchangeably with each other. The words "or" and "and" used herein refer to the word "and / or", and can be used interchangeably with it, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0084] In addition, as used herein, "or" in the listing of items starting with "at least one" indicates a disjunctive listing, so that for example, the listing of "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Further, the term "exemplary" does not mean that the examples described are preferred or better than other examples.
[0085] It should also be noted that in the systems and methods of this disclosure, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of this disclosure.
[0086] Various changes, substitutions, and alterations to the technologies described herein can be made without departing from the teachings defined by the appended claims. In addition, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, compositions of events, means, methods, and acts described above. Current or later-developed processes, machines, manufactures, compositions of events, means, methods, or acts that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Thus, the appended claims include such processes, machines, manufactures, compositions of events, means, methods, or acts within their scope.
[0087] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
[0088] The foregoing description has been presented for purposes of illustration and description. In addition, this description is not intended to limit embodiments of the present disclosure to the form disclosed herein. Although several example aspects and embodiments have been discussed above, those skilled in the art will recognize some of their variations, modifications, alterations, additions, and subcombinations.
Claims
1. A browser video title editing method, characterized in that: include: Receive and play a target video in any browser, simulate the original title currently displayed in the target video, and display the simulated title in a preset area, wherein the preset area at least completely covers the display area of the original title in the target video; When a preset condition is met, pausing the playing of the target video; By monitoring the editing event, the simulated title is modified to obtain a new simulated title; When receiving a preview instruction triggered by a reviewer, playing the target video based on the time node in the preview instruction, and synchronously displaying the new simulated title in the preset area; After the target video is reviewed, a new target video is obtained based on the new simulated title.
2. The browser video title editing method according to claim 1, characterized in that: The simulating the original title currently displayed by the target video and displaying the simulated title in a preset area includes: The preset area is a title editing area, and when receiving and playing the target video in any browser, the title editing area is created and hidden; When the preset condition is met, the title editing area is displayed in the target video, and the displayed title editing area completely covers the display area of the original title in the target video; Metadata of the original title is extracted, the original title is simulated in the title editing area based on the metadata, and the simulated title is displayed.
3. The browser video title editing method according to claim 1, characterized in that: The simulating the original title currently displayed by the target video and displaying the simulated title in a preset area includes: The preset area is a canvas, and when a target video is received and played in any browser, the canvas is created, and the canvas completely covers the display area of the target video; Clear all contents of said canvas; Rendering all screen contents of the current video frame of the target video into the canvas; Determine whether the current playback time of the target video is within the display time range of any original title of the target video; If so, the content displayed on the canvas includes a simulated title; If not, the content displayed on the canvas does not include the simulated title; When the target video is played to the next video frame, the content in the canvas is stored as a simulated video frame, and all the content in the canvas is cleared again.
4. The browser video title editing method according to claim 1, characterized in that: The simulating the original title currently displayed by the target video and displaying the simulated title in a preset area includes: The preset area is a canvas, and when a target video is received and played in any browser, the canvas is created, and the canvas completely covers the display area of the target video; Clear all contents of said canvas; When the current playback time of the target video is within the display time range of any original title of the target video, all screen contents of the current video frame of the target video are rendered into the canvas, and the contents displayed on the canvas include the simulated title; When the target video is played to the next video frame, the content in the canvas is stored as a simulated video frame, and all the content in the canvas is cleared again.
5. The browser video title editing method according to claim 1, characterized in that: The preset condition includes at least one of the following conditions: The current play time of the target video is within the display time range of any original title of the target video; Any area of the original title display is clicked.
6. The browser video title editing method according to any one of claims 1 to 4, characterized in that: The step of modifying the simulated title by monitoring the edit event and obtaining a new simulated title includes: Get the original character string of the simulated title; By monitoring the editing event, the current character string generated by the auditor modifying the simulated title in real time is obtained; Get the difference characters between the original string and the current string; If the difference characters meet the preset verification rules, storing the current character string; When the modification of the simulated title is completed, the latest stored current character string is the new simulated title.
7. The browser video title editing method according to claim 2, characterized in that: The step of obtaining a new target video based on the new simulated title comprises: Storing the new simulated title and recording the display time range of the new simulated title; Based on the display time range of the new simulation title, the new simulation title is synchronized to the target video to generate a new target video.
8. The method for editing a browser video title according to claim 3, characterized in that: The step of obtaining a new target video based on the new simulated title comprises: After modifying the analog title in the analog video frame, re-storing the analog video frame containing the new analog title; The stored analog video frames are serialized and combined according to the playback timing to generate a new target video.
9. The browser video title editing method according to claim 4, characterized in that: The step of obtaining a new target video based on the new simulated title comprises: After modifying the analog title in the analog video frame, re-storing the analog video frame containing the new analog title; The timestamps of the stored analog video frames are recorded, and according to the timestamps, the original video frames at the corresponding time points in the target video are replaced one by one with the stored analog video frames to generate a new target video.
10. The browser video title editing method according to claim 1, characterized in that: Also includes: Acquire a reference title set, wherein the reference title set includes all reference titles of the target video and a start appearance time of each reference title; When the current playing time of the target video is equal to the starting appearance time of any reference title, the reference title is displayed in a preset reference area.
11. A computer device, characterized in that: The computer device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the browser video title editing method described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the browser video title editing method described in any one of claims 1-10.
13. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
Citation Information
Patent Citations
Subtitle editing method and device and electronic equipment
CN111970577A
Video recording method, device and equipment and readable storage medium
CN112752047A
Playing control method and device for interactive video in browser page and server
CN113259752A
Page interaction processing method and device, equipment and storage medium
CN118377409A
Video editing method and device, equipment and medium
CN119729090A