Media data editing method and apparatus, electronic device and storage medium
By displaying the original template and the first editing window in the interactive page and switching to the second editing window to edit the attributes of the target element, the problems of editing complexity and inefficiency in the prior art are solved, and more efficient media data editing is achieved.
Patent Information
- Application Number
- PCT/CN2025/077337
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-19
- Filing Date
- 2025-02-14
- Publication Date
- 2025-08-28
AI Technical Summary
The way of editing media data in the prior art is complex, requiring users to have a certain reserve of editing knowledge, resulting in low editing efficiency and a lot of time.
The original template and the first edit window are displayed through the interactive page, switch to the second edit window to include a set of candidate edit items of the target element, update the target edit items according to the set attribute values, and generate target media data based on the target template.
It improves the editing efficiency of media data, reduces the difficulty of creation, enables users to edit media data more intuitively, and simplifies the template editing process.
Smart Images

Figure CN2025077337_28082025_PF_FP_ABST
Abstract
Description
Method, device, electronic device and storage medium for editing media data
[0001] This application claims priority to Chinese Patent Application No. 202410186133.6 filed on February 19, 2024, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0002] Embodiments of the present disclosure relate to a method, device, electronic device, and storage medium for editing media data. Background Art
[0003] With the development of Internet technology, sharing self-created media data on social platforms has become increasingly popular. For example, users can publish short videos they edited on short video platforms.
[0004] Currently, editing media data is complex and requires users to have a certain level of editing knowledge. Using current editing methods to create media data that meets expectations often takes a lot of time to produce, resulting in low editing efficiency. Summary of the Invention
[0005] The present disclosure provides a method, device, electronic device, and storage medium for editing media data, which can improve editing efficiency.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for editing media data, comprising:
[0007] In response to a template selection event in an interactive page, displaying an original template and a first editing window through the interactive page, wherein the first editing window includes candidate elements in the original template;
[0008] In response to an interaction event for a target element in the interaction page, switching a first editing window in the interaction page to a second editing window, wherein the second editing window includes a set of candidate editing items for the target element, wherein the candidate editing items in the set of candidate editing items are used to edit attributes of the target element;
[0009] In response to a setting event for the candidate edit item set, updating a target edit item in the second edit window according to the set attribute value, and updating a target element in the original template according to the attribute value to obtain a target template;
[0010] The target template is displayed through the interactive page, and target media data is generated based on the target template.
[0011] In a second aspect, an embodiment of the present disclosure further provides a device for editing media data, the device comprising:
[0012] a template display module, configured to respond to a template selection event in an interactive page and display an original template and a first editing window through the interactive page, wherein the first editing window includes candidate elements in the original template;
[0013] a window switching module, configured to, in response to an interaction event for a target element in the interactive page, switch a first editing window in the interactive page to a second editing window, wherein the second editing window includes a set of candidate editing items for the target element, wherein the candidate editing items in the set of candidate editing items are used to edit attributes of the target element;
[0014] an element updating module, configured to, in response to a setting event for the candidate editing item set, update a target editing item in the second editing window according to a set attribute value, and update a target element in the original template according to the attribute value to obtain a target template;
[0015] The media data generation module is configured to display the target template through the interactive page and generate target media data based on the target template.
[0016] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0017] one or more processors;
[0018] a storage device for storing one or more programs,
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the media data editing method as described in any embodiment of the present disclosure.
[0020] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the media data editing method as described in any embodiment of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0022] FIG1 is a schematic flow chart of a method for editing media data provided by an embodiment of the present disclosure;
[0023] FIG2 is a schematic diagram of a first editing window in an interactive page provided by an embodiment of the present disclosure;
[0024] FIG3 is a schematic diagram of a first editing window switching to a second editing window in an interactive page provided by an embodiment of the present disclosure;
[0025] FIG4 is a flow chart of another method for editing media data provided by an embodiment of the present disclosure;
[0026] FIG5a is a schematic diagram of a multi-track timeline editing window in an interactive page provided by an embodiment of the present disclosure;
[0027] FIG5 b is a schematic diagram of a multi-track timeline editing window in another interactive page provided by an embodiment of the present disclosure;
[0028] FIG6 is a schematic structural diagram of a media data editing device provided by an embodiment of the present disclosure; and
[0029] FIG7 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
[0030] The content in the bold box represents the selected content, and the gray circle represents the first replacement control. DETAILED DESCRIPTION
[0031] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0032] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0033] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Definitions of other terms are provided in the following description.
[0034] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0035] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0037] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0038] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0039] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0040] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0041] It is understandable that the data involved in the technical solution of the present disclosure (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0042] Figure 1 is a flow chart illustrating a method for editing media data provided by an embodiment of the present disclosure. This embodiment of the present disclosure is applicable to scenarios where media data is combined to create works, such as video editing. The method can be executed by a media data editing device, which can be implemented in software and / or hardware, and optionally by an electronic device such as a mobile terminal, a PC, or a server.
[0043] As shown in FIG1 , the method includes:
[0044] S110. In response to a template selection event in an interactive page, an original template and a first editing window are displayed through the interactive page, where the first editing window includes candidate elements in the original template.
[0045] The interactive page represents a page used for media data editing. For example, the interactive page may include an interface of editing software on a PC, an interface of editing software on a Web, or an interface of editing software on a mini-program.
[0046] The interactive page may include a template selection area, wherein the template selection area includes candidate templates. For example, the candidate templates include at least one candidate element selected from the group consisting of a video element, an image element, a text element, and an audio element. A template selection event represents a selection operation on a candidate template in the template selection area. Based on the template selection event, a selected candidate template may be determined and used as the original template.
[0047] The first editing window represents a display window for candidate elements in the original template. The controls in the first editing window include at least one of a video display item, a text display item, an image display item, an audio display item, and a replacement control. The video display item is used to display replaceable video elements in the order of the video frame sequence in the original template. The text display item is used to display replaceable text elements in the order of the text sequence in the original template. The audio display item is used to display replaceable audio elements in the order of the audio sequence in the original template. The replacement control is used to trigger a replacement event for the target element in the original template. For example, the replacement control includes a first replacement control and a second replacement control. The first replacement control is used to replace an element at a single position in the original template. The second replacement control is used to batch replace elements at a set position in the original template. The set position is a pre-set position in the original template where element replacement can be performed.
[0048] FIG2 is a schematic diagram of a first editing window in an interactive page provided by an embodiment of the present disclosure. As shown in FIG2 , first editing window 200 includes a video display item 210, a text display item 220, an audio display item 230, a first replacement control 240, a second replacement control 250, and a display area 260. Display area 260 displays candidate elements 270 in the original template. For example, if video display item 210 is selected, display area 260 of first editing window 200 displays a thumbnail of the replaceable video in the original template, and first replacement control 240 is displayed at a set position within the thumbnail of the candidate element. If text display item 220 is selected, display area 260 of first editing window 200 displays the replaceable text in the original template. If audio display item 230 is selected, display area 260 of first editing window 200 displays the replaceable audio in the original template.
[0049] In some embodiments, the original template includes a video template, and displaying a first editing window in the interactive page includes: obtaining candidate elements at set positions in the video template according to the order of video frames in the video template; determining the display form of the candidate elements in the first editing window according to the type and acquisition order of the candidate elements; displaying the first editing window in the interactive page, and displaying the candidate elements in the original template according to the display form through the first editing window.
[0050] Among them, the display form is used to determine the display position and display order of the candidate elements in the first editing window. For example, candidate elements of the same type are displayed in the display area corresponding to the corresponding type display item in the first editing window, and all candidate elements under the same display item are displayed in the order of acquisition. As shown in Figure 2, if the video display item is selected, the video element included in the original template is displayed in the display area of the first editing window. Similarly, if the text display item is selected, the text element included in the original template is displayed in the display area of the first editing window. If the audio display item is selected, the audio element included in the original template is displayed in the display area of the first editing window.
[0051] It should be noted that the display form of video elements, text elements and audio elements is not limited to the methods listed in the above examples. Video elements, text elements and audio elements can also be displayed in groups in the display area of the first editing window. The embodiment of the present disclosure does not make specific limitations on this.
[0052] The interactive page also includes a playback window and a single-track timeline editing window. The single-track timeline editing window can be a window that displays the selected original template. In some embodiments, if a selection operation is detected for a candidate element in the original template in the playback window, the selected candidate element is used as the target element. If a selection operation is detected for a candidate element in the original template displayed in the first editing window, the selected candidate element is used as the target element.
[0053] Exemplarily, in response to a template selection event in an interactive page, displaying the original template and the first editing window through the interactive page includes:
[0054] In response to a template selection event for a template selection area in an interactive page, the selected original template is displayed in a playback window and a single-track timeline editing window in the interactive page, and a first editing window is displayed in the interactive page, wherein the candidate elements in the first editing window include at least one of a video element, a text element, and an audio element.
[0055] In some embodiments, in response to a selection event for a target element in the playback window, a first set of candidate controls corresponding to the target element is displayed. The first set of candidate controls may be a toolbar, which includes a set of candidate controls, and the set of candidate controls includes replacement controls. In response to an interaction event for a replacement control in the interactive page, a selected replacement element is obtained, and the corresponding candidate element in the original template is replaced based on the replacement element. The replacement element represents the selected target material.
[0056] Interaction events for the replacement control include, for example, a display event for the material upload page and a selection event for a candidate material on the material upload page. For example, in response to a click event on the replacement control, the material upload page is displayed. Based on the upload operation on the material upload page, the uploaded material is used to replace the target element on the interaction page. For example, the uploaded material is used to replace the target element of the original template in the playback window and the target element of the original template in the first editing window. The uploaded material is the selected candidate material.
[0057] Alternatively, in response to a selection event for a target element in the play window, the target element in the interactive page is switched to a selected state. According to a material selection event for a material selection area in the interactive page, a target material is obtained and the target element in the interactive page is replaced with the target material.
[0058] Alternatively, after the target element in the interactive page is switched to a selected state, in response to a drag event for the target material in the material selection area on the interactive page, an overlapping area between the target material and the target element is determined, and if the overlapping area meets a preset overlapping condition, the target element in the interactive page is replaced with the target material. If the overlapping area does not meet the preset overlapping condition, the dragging operation is stopped to release the target material, and the replacement of the target element in the interactive page with the target material is abandoned.
[0059] In some embodiments, a replacement control is displayed in the first editing window at a location corresponding to the video element. In response to a click on the replacement control, a selection event for the target video element in the original template is triggered, and a third candidate control set is displayed, which includes the replacement control. In response to a click on the replacement control, a material upload page is displayed. Based on the upload operation on the material upload page, the uploaded material is used to replace the target element in the interactive page.
[0060] If an editing operation on a text element in the first editing window is detected, the editing content is obtained, the target text element in the first editing window is updated according to the editing content, and the corresponding target text element in the playback window is updated according to the editing content.
[0061] In some embodiments, in response to a click event on the second replacement control in the first editing window, at least two target materials are acquired, and the candidate elements at set positions in the original template are batch updated using the at least two target materials.
[0062] Optionally, after replacing the corresponding candidate element in the original template based on the replacement element, the method further includes: adjusting the target element at the corresponding position in the original template in response to an adjustment event for the target element in the original template. The adjustment event is used to trigger an update operation on the target element at a set position in the original template. The adjustment event can be triggered based on a click event of the replacement control.
[0063] Optionally, the interactive page also includes a property adjustment window. This window is used to adjust the overall properties of the template. For example, the window includes basic settings, background settings, music settings, and animation settings. Basic settings include color adjustment, transparency adjustment, position adjustment, and scaling.
[0064] S120. In response to an interaction event for a target element in the interaction page, switch the first editing window in the interaction page to a second editing window, where the second editing window includes a set of candidate editing items for the target element.
[0065] The candidate edit item set represents a collection of candidate edit items. The candidate edit items in the candidate edit item set are used to edit the attributes of the target element. For example, the candidate edit item set includes color edit items, transparency edit items, scaling edit items, position edit items, and rotation angle edit items.
[0066] Interaction events for a target element may include: click events for an edit control or click events for a target element in a single-track timeline editing window. The edit control may be an edit control in the first candidate control set corresponding to the target element, an edit control in the second candidate control set in the single-track timeline editing window, or an edit control in the third candidate control set corresponding to the target element in the first editing window.
[0067] In some embodiments, in response to an interaction event for the target element in the interactive page, switching the first editing window in the interactive page to the second editing window includes:
[0068] In response to a selection event for a target element in the playback window, displaying a first candidate control set corresponding to the target element;
[0069] In response to a first trigger event for the first candidate control set, the first editing window in the interactive page is switched to a second editing window, wherein the first trigger event represents a click event for an editing control in the first candidate control set.
[0070] Optionally, in response to an interaction event for the target element in the interaction page, switching the first editing window in the interaction page to a second editing window includes:
[0071] In response to a second trigger event for a second candidate control set in the single-track timeline editing window, closing the first editing window in the interactive page, wherein the second trigger event represents a click event for an editing control in the second candidate control set;
[0072] In response to a selection event for a target element in the playback window, a second editing window is displayed in the interactive page.
[0073] Optionally, in response to an interaction event for the target element in the interaction page, switching the first editing window in the interaction page to a second editing window includes:
[0074] If a selection event for a target element in the first editing window is detected, displaying a third candidate control set in the first editing window;
[0075] In response to a third trigger event for the third candidate control set, the first editing window in the interactive page is switched to a second editing window, wherein the third trigger event represents a click event for an editing control in the third candidate control set.
[0076] Optionally, in response to an interaction event for the target element in the interaction page, switching the first editing window in the interaction page to a second editing window includes:
[0077] In response to a sixth trigger event for the target element in the single-track timeline editing window, the first editing window in the interactive page is switched to a second editing window.
[0078] Figure 3 is a schematic diagram of a first editing window switching to a second editing window in an interactive page provided by an embodiment of the present disclosure. As shown in Figure 3, the second candidate control set 310 in the single-track timeline editing window includes an editing control 300, which is used to trigger the first editing window 320 to switch to the second editing window 330. Optionally, if the target element 350 in the original template of the playback window 340 is clicked, the first candidate control set 360 is displayed, and the first candidate control set 360 includes the editing control 300. Optionally, if the target element 350 in the first editing window 320 is clicked, the third candidate control set 370 is displayed in the first editing window 320, and the third candidate control set 370 includes the editing control 300. Optionally, if the target element 350 in the single-track timeline editing window is clicked, the first editing window 320 in the interactive page is switched to the second editing window 330.
[0079] In some embodiments, after switching the first editing window in the interactive page to the second editing window, the method further includes: if a fourth trigger event is detected for a non-template area of the single-track timeline editing window, switching the second editing window in the interactive page to the first editing window. The non-template area refers to an area in the single-track timeline editing window other than a location corresponding to the original template.
[0080] Optionally, after switching the first editing window in the interactive page to the second editing window, the second editing window in the interactive page can be switched to the first editing window by clicking the editing control in the first candidate control set corresponding to the target element.
[0081] Alternatively, the second editing window in the interactive page can be switched to the first editing window by clicking an editing control in the second candidate control set in the single-track timeline editing window.
[0082] In some embodiments, it also includes: in response to an interactive event for a target element in the interactive page, displaying the target element and a replacement control at a position corresponding to the original template in the single-track timeline editing window, wherein the replacement control is used to trigger a replacement event of the target element in the original template.
[0083] For example, if an interactive event targeting a target element in an interactive page is detected, the location corresponding to the original template in the single-track timeline editing window is replaced with the target element, and a replacement control is displayed at the location corresponding to the target element. For example, the replacement control can be displayed centered, left-aligned, or right-aligned in the area corresponding to the target element in the single-track timeline editing window. In response to a click operation on the replacement control corresponding to the target element, the selected target material is obtained and the target material is used to replace the corresponding target element in the playback window and the time editing window.
[0084] Correspondingly, if it is detected that the second editing window in the interactive page is switched to the first editing window, the original template is displayed at a position corresponding to the target element in the single-track timeline editing window.
[0085] S130 . In response to a setting event for the candidate editing item set, update the target editing item in the second editing window according to the set attribute value, and update the target element in the original template according to the attribute value to obtain a target template.
[0086] The setting event is used to set the attribute value of the target editing item, wherein the candidate editing item to be set is used as the target editing item.
[0087] Exemplarily, in response to a setting event for a target editing item in the candidate editing item set, an attribute value corresponding to the target editing item is obtained; based on the attribute value, the original attribute value corresponding to the target editing item in the second editing window is updated; based on the attribute value, the attribute of the target element in the original template is updated to obtain the target template.
[0088] For example, in response to a setting event for a transparency edit item, a transparency value corresponding to the transparency edit item is obtained, an original transparency value corresponding to the transparency edit item in the second edit window is updated based on the transparency value, and the transparency of the target element in the original template is updated based on the transparency value to obtain a target template.
[0089] Optionally, if the transparency value is set through a slider control, the transparency value is determined in real time according to the sliding of the slider, and the original transparency value corresponding to the transparency editing item in the second editing window is updated in real time based on the transparency value, and the transparency of the target element in the original template is updated in real time based on the transparency value to avoid affecting the user experience due to transparency jumps.
[0090] S140: Display the target template through the interactive page, and generate target media data based on the target template.
[0091] The target media data may represent a completed edited work. For example, the target media data may be a video file edited based on video, text, and audio.
[0092] Exemplarily, a target template is displayed in an interactive page, and in response to a material selection event in a material selection area in the interactive page, target material is acquired, and target media data is generated by combining the target material and the target template.
[0093] The target material includes video material and / or image material. The target material and the target template are spliced in the single-track timeline editing window to obtain candidate media data. Optionally, a transition animation can be added at the splicing point to obtain candidate media data. In response to a play event in the single-track timeline editing window, the candidate media data is played. In response to an export event for the candidate media data, the candidate media data is exported as the target media data. If a modification operation for the candidate media data is detected, the candidate media data is modified accordingly based on the modification operation.
[0094] The technical solution of the embodiment of the present disclosure centrally displays the candidate elements in the original template through a first editing window, facilitating the intuitive display of the editable elements in the original template. A second editing window corresponding to the target element is displayed by responding to an interaction event with the target element among the candidate elements. Since the second editing window includes candidate editing items for editing the properties of the target element, the properties of the target element in the original template are updated to obtain a target template by setting the property values corresponding to the candidate editing items, thereby improving template editing efficiency. Then, target media data is generated based on the target template, reducing the difficulty of creating media data and improving media data editing efficiency.
[0095] FIG4 is a flow chart of another method for editing media data provided by an embodiment of the present disclosure. Based on the above embodiments, the embodiment of the present disclosure additionally defines a template unlocking scheme.
[0096] As shown in FIG4 , the method includes:
[0097] S410. In response to a template selection event in an interactive page, an original template and a first editing window are displayed through the interactive page, where the first editing window includes candidate elements in the original template.
[0098] S420: In response to an unlock event for the original template in the interactive page, obtain a candidate element corresponding to a set position in the original template, and add the candidate element to a multi-track timeline editing window.
[0099] The unlock event triggers the restoration of the original template to a draft template, which includes candidate elements that constitute the original template, and displays the draft template in the multi-track timeline editing window. The draft template can be a combination of candidate elements at replaceable positions in the original template. The multi-track timeline editing window can be a window in the interactive page for displaying the candidate elements.
[0100] Optionally, the unlocking event is triggered by:
[0101] If a click event for an unlock control in the multi-track timeline editing window is detected, an unlock event for the original template is triggered.
[0102] If a selection event for the original template is detected, the fourth candidate control set is displayed, and according to the fifth trigger event corresponding to the fourth candidate control set, an unlock event for the original template is triggered, wherein the fifth trigger event represents a click event for unlocking the control in the fourth candidate control set. Figure 5a is a schematic diagram of a multi-track timeline editing window in an interactive page provided by an embodiment of the present disclosure. As shown in Figure 5a, the original template is selected, and the fourth candidate control set 501 is displayed by right clicking. The fourth candidate control set 501 includes an unlock control 500. Clicking the unlock control 500 triggers an unlock event for the original template. The candidate elements at the set position in the original template are displayed through the tracks in the multi-track timeline editing window 510. The candidate elements include text elements 520, video elements 530, and music elements 540.
[0103] Exemplarily, when an unlock event for the original template is detected, candidate elements at positions in the original template where element replacement can be performed are obtained. A new track is created in the multi-track timeline editing window based on the obtained candidate elements, and the candidate elements are displayed through the track. Figure 5b is a schematic diagram of a multi-track timeline editing window in another interactive page provided by an embodiment of the present disclosure. As shown in Figure 5b, if a click event of the unlock control 500 in the multi-track timeline editing window 510 is detected, the candidate elements at the set positions in the original template are displayed through the tracks in the multi-track timeline editing window 510, and the candidate elements include text elements 520, video elements 530, and music elements 540.
[0104] By carrying candidate elements on tracks in the multi-track timeline editing window, the complexity of template editing is reduced. By editing the candidate elements in the tracks, more fine-grained adjustments to the original template can be achieved.
[0105] Optionally, when the second editing window is displayed in the interactive page, an unlock control is displayed in the multi-track timeline editing window. If a click operation on the unlock control is detected, an unlock event for the original template is triggered.
[0106] S430: In response to an editing event for a target element in the multi-track timeline editing window, obtain editing information for the target element, and update the original template according to the editing information.
[0107] The edit event for the target element is used to set the edit information of the target element. The edit information is used to represent the attribute value of the target element set based on the edit event. For example, the edit information includes at least one of the following: video duration, text font, text size, audio duration, audio reverberation effect, etc.
[0108] Based on the attribute value of the target element set by the editing event, the attribute adjustment of the original template can be achieved. For example, the original template includes video element A, video element B, text element C and audio element D. Obtain the duration adjustment operation of video element A, and adjust the video duration of the position corresponding to video element A in the original template according to the duration adjustment operation. If video element E is used to replace video element A in the original template, the duration of video element E is adjusted according to the video duration to adapt to the duration attribute of the corresponding position of the original template. Alternatively, obtain the font adjustment operation of text element C, and adjust the font of the position corresponding to text element C in the original template according to the font adjustment operation. If text element F is used to replace text element C in the original template, the font of text element F is adjusted according to the font of the position corresponding to text element C in the original template to adapt to the font attribute of the corresponding position of the original template.
[0109] S440. In response to an interaction event for a target element in the interaction page, switch the first editing window in the interaction page to a second editing window, where the second editing window includes a set of candidate editing items for the target element.
[0110] S450: In response to a setting event for the candidate editing item set, update the target editing item in the second editing window according to the set attribute value, and update the target element in the original template according to the attribute value to obtain a target template.
[0111] S460: Display the target template through the interactive page, and generate target media data based on the target template.
[0112] The technical solution of the disclosed embodiment responds to an unlock event for the original template by displaying the candidate elements at the set positions in the original template in a combined form within the tracks of the multi-track timeline editing window. The candidate elements corresponding to each track can be edited individually, reducing the complexity of template editing. Editing the candidate elements within the tracks also allows for more fine-grained adjustments to the original template.
[0113] Figure 6 is a schematic diagram of the structure of a media data editing device provided by an embodiment of the present disclosure. The device can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, PC or server, etc.
[0114] As shown in FIG. 6 , the apparatus includes: a template display module 610 , a window switching module 620 , an element updating module 630 , and a media data generating module 640 .
[0115] A template display module 610 is configured to respond to a template selection event in an interactive page and display an original template and a first editing window through the interactive page, wherein the first editing window includes candidate elements in the original template;
[0116] a window switching module 620, configured to, in response to an interaction event for a target element in the interactive page, switch a first editing window in the interactive page to a second editing window, wherein the second editing window includes a set of candidate editing items for the target element, wherein the candidate editing items in the set of candidate editing items are used to edit attributes of the target element;
[0117] an element updating module 630 for updating, in response to a setting event for the candidate editing item set, a target editing item in the second editing window according to a set attribute value, and updating a target element in the original template according to the attribute value to obtain a target template;
[0118] The media data generation module 640 is configured to display the target template through the interactive page and generate target media data based on the target template.
[0119] Optionally, the template display module 610 is specifically configured to:
[0120] In response to a template selection event for a template selection area in an interactive page, the selected original template is displayed in a playback window and a single-track timeline editing window in the interactive page, and a first editing window is displayed in the interactive page, wherein the candidate elements in the first editing window include at least one of a video element, a text element, and an audio element.
[0121] Optionally, the window switching module 620 is further configured to:
[0122] In response to an interactive event for a target element in the interactive page, the target element and a replacement control are displayed at a position corresponding to the original template in the single-track timeline editing window, wherein the replacement control is used to trigger a replacement event for the target element in the original template.
[0123] Optionally, the window switching module 620 is specifically configured to:
[0124] In response to a selection event for a target element in the playback window, displaying a first candidate control set corresponding to the target element;
[0125] In response to a first trigger event for the first candidate control set, the first editing window in the interactive page is switched to a second editing window, wherein the first trigger event represents a click event for an editing control in the first candidate control set.
[0126] Optionally, the window switching module 620 is specifically configured to:
[0127] In response to a second trigger event for a second candidate control set in the single-track timeline editing window, closing the first editing window in the interactive page, wherein the second trigger event represents a click event for an editing control in the second candidate control set;
[0128] In response to a selection event for a target element in the playback window, a second editing window is displayed in the interactive page.
[0129] Optionally, the window switching module 620 is specifically configured to:
[0130] If a selection event for a target element in the first editing window is detected, displaying a third candidate control set in the first editing window;
[0131] In response to a third trigger event for the third candidate control set, the first editing window in the interactive page is switched to a second editing window, wherein the third trigger event represents a click event for an editing control in the third candidate control set.
[0132] Optionally, the window switching module 620 is specifically configured to:
[0133] In response to a sixth trigger event for the target element in the single-track timeline editing window, the first editing window in the interactive page is switched to a second editing window.
[0134] Optionally, the window switching module 620 is further configured to:
[0135] After the first editing window in the interactive page is switched to the second editing window, if a fourth trigger event for the non-template area of the single-track timeline editing window is detected, the second editing window in the interactive page is switched to the first editing window.
[0136] Optionally, the device further comprises:
[0137] a template unlocking module for, after the original template and the first editing window are displayed via the interactive page, in response to an unlocking event for the original template in the interactive page, obtaining a candidate element corresponding to a set position in the original template, and adding the candidate element to the multi-track timeline editing window;
[0138] The element editing module is used to respond to an editing event for a target element in the multi-track timeline editing window, obtain editing information for the target element, and update the original template according to the editing information.
[0139] Optionally, the unlocking event is triggered by:
[0140] If a click event for an unlock control in the multi-track timeline editing window is detected, an unlock event for the original template is triggered;
[0141] If a selection event for the original template is detected, a fourth candidate control set is displayed, and an unlock event for the original template is triggered according to a fifth trigger event corresponding to the fourth candidate control set, wherein the fifth trigger event represents a click event for unlocking controls in the fourth candidate control set.
[0142] Optionally, the original template includes a video template, and displaying a first editing window on the interactive page includes:
[0143] Obtaining candidate elements at set positions in the video template according to an order of video frames in the video template;
[0144] Determining a display format of the candidate elements in the first editing window according to the types and acquisition order of the candidate elements;
[0145] The first editing window is displayed in the interactive page, and the candidate elements in the original template are displayed in the first editing window according to the display form.
[0146] Optionally, the element updating module 630 is specifically configured to:
[0147] In response to a setting event for a target editing item in the candidate editing item set, acquiring an attribute value corresponding to the target editing item;
[0148] updating the original attribute value corresponding to the target editing item in the second editing window based on the attribute value;
[0149] The attributes of the target element in the original template are updated based on the attribute value to obtain a target template.
[0150] Optionally, the device further comprises:
[0151] An element replacement module is used to obtain a selected replacement element in response to an interactive event for a replacement control in the interactive page after the original template and the first editing window are displayed through the interactive page, and replace the corresponding candidate element in the original template based on the replacement element.
[0152] Optionally, the device further comprises:
[0153] The element adjustment module is configured to adjust the target element at the corresponding position in the original template in response to an adjustment event for the target element in the original template after replacing the corresponding candidate element in the original template based on the replacement element.
[0154] Optionally, the media data generation module 640 is specifically configured to:
[0155] In response to a material selection event in the material selection area in the interactive page, a target material is acquired, and target media data is generated by combining the target material and a target template.
[0156] The media data editing device provided by the embodiment of the present disclosure can execute the media data editing method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0157] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0158] FIG7 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG7 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG7 ) 700 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG7 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0159] As shown in FIG7 , the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An edit / output (I / O) interface 705 is also connected to the bus 704.
[0160] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 7 shows the electronic device 700 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may be implemented or present instead.
[0161] According to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0162] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0163] The electronic device provided by the embodiment of the present disclosure and the method for editing media data provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0164] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the method for editing media data provided in the above embodiment is implemented.
[0165] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0166] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0167] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0168] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:
[0169] In response to a template selection event in an interactive page, displaying an original template and a first editing window through the interactive page, wherein the first editing window includes candidate elements in the original template;
[0170] In response to an interaction event for a target element in the interaction page, switching a first editing window in the interaction page to a second editing window, wherein the second editing window includes a set of candidate editing items for the target element, wherein the candidate editing items in the set of candidate editing items are used to edit attributes of the target element;
[0171] In response to a setting event for the candidate edit item set, updating a target edit item in the second edit window according to the set attribute value, and updating a target element in the original template according to the attribute value to obtain a target template;
[0172] The target template is displayed through the interactive page, and target media data is generated based on the target template.
[0173] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0174] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0175] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.
[0176] The functions described above in the present disclosure may be performed at least in part by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0177] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0178] The above description is merely an example of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0179] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0180] Although the present disclosure has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A method for editing media data, comprising: In response to a template selection event in an interactive page, displaying an original template and a first editing window through the interactive page, wherein the first editing window includes candidate elements in the original template; In response to an interaction event for a target element in the interaction page, switching a first editing window in the interaction page to a second editing window, wherein the second editing window includes a set of candidate editing items for the target element, wherein the candidate editing items in the set of candidate editing items are used to edit attributes of the target element; In response to a setting event for the candidate edit item set, updating a target edit item in the second edit window according to the set attribute value, and updating a target element in the original template according to the attribute value to obtain a target template; The target template is displayed through the interactive page, and target media data is generated based on the target template.
2. The method according to claim 1, wherein The method of displaying the original template and the first editing window through the interactive page in response to the template selection event in the interactive page includes: In response to a template selection event for a template selection area in an interactive page, the selected original template is displayed in a playback window and a single-track timeline editing window in the interactive page, and a first editing window is displayed in the interactive page, wherein the candidate elements in the first editing window include at least one of a video element, a text element, and an audio element.
3. The method according to claim 2, further comprising: In response to an interactive event for a target element in the interactive page, the target element and a replacement control are displayed at a position corresponding to the original template in the single-track timeline editing window, wherein the replacement control is used to trigger a replacement event for the target element in the original template.
4. The method according to claim 2 or 3, wherein: The step of switching the first editing window in the interactive page to the second editing window in response to an interactive event for the target element in the interactive page includes: In response to a selection event for a target element in the playback window, displaying a first candidate control set corresponding to the target element; In response to a first trigger event for the first candidate control set, the first editing window in the interactive page is switched to a second editing window, wherein the first trigger event represents a click event for an editing control in the first candidate control set.
5. The method according to claim 2 or 3, wherein: The step of switching the first editing window in the interactive page to the second editing window in response to an interactive event for the target element in the interactive page includes: In response to a second trigger event for a second candidate control set in the single-track timeline editing window, closing the first editing window in the interactive page, wherein the second trigger event represents a click event for an editing control in the second candidate control set; In response to a selection event for a target element in the playback window, a second editing window is displayed in the interactive page.
6. The method according to claim 2 or 3, wherein: The step of switching the first editing window in the interactive page to the second editing window in response to an interactive event for the target element in the interactive page includes: If a selection event for a target element in the first editing window is detected, displaying a third candidate control set in the first editing window; In response to a third trigger event for the third candidate control set, the first editing window in the interactive page is switched to a second editing window, wherein the third trigger event represents a click event for an editing control in the third candidate control set.
7. The method according to any one of claims 2 to 6, wherein: After switching the first editing window in the interactive page to the second editing window, the media data editing method further includes: If a fourth trigger event targeting the non-template area of the single-track timeline editing window is detected, the second editing window in the interactive page is switched to the first editing window.
8. The method according to any one of claims 1 to 7, wherein: After the original template and the first editing window are displayed through the interactive page, the media data editing method further includes: In response to an unlock event for the original template in the interactive page, obtaining a candidate element corresponding to a set position in the original template, and adding the candidate element to a multi-track timeline editing window; In response to an editing event for a target element in the multi-track timeline editing window, editing information for the target element is acquired, and the original template is updated according to the editing information.
9. The method according to claim 8, wherein The triggering method of the unlocking event includes: If a click event for an unlock control in the multi-track timeline editing window is detected, an unlock event for the original template is triggered; If a selection event for the original template is detected, a fourth candidate control set is displayed, and an unlock event for the original template is triggered according to a fifth trigger event corresponding to the fourth candidate control set, wherein the fifth trigger event represents a click event for unlocking controls in the fourth candidate control set.
10. The method according to any one of claims 1 to 9, wherein: The original template includes a video template, and the first editing window is displayed in the interactive page, including: Obtaining candidate elements at set positions in the video template according to an order of video frames in the video template; Determining a display format of the candidate elements in the first editing window according to the types and acquisition order of the candidate elements; The first editing window is displayed in the interactive page, and the candidate elements in the original template are displayed in the first editing window according to the display form.
11. The method according to any one of claims 1 to 10, wherein: The method of updating the target edit item in the second edit window according to the set attribute value in response to the setting event for the candidate edit item set, and updating the target element in the original template according to the attribute value to obtain the target template includes: In response to a setting event for a target editing item in the candidate editing item set, acquiring an attribute value corresponding to the target editing item; updating the original attribute value corresponding to the target editing item in the second editing window based on the attribute value; The attributes of the target element in the original template are updated based on the attribute value to obtain a target template.
12. The method according to any one of claims 1 to 11, wherein: After the original template and the first editing window are displayed through the interactive page, the media data editing method further includes: In response to an interaction event for replacing a control in the interactive page, a selected replacement element is obtained, and corresponding candidate elements in the original template are replaced based on the replacement element.
13. The method according to claim 12, wherein: After replacing the corresponding candidate element in the original template based on the replacement element, the media data editing method further includes: In response to an adjustment event for a target element in the original template, the target element at a corresponding position in the original template is adjusted.
14. The method according to any one of claims 1 to 13, wherein: Generating target media data based on the target template includes: In response to a material selection event in the material selection area in the interactive page, a target material is acquired, and target media data is generated by combining the target material and a target template.
15. A device for editing media data, comprising: a template display module configured to respond to a template selection event in an interactive page and display an original template and a first editing window through the interactive page, wherein the first editing window includes candidate elements in the original template; a window switching module configured to, in response to an interaction event for a target element in the interactive page, switch a first editing window in the interactive page to a second editing window, wherein the second editing window includes a set of candidate editing items for the target element, wherein the candidate editing items in the set of candidate editing items are used to edit attributes of the target element; an element updating module configured to, in response to a setting event for the candidate editing item set, update a target editing item in the second editing window according to a set attribute value, and update a target element in the original template according to the attribute value to obtain a target template; The media data generation module is configured to display the target template through the interactive page and generate target media data based on the target template.
16. An electronic device comprising: one or more processors; a storage device configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the media data editing method as described in any one of claims 1 to 14.
17. A storage medium containing computer-executable instructions, wherein: When the computer executable instructions are executed by a computer processor, they are used to perform the media data editing method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Video generation method and device, electronic equipment and storage medium
CN112911379A
Video processing method and device, medium and equipment
CN117135381A
Media data editing method and device, electronic equipment and storage medium
CN118075537A
Video-Tournament Platform
US20200065853A1