Media content posting method and apparatus, and device and storage medium
Patent Information
- Application Number
- PCT/CN2024/089633
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-26
- Filing Date
- 2024-04-24
- Publication Date
- 2025-07-31
AI Technical Summary
Existing media content publishing solutions lack flexibility and personalization when users create and share media works, and cannot fully utilize the multimedia features of video and audio, resulting in insufficient user experience and interaction.
A media content publishing method and device are provided. By implementing a target shooting mode in an application program, target images including cover images and recorded videos are acquired, and target media content is generated in combination with target audio, and users are supported in the media content acquisition interface. Creation and publishing, including preset presentation methods and use of creative materials.
It enriches the creation methods of media content, enhances the interaction between users, improves the user experience, and meets the personalized needs of users through flexible media content generation and release.
Smart Images

Figure CN2024089633_31072025_PF_FP_ABST
Abstract
Description
Media content publishing method, device, equipment and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed on April 26, 2023, with application number 202310464604.0 and invention name “Media content publishing method, device, equipment and storage medium”. The entire contents of that application are incorporated by reference into this application. Technical Field
[0003] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for publishing media content. Background Art
[0004] With the continuous development of Internet technology, users can browse a variety of multimedia content through the Internet, and different users can share their works with each other in the form of publishing media content such as videos or pictures.
[0005] Summary of the Invention
[0006] The embodiments of the present disclosure provide a media content publishing method, apparatus, storage medium, and device, which can optimize existing media content publishing solutions.
[0007] In a first aspect, an embodiment of the present disclosure provides a method for publishing media content, in an application, including:
[0008] In response to a capture operation on a media content acquisition interface, acquiring a target image captured in a target capture mode, wherein the target image includes a cover image and a recorded video between a first moment before a triggering moment of the capture operation and a second moment after the triggering moment;
[0009] Determining a target audio corresponding to the target image;
[0010] generating target media content according to the target image and the target audio;
[0011] In response to the publishing operation of the target media content, the target media content is published as a media work in the application.
[0012] In a second aspect, the embodiments of the present disclosure further provide a media content publishing device, which includes, in an application program:
[0013] a target image acquisition module, configured to acquire, in response to a capture operation on a media content acquisition interface, a target image captured in a target capture mode, wherein the target image includes a cover image and a recorded video between a first moment before a triggering moment of the capture operation and a second moment after the triggering moment;
[0014] An audio determination module, configured to determine a target audio corresponding to the target image;
[0015] a media content generating module, configured to generate target media content according to the target image and the target audio;
[0016] The media content publishing module is configured to publish the target media content as a media work in the application program in response to a publishing operation of the target media content.
[0017] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0018] one or more processors;
[0019] a storage device for storing one or more programs,
[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the media content publishing method provided by the embodiment of the present disclosure.
[0021] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the media content publishing method provided by an embodiment of the present disclosure.
[0022] The media content publishing scheme provided by the embodiments of the present disclosure obtains a target image captured in a target shooting mode in response to a shooting operation on a media content acquisition interface, wherein the target image includes a cover image and a recorded video between a first moment before a triggering moment of the shooting operation and a second moment after the triggering moment, determines a target audio corresponding to the target image, generates target media content based on the target image and the target audio, and publishes the target media content as a media work in an application in response to a publishing operation of the target media content. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] 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.
[0024] FIG1 is a flow chart of a method for publishing media content provided by an embodiment of the present disclosure;
[0025] FIG2 is a schematic diagram of a recorded video generation process provided by an embodiment of the present disclosure;
[0026] FIG3 is a flow chart of a method for publishing media content provided by an embodiment of the present disclosure;
[0027] FIG4 is a schematic diagram of an interface interaction provided by an embodiment of the present disclosure;
[0028] FIG5 is a schematic structural diagram of a media content publishing device provided by an embodiment of the present disclosure;
[0029] FIG6 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] 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.
[0031] 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.
[0032] 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." Other terms are defined in the following description.
[0033] 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.
[0034] 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".
[0035] 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.
[0036] 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.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] It is understandable that the data involved in this technical solution (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.
[0041] Figure 1 is a flow chart of a media content publishing method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of media content publishing. The method can be executed by a media content publishing device, which 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 such as a mobile phone, smart watch, tablet computer, and personal digital assistant, or a personal computer (PC) or server.
[0042] As shown in FIG1 , the method includes:
[0043] Step 101: In response to a shooting operation on a media content acquisition interface, a target image shot in a target shooting mode is obtained, wherein the target image includes a cover image and a recorded video between a first moment before a triggering moment of the shooting operation and a second moment after the triggering moment.
[0044] For example, a target shooting mode can be added to an application program that has a media work publishing function, and the specific type is not limited. In the target shooting mode, users are supported to shoot target images. For example, a switch control corresponding to the target shooting mode is added to the media content acquisition interface in the application program. The user can choose to turn the target shooting mode on or off by triggering the switch control. After the user triggers the switch control, a prompt such as text can be used to indicate whether the target shooting mode is currently on or off. The media content acquisition interface can be an interface in the application program for acquiring media content, and the user can input the shooting operation corresponding to the target shooting mode on the media content acquisition interface.
[0045] Exemplarily, the target image includes a recorded video and a cover image. A capture operation can be understood as triggering the capture of the target image in target capture mode. The specific triggering method is not limited and can include, for example, tapping a capture control, inputting a gesture to trigger the capture operation, or completing an action to trigger the capture operation. In target capture mode, video data can be recorded and cached in real time. After the capture operation is triggered, video recording continues, and the recorded video is determined based on the video data between a first moment before the capture triggering moment and a second moment after the capture triggering moment. The duration between the first moment and the triggering moment can be recorded as the first duration, and the duration between the second moment and the triggering moment can be recorded as the second duration. Optionally, at least one of the first duration and the second duration is non-zero. The first duration and / or the second duration can be set by the application or determined by the user. This allows for more flexible capture durations of the target image, better meeting the user's personalized capture needs, and thus enabling the generation of media works that meet the user's personalized creative needs. Exemplarily, the first duration can be 1.5 seconds, the second duration can be 2 seconds, and so on. Users can adjust these durations based on their needs. Optionally, the shooting operation only acts on the triggering moment. Taking the click operation of clicking the shooting control as an example, the shooting operation can be the moment when the touch object (such as the user's finger) presses the touch screen. The cover image can be any video frame in the recorded video, or it can be an image captured separately by the electronic device. For example, it can be a captured image captured at the triggering moment of the shooting operation, or it can be a captured image captured at a second moment, etc., without specific limitation. Optionally, the cover image can be determined according to the user's settings. For example, the user can set the capture moment of the cover image, or the user can select a video frame from the recorded video as the cover image, etc.
[0046] Optionally, the target shooting mode can be turned on at the same time as the preset shooting mode, wherein the preset shooting mode may include, for example, a dual-camera mode (for example, shooting simultaneously through the front and rear cameras of an electronic device), a countdown shooting mode, and a variable speed shooting mode. If the target shooting mode and the preset shooting mode are turned on at the same time, for example, for the dual-camera mode, the recorded videos captured by the front and rear cameras can be synthesized into the same recorded video, and the cover images captured separately can be synthesized into the same cover image. The synthesis method can be, for example, equal division or large and small windows, etc., which is not specifically limited. For the countdown shooting mode, the triggering moment of the shooting operation can be understood as the moment when the countdown ends. The variable speed shooting mode may include a fast shooting mode and a slow shooting mode. For the variable speed shooting mode, the speed of the normal recorded video is multiplied by the corresponding variable speed coefficient (for example, the variable coefficient of the fast shooting mode is greater than 1, and the variable coefficient of the slow shooting mode is less than 1) to obtain the recorded video in the target image after speed change processing.
[0047] Step 102: Determine the target audio corresponding to the target image.
[0048] Exemplarily, the target audio can be specified by the application or freely set by the user. The target audio can include various audio formats, such as music or voice, without limitation. Optionally, the user can select the target audio in the media content acquisition interface or in the preset editing interface for the target image. The target audio can be reselected or edited before publishing the target media content. It is understood that in the preset editing interface, the user can adjust the target audio and / or target image, such as adjusting the image size and trimming the duration, to obtain the target media content. Optionally, the target audio includes a target music soundtrack, and the media content acquisition interface includes a music soundtrack selection control. The music soundtrack selection control is used to select the target music soundtrack. Optionally, if the target audio is selected in the media content acquisition interface, the target audio can be played while the media content acquisition interface is displayed, allowing the user to preview the media content to a certain extent. The target audio soundtrack may not be included in the recorded video; for example, the target audio soundtrack may be removed from the recorded video data. Optionally, the user can choose whether to add the music soundtrack or the user's original voice to the media content.
[0049] Step 103: Generate target media content according to the target image and the target audio.
[0050] For example, after acquiring the target image and determining the target audio, the target image and the target audio can be synthesized to obtain the target media content. When generating the target media content, the audio included in the recorded video can be retained or filtered out, without specific limitation.
[0051] Step 104: In response to the publishing operation of the target media content, publish the target media content as a media work in the application.
[0052] Exemplarily, after receiving a publish operation input by the user for target media content, the target media content is published as a media work in the application. It should be noted that the publish operation for the target media content can be input before, during, or after the target media content is generated, and the specific timing is not limited. For example, the application may have a preset publishing method, and after the user inputs the publish operation corresponding to the preset publishing method, the target media content is generated and published. In other words, the target media content is automatically published after it is generated.
[0053] The media content publishing method provided by the embodiment of the present disclosure, in response to a shooting operation on a media content acquisition interface, obtains a target image shot in a target shooting mode, wherein the target image includes a cover image and a recorded video between a first moment before the triggering moment of the shooting operation and a second moment after the triggering moment, determines the target audio corresponding to the target image, generates target media content based on the target image and the target audio, and in response to the target media content publishing operation, publishes the target media content as a media work in an application. By adopting the above technical solution, it is possible to generate and publish media content for publication based on the target image and audio, enrich the creation method of media content, and enrich the content form in media works, which is conducive to enhancing the interaction between users based on media works and improving the user experience.
[0054] In some embodiments, generating target media content based on the target image and the target audio includes: displaying the target image and the target audio in a preset editing interface based on a preset display method, and generating target media content based on the target image and the target audio according to the preset display method. Thus, the target image and target audio can be displayed in the preset editing interface based on the preset display method, and target media content corresponding to the preset display method can be generated, allowing the user to preview the media content in the preset editing interface.
[0055] Optionally, the preset display method can be determined by a display mode, and different display modes correspond to different media types of the target media content. The media types may include videos, pictures, or pictures with audio, etc. In some embodiments, it also includes: determining the current display mode in response to a display mode switching operation input based on the preset editing interface, wherein the display mode is used to determine the preset display method, and different display modes correspond to different media types of the target media content. Thus, the user can select the media type of the target media content corresponding to the selected display mode by switching the display mode.
[0056] In some embodiments, the preset display method is determined based on the display mode and the audio duration of the target audio, so that the recorded video and / or the cover image are fully displayed while playing all or part of the target audio. This ensures that the recorded video and / or cover image are fully displayed in different display modes and adapts to audio of various lengths, making the generated target media content more harmonious in terms of image and audio. This allows viewers of the media work to more fully view the content of the target image while listening to the audio, enhancing their sensory experience.
[0057] It should be noted that the user may edit the acquired target image. If editing occurs, the complete display can be understood as the complete display of the edited recorded video and / or cover image.
[0058] Exemplarily, the display mode may include at least one of a first display mode, a second display mode and a third display mode. The first display mode is used to display the recorded video and the cover image; the second display mode is used to display the recorded video, which may be a looped display of the recorded video, or may be recorded as a carousel display mode; the third display mode is used to display the cover image, or may be recorded as a static image display mode. There may be at least two display modes corresponding to the target image, and different display modes correspond to different preset display methods. In the same display mode, due to the different audio durations of the target audio, there may be different preset display methods. It is understandable that different display modes correspond to different media types of the target media content. For example, when the display mode is the first display mode and the second display mode, the corresponding target media content is a video type; when the display mode is the third display mode, the corresponding target media content is a picture type.
[0059] Exemplarily, in the first display mode, the recorded video and the cover image can be fully displayed once, such as playing the recorded video first and then displaying the cover image after the playback is completed. The display duration of the cover image can be preset or dynamically adjusted according to the audio duration of the target audio. For example, the video duration of the recorded video is 3.5 seconds, and the display duration of the cover image is preset to 2 seconds (recorded as the first preset duration). The sum of the two, 5.5 seconds, is recorded as the target image duration, that is, the target image duration includes the sum of the video duration of the recorded video and the first preset duration.
[0060] In some embodiments, displaying the target image and target audio in a preset editing interface based on a preset display method may include: in the first display mode, if the audio duration is shorter than the target image duration, then after the recorded video is fully played in the preset editing interface, during the process of displaying the cover image for the first preset duration, muting the target audio after the complete playback of the target audio or looping the target audio. This can prevent the recorded video from being unable to play completely due to the audio duration being too short, or preventing the user from not being able to access the valid information in the cover image in time due to the cover image being displayed for too short a time. For example, if the target image duration is 5.5 seconds and the audio duration is 3 seconds, the target audio will not be played or will be played in a loop for the last 0.5 seconds of the recorded video and the 2 seconds corresponding to the cover image. If there is sound in the recorded video, it can be played normally. If the audio duration is 4 seconds, the target audio will not be played or will be played in a loop for the last 1.5 seconds corresponding to the cover image.
[0061] In some embodiments, the display of the target image and the target audio in the preset editing interface based on the preset display method may include: in the first display mode, if the audio duration is greater than the target image duration, then in the process of playing the target audio in the preset editing interface, after the recorded video is fully played, the cover image is continuously displayed until the target audio is finished playing. In this way, while ensuring that both the recorded video and the cover image can be fully displayed, the user's audio listening needs are taken into account. As in the above example, if the target image duration is 5.5 seconds and the audio duration is 7 seconds, the display duration of the cover image can be extended from 2 seconds to 3.5 seconds.
[0062] In some embodiments, the target image and the target audio are displayed in a preset editing interface based on a preset display method, including: in the second display mode, if the audio duration is less than the video duration of the recorded video, then in each round of playing the recorded video in the preset editing interface, the audio is muted after the target audio is fully played or the target audio is played again in a loop. In this way, it can be avoided that the recorded video cannot be fully played in a single playback round due to the audio duration being too short. As in the above example, if the video duration is 3.5 seconds and the audio duration is 3 seconds, the target audio will no longer be played or will be played again in the last 0.5 seconds of the recorded video, and if there is sound in the recorded video, it can be played normally.
[0063] In some embodiments, the target image and the target audio are displayed in a preset editing interface based on a preset display method, including: in the second display mode, if the audio duration is greater than the video duration of the recorded video, then in the process of playing the target audio of the target duration in the preset editing interface, the recorded video is played in full for a target number of rounds, wherein the target number of rounds is determined by rounding the quotient of the audio duration and the video duration, and the target duration is determined by multiplying the video duration and the target number of rounds. In this way, it is possible to avoid the recorded video from being unable to be played in full in a single playback round near the end of the soundtrack. For example, if the video duration is 3.5 seconds and the audio duration is 18 seconds, the quotient after 18 seconds / 3.5 seconds is rounded to 5, that is, if the target number of rounds is 5, then the target duration can be the product of 5 rounds and 3.5, 17.5 seconds. The target audio can be played for 17.5 seconds, and the last 0.5 seconds will not be played. Optionally, after the target audio has finished playing once, it can be played again from the beginning, and the recorded video can be played completely for the target number of rounds during the playback process.
[0064] In some embodiments, displaying the target image and target audio in a preset editing interface based on a preset display method includes: in the third display mode, displaying the cover image while the target audio is fully played in the preset editing interface. This ensures that the cover image is fully displayed while also meeting the user's need to fully listen to the soundtrack. For example, if the audio duration is 3 seconds, the cover image will be displayed for 3 seconds.
[0065] Optionally, the user can edit the target image and / or target audio in the preset editing interface. The specific editing method is not limited, such as rotating, scaling or cropping the target image, editing the recorded video, adjusting the volume or editing the target audio, etc.
[0066] In some embodiments, the process further includes determining user-defined creative materials; wherein generating target media content based on the target image and the target audio includes generating target media content based on the target image, the target audio, and the creative materials. This provides users with greater creative freedom, increases the amount of information in media works, and further enhances interaction between users based on media works.
[0067] For example, creative materials may include stickers, special effects, beauty effects, and filters.
[0068] In some embodiments, determining the user-defined creative materials includes determining the user-defined creative materials in response to a creative material setting operation input by the user based on a media content acquisition interface for the target image and / or based on a preset editing interface. This allows the user to freely add creative materials before and / or after acquiring the target image, further enhancing the user's creative freedom.
[0069] Among them, if the user has added creative materials, the creative materials can also be displayed in the process of displaying the target image and target audio in the preset editing interface based on the preset display method, and the display duration of the creative materials can be consistent with the display duration of the target image. Optionally, it can also include: determining the associated time period between the creative materials and the target image set by the user, wherein the associated time period is used to indicate the time when the creative materials appear in the target image. Thus, the user can set the associated time period between the creative materials and the target image, and display the creative materials in the associated time period during the display of the target image. The associated time period can be the time period on the timeline corresponding to the target image. For example, if the associated time period is from the 2nd second to the 3rd second, the creative materials will be displayed from the 2nd second to the 3rd second after the target image starts to be displayed, and the creative materials will stop being displayed after the 3rd second.
[0070] Optionally, the media content acquisition interface can also support users to perform pre-editing operations, such as flipping shots, editing beautification parameters, editing filters, and editing special effects. After the user enters the pre-editing operation, the cached video data can be cleared and the video data cache can be restarted.
[0071] In some embodiments, after generating the target media content based on the target image and the target audio, the method further includes: displaying the target media content in a target interface based on a first preset display mode; and, in response to a display mode switching operation, switching from displaying the target media content in the first preset display mode to displaying the target media content in a second preset display mode in the target interface. This allows switching between different preset display modes, making it easier for the user to view the target media content in different modes in the target interface.
[0072] Exemplarily, the target interface may include a preset editing interface, a first display interface for the target media content before publication, and a second display interface for the target media content after publication. When the audio duration of the target audio is determined, the preset display method may correspond to the display mode, and the display method switching operation may specifically be a display mode switching operation. For example, the first preset display method corresponds to the first display mode, the second preset display method may correspond to the second display mode, and so on. By inputting the display mode switching operation, switching between different preset display methods is achieved.
[0073] In some embodiments, the method further includes: determining the device type of the local device in response to a save operation on the published target media content; and saving the published target media content as at least one of the target image, the recorded video, and the cover image according to the device type. In this way, different device types can be supported to save the target media content in different ways, thereby improving compatibility with device types. For example, if the device type of the local device supports the target image format, it can be saved as the target image; if the device type of the local device does not support the target image format, it can be saved separately as a recorded video and / or separately as a cover image.
[0074] In some embodiments, the process of acquiring a target image captured in the target capture mode further includes: in response to a user's preset publishing operation, if it is determined that the recorded video was not successfully acquired, generating a media work in the application based on the cover image for publishing. Therefore, since acquiring a recorded video typically takes a certain amount of time, if a user triggers the media work publishing operation within a short period of time, in order to reduce user waiting time and improve publishing efficiency, media content to be published as a media work can be quickly generated based on the cover image and published.
[0075] In some embodiments, the method further includes: responsive to a user enabling the target capture mode, caching the real-time recorded video data to obtain newly cached video data, and deleting historical cached video data that meets a preset deletion condition; responsive to a capture operation being triggered, continuing to record video data for a second preset duration; and generating the target image based on the current cached video data and the recorded video data. Thus, historical cached video data that meets the preset deletion condition can be deleted in a timely manner, thereby conserving storage resources of the electronic device.
[0076] Optionally, the preset deletion condition can be set according to the first duration. For example, the preset deletion condition can be to delete the historical cached video data whose shooting time is more than a preset interval threshold from the current moment. The preset interval threshold can be an integer multiple of the first duration, such as 1 times or 2 times.
[0077] Optionally, the cached video data may be stored in an uncoded form, recorded as uncoded video data; the cached video data may also be stored in an encoded form, recorded as encoded video data, specifically, may be stored as an encoded file.
[0078] Optionally, deleting the historical cached video data that meets the preset deletion condition includes: if the cached video data is unencoded video data, deleting the historical cached video data that meets the preset deletion condition on a frame-by-frame basis; and / or if the cached video data is encoded video data, deleting the historical cached video data that meets the preset deletion condition on a encoded file-by-encoded file basis. This allows for more flexible deletion of historical cached video data.
[0079] For example, for unencoded video data, which is typically large in size and occupies more storage space, deletion is performed in frames, and the integer multiple can be 1, allowing for more timely deletion of unnecessary video frames. For encoded video data, which is stored in the form of encoded files and deleted in encoded file units, the duration corresponding to the encoded file can be the first duration, and the integer multiple can be 2. Compared to unencoded data, encoded files have a smaller data volume, saving storage space.
[0080] For example, the first duration is 1.5 seconds, and the second duration (i.e., the second preset duration) is 2 seconds. Encoding can be performed in units of 1.5 seconds. After caching two 1.5-second encoded files, the first encoded file can be deleted, and the recording and encoding of the next 1.5 seconds can be continued. Figure 2 is a schematic diagram of a recording video generation process provided by an embodiment of the present disclosure. Assuming that during the recording process, the user triggers a shooting operation (such as pressing a shooting button) at the nth second in a certain 1.5-second interval, a 1.5-second encoded file (1.5-second video) and an n-second encoded file (n-second video) can be obtained, and then a 2-second video can be continued. When editing, the encoded data in the range of (1.5-n) seconds to 1.5 seconds is intercepted from the 1.5-second encoded file and synthesized with the n-second encoded file and the 2-second video to form a recorded video in the target image.
[0081] Optionally, if the cached video data is unencoded video data, the first unencoded video data of the first length can be stored in the memory of the electronic device. After the shooting operation is triggered, after the second unencoded video data of the second length is obtained and stored in the memory, the first unencoded video data and the second unencoded video data are encoded together into a recorded video in the target image.
[0082] Optionally, if the cached video data is unencoded video data, the third unencoded video data of the first length can be stored in the local disk of the electronic device. After the shooting operation is triggered, the third unencoded video data is encoded into a first file. After obtaining the fourth unencoded video data of the second length, the fourth unencoded video data is encoded into a second file, and then the first file and the second file are synthesized into a recorded video in the target image.
[0083] Optionally, if the cached video data is unencoded video data, the fifth unencoded video data of the first length can be stored in the local disk of the electronic device. After the shooting operation is triggered, after the sixth unencoded video data of the second length is obtained and stored in the local disk, the fifth unencoded video data and the sixth unencoded video data are encoded together into a recorded video in the target image.
[0084] Optionally, if the cached video data is unencoded video data, the seventh unencoded video data of the first duration can be encoded into key frame data and stored in the memory of the electronic device. After the shooting operation is triggered, after the eighth unencoded video data of the second duration is obtained and encoded into key frame data and stored in the memory, the key frame data corresponding to the seventh unencoded video data and the key frame data corresponding to the eighth unencoded video data are encoded together as a recorded video in the target image.
[0085] FIG3 is a flow chart of a method for publishing media content provided by an embodiment of the present disclosure. The present disclosure embodiment is optimized based on the various optional solutions in the above embodiments. Specifically, the method includes the following steps:
[0086] Step 301: Enter target shooting mode in the media content acquisition interface.
[0087] Figure 4 is a schematic diagram of an interface interaction provided by an embodiment of the present disclosure. A target shooting control 402 is displayed in a media content acquisition interface 401 and is currently in an unactivated state. If a user clicks on the target shooting control 402, the target shooting mode is entered, and the display state of the target shooting control 402 is immediately changed. A prompt message, such as "Target shooting mode is on", may be displayed on the media content acquisition interface for a certain duration, such as 2 seconds, and then disappears automatically.
[0088] Optionally, users can perform pre-editing processing such as selecting target audio, setting creative materials such as special effects, and selecting filters in the media content acquisition interface. They can also choose to enable dual-camera mode and other shooting modes that are compatible with the target shooting mode.
[0089] Step 302: In response to a shooting operation on the media content acquisition interface, enter a preset editing interface and obtain a target image shot in a target shooting mode.
[0090] For example, after entering the target shooting mode, the real-time recorded video data is cached to obtain newly cached video data, and the historical cached video data that meets the preset deletion conditions is deleted. In response to the shooting operation being triggered, the preset editing interface is entered, and the recorded video data of the second preset length is continuously recorded. The target image is generated based on the current cached video data and the recorded video data. As shown in Figure 4, when the user clicks the shutter control 403, the preset editing interface 404 can be entered.
[0091] Step 303: Determine the target soundtrack corresponding to the target image.
[0092] For example, if the user has determined that the target soundtrack is Music A in the media content acquisition interface 401, then after entering the preset editing interface 404, the target soundtrack is still Music A. The user can also change the target soundtrack in the preset editing interface 404, such as changing it to Music B.
[0093] Step 304: Display the target image and target soundtrack in a preset editing interface based on a preset display method.
[0094] For example, after entering the preset editing interface, the display mode may be a default display mode, such as the first display mode. The user may input a display mode switching operation in the preset editing interface to view the target image and target audio in different display modes.
[0095] As shown in Figure 4, the user can display more display modes by clicking the drop-down button of the first display mode, such as displaying the second and third. When the user clicks "Second", it switches to the second display mode, and in the preset editing interface, the preset display mode corresponding to the first display mode is switched to the preset display mode corresponding to the second display mode.
[0096] Step 305: In response to the creative material setting operation input by the user based on the preset editing interface, determine the creative material set by the user.
[0097] For example, users can add stickers or special effects in the preset editing interface. If special effects have been added in the media content acquisition interface, they can now change the special effects.
[0098] As shown in FIG. 4 , the user can add a birthday hat sticker 405 in the preset editing interface.
[0099] Step 306 : In response to the media content generation operation, target media content is generated according to the target image, target soundtrack, and creative materials in accordance with a preset display method.
[0100] For example, when the preset display modes include multiple types, the generated target media content may also include media content corresponding to the multiple preset display modes, thereby supporting switching between the preset display modes when displaying the target media content. As shown in FIG4 , the media content generation operation may be, for example, a user clicking a "Next" control in a preset editing interface to generate the target media content.
[0101] Step 307: In response to the publishing operation of the target media content, the target media content is published as a media work in the application.
[0102] As shown in FIG4 , after the target media content is generated, further operations such as saving a draft or publishing can be performed. If the user clicks “Publish”, the target media content will be published as a media work in the application.
[0103] The media content publishing method provided by the embodiment of the present disclosure adds a target shooting control to the media content acquisition interface so that the user can turn on the target shooting mode, the shooting operation is triggered, and the preset editing interface is entered, and the target image shot in the target shooting mode is obtained. After determining the target soundtrack corresponding to the target image, the target image and target soundtrack can be displayed in the preset editing interface based on the preset display method, and the display mode can be switched and creative materials such as stickers can be added. Finally, the target media content can be generated and published based on the target image, target soundtrack and creative materials. By adopting the above technical solution, the creation method of media content can be enriched, providing users with a freer creative space, increasing the amount of information in the media works, and helping to enhance the interaction between users based on media works and improve user experience.
[0104] FIG5 is a schematic diagram of the structure of a media content publishing device provided by an embodiment of the present disclosure. As shown in FIG5 , the device includes, in an application program:
[0105] A target image acquisition module 501 is configured to acquire, in response to a capture operation on a media content acquisition interface, a target image captured in a target capture mode, wherein the target image includes a cover image and a recorded video between a first moment before a triggering moment of the capture operation and a second moment after the triggering moment;
[0106] An audio determination module 502 is configured to determine a target audio corresponding to the target image;
[0107] A media content generating module 503 is configured to generate target media content according to the target image and the target audio;
[0108] The media content publishing module 504 is configured to publish the target media content as a media work in the application program in response to a publishing operation of the target media content.
[0109] The media content publishing device provided in the embodiments of the present disclosure can generate and publish media content for publication based on target images and audio, enriching the creation method of media content and the content form in media works, which is conducive to enhancing the interaction between users based on media works and improving user experience.
[0110] Optionally, the shooting operation only acts on the trigger moment, the duration between the first moment and the trigger moment is a first duration, the duration between the second moment and the trigger moment is a second duration, and at least one of the first duration and the second duration is not zero.
[0111] Optionally, the target audio includes a target soundtrack, and the media content acquisition interface includes a soundtrack selection control, and the soundtrack selection control is used to select the target soundtrack.
[0112] Optionally, the media content generation module includes:
[0113] A display unit, configured to display the target image and the target audio in a preset editing interface based on a preset display method;
[0114] A generating unit is configured to generate target media content according to the target image and the target audio in accordance with the preset display mode.
[0115] Optionally, the device further includes:
[0116] The display mode determination module is used to determine the current display mode in response to the display mode switching operation input based on the preset editing interface, wherein the display mode is used to determine the preset display method, and different display modes correspond to different media types of the target media content.
[0117] Optionally, the preset display method is determined according to the display mode and the audio duration of the target audio, so that the recorded video and / or the cover image are fully displayed during the playback of all or part of the target audio.
[0118] Optionally, the display mode includes a first display mode, and the first display mode is used to display the recorded video and the cover image.
[0119] Optionally, the display unit is specifically configured to implement at least one of the following:
[0120] In the first display mode, if the audio duration is shorter than the target image duration, then in the process of displaying the cover image for the first preset duration after the recorded video is fully played in the preset editing interface, the audio is muted or played in a loop after the target audio is fully played, wherein the target image duration includes the sum of the video duration of the recorded video and the first preset duration;
[0121] In the first display mode, if the audio duration is greater than the target image duration, during the process of playing the target audio in the preset editing interface, the cover image will be continuously displayed after the recorded video is played completely until the target audio is finished playing, wherein the target image duration includes the sum of the video duration of the recorded video and the first preset duration.
[0122] Optionally, the presentation mode includes a second presentation mode, and the second presentation mode is used to present the recorded video.
[0123] The display unit is specifically configured to implement at least one of the following:
[0124] In the second display mode, if the audio duration is less than the video duration of the recorded video, then during each round of playing the recorded video in the preset editing interface, the audio is muted after the target audio is played completely or the target audio is played in a loop;
[0125] In the second display mode, if the audio duration is greater than the video duration of the recorded video, the recorded video is played completely for a target number of rounds while playing the target audio of the target duration in the preset editing interface, wherein the target number of rounds is determined by rounding the quotient of the audio duration and the video duration, and the target duration is determined by multiplying the video duration by the target number of rounds.
[0126] Optionally, the display mode includes a third display mode, and the third display mode is used to display the cover image.
[0127] Optionally, the display unit is specifically used to: in the third display mode, display the cover image during the complete playback of the target audio in the preset editing interface.
[0128] Optionally, it further includes: a material determination module, used to determine the creative material set by the user;
[0129] The media content publishing module is specifically configured to generate target media content according to the target image, the target audio, and the creative material.
[0130] Optionally, the material determination module is specifically used to: determine the creative material set by the user in response to a creative material setting operation input by the user based on the media content acquisition interface of the target image and / or based on a preset editing interface.
[0131] Optionally, the device further includes: an association period determination module, configured to determine an association period set by a user between the creative material and the target image, wherein the association period is configured to indicate a time when the creative material appears in the target image.
[0132] Optionally, the device further includes:
[0133] A content display module is configured to, after generating target media content according to the target image and the target audio, display the target media content in a target interface based on a first preset display mode;
[0134] The mode switching module is configured to, in response to a display mode switching operation, switch from displaying the target media content based on the first preset display mode to displaying the target media content based on a second preset display mode in the target interface.
[0135] Optionally, the first duration between the first moment and the trigger moment, and / or the second duration between the second moment and the trigger moment, is determined according to user settings.
[0136] Optionally, the device further includes:
[0137] a device type determination module, configured to determine a device type of a local device in response to a save operation on the published target media content;
[0138] A saving module is configured to save the published target media content as at least one of the target image, the recorded video, and the cover image according to the device type.
[0139] Optionally, the device further includes:
[0140] An image publishing module is used to generate a media work in the application based on the cover image for publishing in response to a preset publishing operation of the user during the process of acquiring the target image captured in the target shooting mode, if it is determined that the recorded video is not successfully acquired.
[0141] Optionally, the device further includes:
[0142] a cache processing module for caching the real-time recorded video data in response to the user turning on the target shooting mode, obtaining newly cached video data, and deleting historical cached video data that meets a preset deletion condition;
[0143] a video recording module, configured to continue recording video data of a second preset duration in response to the shooting operation being triggered;
[0144] The photo generation module is used to generate the target image based on the current cached video data and the recorded video data.
[0145] Optionally, the deleting of the historical cached video data that meets the preset deletion conditions includes: if the cached video data is unencoded video data, deleting the historical cached video data that meets the preset deletion conditions in units of frames; and / or, if the cached video data is encoded video data, deleting the historical cached video data that meets the preset deletion conditions in units of encoded files.
[0146] The media content publishing device provided in the embodiments of the present disclosure can execute the media content publishing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0147] 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.
[0148] FIG6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG6 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG6 ) 600 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 FIG6 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0149] As shown in FIG6 , the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the electronic device 600 are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An edit / output (I / O) interface 605 is also connected to the bus 604.
[0150] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 6 shows the electronic device 600 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 alternatively be implemented or present.
[0151] In particular, 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 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0152] 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.
[0153] The electronic device provided by the embodiment of the present disclosure and the media content publishing method 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.
[0154] 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 media content publishing method provided in the above embodiment is implemented.
[0155] 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.
[0156] 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.
[0157] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0158] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: responds to a shooting operation on a media content acquisition interface, obtains a target image shot in a target shooting mode, wherein the target image includes a cover image and a recorded video between a first moment before the triggering moment of the shooting operation and a second moment after the triggering moment; determines a target audio corresponding to the target image; generates target media content based on the target image and the target audio; and responds to a publishing operation of the target media content, publishes the target media content as a media work in the application.
[0159] 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).
[0160] 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.
[0161] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a module does not limit the module itself. For example, the audio determination module may also be described as a "module for determining the target audio corresponding to the target image."
[0162] The functions described above herein 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 chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0163] 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.
[0164] According to one or more embodiments of the present disclosure, a method for publishing media content is provided, including:
[0165] In response to a capture operation on a media content acquisition interface, acquiring a target image captured in a target capture mode, wherein the target image includes a cover image and a recorded video between a first moment before a triggering moment of the capture operation and a second moment after the triggering moment;
[0166] Determining a target audio corresponding to the target image;
[0167] generating target media content according to the target image and the target audio;
[0168] In response to the publishing operation of the target media content, the target media content is published as a media work in the application.
[0169] According to one or more embodiments of the present disclosure, the shooting operation only acts on the trigger moment, the duration between the first moment and the trigger moment is a first duration, the duration between the second moment and the trigger moment is a second duration, and at least one of the first duration and the second duration is not zero.
[0170] According to one or more embodiments of the present disclosure, the target audio includes a target soundtrack, and the media content acquisition interface includes a soundtrack selection control, and the soundtrack selection control is used to select the target soundtrack.
[0171] According to one or more embodiments of the present disclosure, generating target media content according to the target image and the target audio includes:
[0172] Displaying the target image and the target audio in a preset editing interface based on a preset display method,
[0173] According to the preset display mode, target media content is generated according to the target image and the target audio.
[0174] According to one or more embodiments of the present disclosure, the present invention further includes:
[0175] In response to a display mode switching operation input based on the preset editing interface, a current display mode is determined, wherein the display mode is used to determine the preset display method, and different display modes correspond to different media types of the target media content.
[0176] According to one or more embodiments of the present disclosure, the preset display method is determined according to the display mode and the audio duration of the target audio, so that the recorded video and / or the cover image are fully displayed during the playback of all or part of the target audio.
[0177] According to one or more embodiments of the present disclosure, the presentation mode includes a first presentation mode, and the first presentation mode is used to present the recorded video and the cover image.
[0178] According to one or more embodiments of the present disclosure, presenting the target image and the target audio in a preset editing interface based on a preset presentation method includes at least one of the following:
[0179] In the first display mode, if the audio duration is shorter than the target image duration, then in the process of displaying the cover image for the first preset duration after the recorded video is fully played in the preset editing interface, the audio is muted or played in a loop after the target audio is fully played, wherein the target image duration includes the sum of the video duration of the recorded video and the first preset duration;
[0180] In the first display mode, if the audio duration is greater than the target image duration, during the process of playing the target audio in the preset editing interface, the cover image will be continuously displayed after the recorded video is played completely until the target audio is finished playing, wherein the target image duration includes the sum of the video duration of the recorded video and the first preset duration.
[0181] According to one or more embodiments of the present disclosure, the presentation mode includes a second presentation mode, and the second presentation mode is used to loop-present the recorded video.
[0182] According to one or more embodiments of the present disclosure, presenting the target image and the target audio in a preset editing interface based on a preset presentation method includes at least one of the following:
[0183] In the second display mode, if the audio duration is less than the video duration of the recorded video, then during each round of playing the recorded video in the preset editing interface, the audio is muted after the target audio is played completely or the target audio is played in a loop;
[0184] In the second display mode, if the audio duration is greater than the video duration of the recorded video, the recorded video is played completely for a target number of rounds while playing the target audio of the target duration in the preset editing interface, wherein the target number of rounds is determined by rounding the quotient of the audio duration and the video duration, and the target duration is determined by multiplying the video duration by the target number of rounds.
[0185] According to one or more embodiments of the present disclosure, the display mode includes a third display mode, and the third display mode is used to display the cover image.
[0186] According to one or more embodiments of the present disclosure, displaying the target image and the target audio in a preset editing interface based on a preset display method includes:
[0187] In the third display mode, the cover image is displayed during the complete playback of the target audio in the preset editing interface.
[0188] According to one or more embodiments of the present disclosure, the present invention further includes:
[0189] Determine the creative materials set by the user;
[0190] The step of generating target media content according to the target image and the target audio includes:
[0191] Target media content is generated according to the target image, the target audio, and the creative material.
[0192] According to one or more embodiments of the present disclosure, determining the creative material set by the user includes:
[0193] In response to a creative material setting operation input by the user based on the media content acquisition interface of the target image and / or based on a preset editing interface, the creative material set by the user is determined.
[0194] According to one or more embodiments of the present disclosure, the present invention further includes:
[0195] Determine a time period for associating the creative material with the target image, which is set by a user, wherein the time period for associating the creative material is used to indicate a time when the creative material appears in the target image.
[0196] According to one or more embodiments of the present disclosure, after generating target media content according to the target image and the target audio, the method includes:
[0197] Displaying the target media content in a target interface based on a first preset display manner;
[0198] In response to the display mode switching operation, the target interface switches from displaying the target media content based on the first preset display mode to displaying the target media content based on a second preset display mode.
[0199] According to one or more embodiments of the present disclosure, the first duration between the first moment and the trigger moment, and / or the second duration between the second moment and the trigger moment, is determined according to user settings.
[0200] According to one or more embodiments of the present disclosure, the present invention further includes:
[0201] In response to a save operation on the published target media content, determining a device type of the local device;
[0202] The published target media content is saved as at least one of the target image, the recorded video, and the cover image according to the device type.
[0203] According to one or more embodiments of the present disclosure, the process of acquiring the target image captured in the target shooting mode further includes:
[0204] In response to a preset publishing operation of the user, if it is determined that the recorded video is not successfully acquired, a media work in the application is generated according to the cover image for publishing.
[0205] According to one or more embodiments of the present disclosure, the present invention further includes:
[0206] In response to the user turning on the target shooting mode, the real-time recorded video data is cached to obtain newly cached video data, and the historical cached video data that meets the preset deletion condition is deleted;
[0207] In response to the shooting operation being triggered, continuing to record video data for a second preset time length;
[0208] The target image is generated according to the current buffered video data and the recorded video data.
[0209] According to one or more embodiments of the present disclosure, deleting the historical cached video data that meets a preset deletion condition includes:
[0210] If the cached video data is uncoded video data, deleting the historical cached video data that meets the preset deletion condition in units of frames; and / or
[0211] If the cached video data is encoded video data, the historical cached video data that meets the preset deletion condition is deleted in units of encoded files.
[0212] According to one or more embodiments of the present disclosure, a media content publishing device is provided, including:
[0213] a target image acquisition module, configured to acquire, in response to a capture operation on a media content acquisition interface, a target image captured in a target capture mode, wherein the target image includes a cover image and a recorded video between a first moment before a triggering moment of the capture operation and a second moment after the triggering moment;
[0214] An audio determination module, configured to determine a target audio corresponding to the target image;
[0215] a media content generating module, configured to generate target media content according to the target image and the target audio;
[0216] The media content publishing module is configured to publish the target media content as a media work in the application program in response to a publishing operation of the target media content.
[0217] According to one or more embodiments of the present disclosure, there is provided an electronic device, including:
[0218] one or more processors;
[0219] a storage device for storing one or more programs,
[0220] When the one or more programs are executed by the one or more processors, the one or more processors implement the media content publishing method provided by the embodiment of the present disclosure.
[0221] According to one or more embodiments of the present disclosure, a storage medium containing computer-executable instructions is provided. When the computer-executable instructions are executed by a computer processor, the computer-executable instructions are used to execute the media content publishing method provided by the embodiments of the present disclosure.
[0222] The above description is merely a preferred embodiment 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 the specific combination of the above-mentioned technical features, but also includes 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.
[0223] 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.
[0224] Although the subject matter 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 publishing media content, wherein in an application, include: In response to a shooting operation on a media content acquisition interface, a target image shot in a target shooting mode is acquired, wherein the target image includes a cover image and a recorded video between a first moment before a triggering moment of the shooting operation and a second moment after the triggering moment; Determining a target audio corresponding to the target image; generating target media content according to the target image and the target audio; In response to the publishing operation of the target media content, the target media content is published as a media work in the application.
2. The method according to claim 1, wherein the shooting operation only acts on the trigger moment, the duration between the first moment and the trigger moment is a first duration, the duration between the second moment and the trigger moment is a second duration, and at least one of the first duration and the second duration is not zero. 3 . The method according to claim 1 , wherein the target audio includes a target soundtrack, and the media content acquisition interface includes a soundtrack selection control, and the soundtrack selection control is used to select the target soundtrack.
4. The method according to claim 1, wherein target media content is generated according to the target image and the target audio, include: The target image and the target audio are displayed in a preset editing interface based on a preset display method, and target media content is generated according to the target image and the target audio according to the preset display method.
5. The method according to claim 4, wherein include: In response to a display mode switching operation input based on the preset editing interface, a current display mode is determined, wherein the display mode is used to determine the preset display method, and different display modes correspond to different media types of the target media content.
6. The method according to claim 4, wherein the preset display method is determined according to the display mode and the audio duration of the target audio, so that the recorded video and / or the cover image are fully displayed during the process of playing all or part of the target audio.
7. The method according to claim 6, wherein the display mode comprises a first display mode, and the first display mode is used to display the recorded video and the cover image.
8. The method according to claim 7, wherein displaying the target image and the target audio in a preset editing interface based on a preset display mode comprises at least one of the following: In the first display mode, if the duration of the audio is shorter than the duration of the target image, then in the process of displaying the cover image with the first preset duration after the recorded video is fully played in the preset editing interface, the audio is muted or played in a loop after the target audio is fully played. in, The target image duration includes the sum of the video duration of the recorded video and the first preset duration; In the first display mode, if the audio duration is greater than the target image duration, then during the process of playing the target audio in the preset editing interface, the cover image is continuously displayed after the recorded video is fully played until the target audio is finished playing, wherein the target image duration includes the sum of the video duration of the recorded video and the first preset duration.
9. The method according to claim 6, wherein the presentation mode comprises a second presentation mode, and the second presentation mode is used to present the recorded video.
10. The method according to claim 9, wherein displaying the target image and the target audio in a preset editing interface based on a preset display method comprises at least one of the following: In the second display mode, if the duration of the audio is less than the duration of the recorded video, then in each round of playing the recorded video in the preset editing interface, the audio is muted after the target audio is played completely or the target audio is played in a loop; In the second display mode, if the audio duration is longer than the video duration of the recorded video, the target audio of the target duration is played in the preset editing interface for the target number of rounds. Playing the recorded video, in, The target number of rounds is determined by rounding off the quotient of the audio duration and the video duration, and the target duration is determined by multiplying the video duration and the target number of rounds. The method according to claim 6 , wherein the display mode comprises a third display mode, and the third display mode is used to display the cover image.
12. The method according to claim 11, wherein the target image and the target audio are displayed in a preset editing interface based on a preset display mode, include: In the third display mode, the cover image is displayed during the complete playback of the target audio in a preset editing interface.
13. The method according to claim 1, wherein include: Determine the creative material set by the user; The step of generating target media content according to the target image and the target audio includes: Generate target media content according to the target image, the target audio, and the creative material.
14. The method according to claim 13, wherein the determining the creative material set by the user, include: In response to a creative material setting operation input by the user based on the media content acquisition interface of the target image and / or based on a preset editing interface, the creative material set by the user is determined.
15. The method according to claim 13, wherein include: Determine the association period between the creative material and the target image set by the user, wherein the association period is used to indicate the time when the creative material appears in the target image.
16. The method according to claim 1, wherein after said generating target media content according to said target image and said target audio, include: Displaying the target media content in the target interface based on a first preset display mode; In response to the display mode switching operation, the target interface switches from displaying the target media content based on the first preset display mode to displaying the target media content based on the second preset display mode. content.
17. The method according to claim 1, wherein a first duration between the first moment and the trigger moment, and / or a second duration between the second moment and the trigger moment, is determined according to user settings.
18. The method according to claim 1, wherein include: In response to a save operation on the published target media content, determining a device type of the local device; The published target media content is saved as at least one of the target image, the recorded video, and the cover image according to the device type.
19. The method according to claim 1, wherein in the process of acquiring the target image captured in the target shooting mode, include: In response to a preset publishing operation of the user, when it is determined that the recorded video is not successfully acquired, a media work in the application is generated according to the cover image for publishing.
20. The method according to claim 1, wherein include: In response to the user turning on the target shooting mode, the real-time recorded video data is cached to obtain newly added cached video data, and the historical cached video data that meets the preset deletion condition is deleted; In response to the shooting operation being triggered, continuing to record video data of a second preset time length; The target image is generated according to the current buffered video data and the recorded video data.
21. The method according to claim 20, wherein the deleting of the historical cached video data that meets the preset deletion condition, include: If the cached video data is uncoded video data, deleting the historical cached video data that meets the preset deletion condition in units of frames; and / or If the cached video data is encoded video data, the historical cached video data that meets the preset deletion condition is deleted in units of encoded files.
22. A media content publishing device, wherein in an application program, include: The target image acquisition module is used to obtain the target image in response to the shooting operation on the media content acquisition interface. A target image captured in a target capture mode, wherein the target image includes a cover image and a recorded video between a first moment before a triggering moment of the capture operation and a second moment after the triggering moment; An audio determination module, used to determine a target audio corresponding to the target image; A media content generation module, used to generate target media content according to the target image and the target audio; The media content publishing module is used to publish the target media content as a media work in the application program in response to a publishing operation of the target media content.
23. The device according to claim 22, wherein include: A module for executing the method according to any one of claims 2-21.
24. An electronic device, wherein the electronic device include: one or more processors; a storage device for storing 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 content publishing method as described in any one of claims 1-21.
25. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the media content publishing method as described in any one of claims 1 to 21 when executed by a computer processor.