Video processing method and apparatus, electronic device, storage medium, and product

By analyzing the end time of the video track to identify and remove invalid frames, a second video file is generated that does not contain the audio track that caused the invalid frames. This solves the problem of low efficiency in invalid frame processing in existing technologies and improves the user viewing experience.

WO2026008060A1PCT designated stage Publication Date: 2026-01-08BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/107100
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-07-04
Filing Date
2025-07-04
Publication Date
2026-01-08

AI Technical Summary

Technical Problem

In existing technologies, the processing efficiency of invalid frames in videos is low, especially since invalid frames are difficult to identify accurately through image recognition, resulting in a poor viewing experience for users.

Method used

By analyzing the end time of the video track, invalid frames are identified and removed, a second video file is generated that does not contain the audio track that caused the invalid frames, and the audio file and the second video file are combined into a multimedia stream.

Benefits of technology

It improves the efficiency and accuracy of invalid frame removal, enhancing the user's viewing experience, especially by preventing video interruptions caused by invalid frames during loop playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025107100_08012026_PF_FP_ABST
    Figure CN2025107100_08012026_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of multimedia, and relates to a video processing method and apparatus, an electronic device, a storage medium, and a product. The video processing method comprises: parsing a first video file to obtain a plurality of tracks in the first video file, the last one or more frames of the first video file being invalid frames, the plurality of tracks at least comprising a specified type of track and an audio track, and the specified type of track comprising a video track; generating a second video file on the basis of the specified type of track in the first video file; and synthesizing the audio file and the second video file into a multimedia stream.
Need to check novelty before this filing date? Find Prior Art

Description

Method, apparatus, electronic device, storage medium and product for processing video

[0001] Cross-reference to Related Applications

[0002] This application is based on and claims priority to the application with the Chinese application number 202410895135.2 and the filing date of July 4, 2024, the disclosure of which is hereby incorporated by reference in its entirety into the present application. TECHNICAL FIELD

[0003] The present disclosure relates to the field of multimedia technology, and in particular, to a method, apparatus, electronic device, storage medium and product for processing video BACKGROUND

[0004] Some videos may have invalid frames that affect user viewing, such as black frames intentionally added by non-video creators, resulting in poor user viewing experience. In related technologies, such videos are usually filtered or manually processed from the production end of the video, for example, by abandoning the use of videos with invalid frames, or manually cropping the video, etc. SUMMARY

[0005] This summary is provided to introduce a selection of concepts, which are further described below in the detailed description. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used in limiting the scope of the claimed subject matter.

[0006] According to some embodiments of the present disclosure, a method for processing a video is provided, including: parsing a first video file to obtain a plurality of tracks in the first video file, the last one or more frames of the first video file being invalid frames, the plurality of tracks including at least a track of a specified type and an audio track, the track of the specified type including a video track; generating a second video file according to the track of the specified type in the first video file; and synthesizing an audio file and the second video file into a multimedia stream.

[0007] According to some other embodiments of the present disclosure, a device for processing a video is provided, including: a parsing module configured to parse a first video file to obtain a plurality of tracks in the first video file, the last one or more frames of the first video file being invalid frames, the plurality of tracks including at least a track of a specified type and an audio track, the track of the specified type including a video track; a generating module configured to generate a second video file according to the track of the specified type in the first video file; and a synthesizing module configured to synthesize an audio file and the second video file into a multimedia stream.

[0008] According to some embodiments of the present disclosure, an electronic device is provided, comprising: a memory; and a processor coupled to the memory, the processor configured to perform the processing method of a video according to any of the embodiments of the present disclosure based on instructions stored in the memory.

[0009] According to some embodiments of the present disclosure, a computer readable storage medium is provided, having stored thereon a computer program, which when executed by a processor, performs the processing method of a video according to any of the embodiments of the present disclosure.

[0010] According to some embodiments of the present disclosure, a computer program is provided, comprising: instructions which, when executed by a processor, cause the processor to perform the processing method of a video according to any of the embodiments of the present disclosure.

[0011] Other features, aspects, and advantages of the present disclosure will become apparent from the following detailed description of the exemplary embodiments of the present disclosure with reference made to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0012] The preferred embodiments of the present disclosure will be described herein below with reference to the accompanying drawings. The accompanying drawings are used in the provision of further understanding of the present disclosure, and together with the specific description of the preferred embodiments below, serve as a part of the disclosure. It will be appreciated that the accompanying drawings are only some embodiments of the present disclosure and do not limit the present disclosure. In the drawings:

[0013] FIG. 1 shows a schematic diagram of a track of a video according to some embodiments of the present disclosure.

[0014] FIG. 2 shows a schematic diagram of a track of a video according to some other embodiments of the present disclosure.

[0015] FIG. 3 shows a schematic diagram of a processing method of a video according to some embodiments of the present disclosure.

[0016] FIG. 4 shows a schematic diagram of a generation method of a second video file according to some embodiments of the present disclosure.

[0017] FIG. 5 shows a schematic diagram of a track of a first video file according to some embodiments of the present disclosure.

[0018] FIG. 6 shows a schematic diagram of a track of a created video file according to some embodiments of the present disclosure.

[0019] FIG. 7 shows a schematic diagram of a processing apparatus of a video according to some embodiments of the present disclosure.

[0020] FIG. 8 shows a schematic diagram of an electronic device according to some embodiments of the present disclosure.

[0021] FIG. 9 illustrates a structural diagram of a computer system according to some embodiments of the present disclosure.

[0022] It should be understood that the dimensions of the various portions shown in the attached drawings are shown for purposes of convenience and are not necessarily drawn to scale. Wherever possible, the same or similar reference numerals are used in different drawings to refer to the same or similar components. Thus, when a component is first defined in the specification in one drawing and then subsequently discussed in another drawing, the component is not necessarily redefined in the subsequent drawing. DETAILED DESCRIPTION

[0023] The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, but not all the embodiments. The description of the embodiments below is actually only illustrative, but not as any limitation on the present disclosure and its application or use. It should be understood that the present disclosure can be implemented in various forms, and should not be interpreted as being limited to the embodiments set forth herein.

[0024] It should be understood that the various steps in the method embodiments of the present disclosure can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect. Unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions, and numerical values set forth in these embodiments should be interpreted as merely exemplary, not limiting the scope of the present disclosure.

[0025] The term "comprise" and variations of the term, such as "comprising", "comprises" and "comprised of", as used herein, are to be construed as open-ended terms meaning "including, but not limited to". In addition, the term "include", and variations of the term, such as "including", "includes" and "included", as used herein, are to be construed as open-ended terms meaning "including, but not limited to". Thus, the terms "comprise", "comprising", "comprises", "comprised of", "include", "including", "includes" and "included" are synonymous with each other. The term "based on" means "based, at least in part, on".

[0026] Reference throughout this specification to "an embodiment", "some embodiments" or "embodiments" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the application. The appearance of the phrases "in one embodiment", "in some embodiments" or "in embodiments" in various places in the specification are not necessarily all referring to the same embodiment, although they can. Furthermore, the terms "a" or "an", as used herein, mean "one or more" when applied to any feature in the specification.

[0027] It should be noted that the terms "first", "second", and the like in the present disclosure are used only to differentiate different apparatuses, modules, or units, and are not intended to limit the order or interdependence of the functions performed by these apparatuses, modules, or units. Unless otherwise specified, the terms "first", "second", and the like are not intended to imply a given order or any other way of a given order in time, space, ranking, or any other manner.

[0028] It should be noted that the terms "one", "multiple" in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that "one" or "multiple" should be understood as "one or more" unless otherwise explicitly indicated in the context.

[0029] The names of the messages or information exchanged between the plurality of apparatuses in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.

[0030] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings, but the present disclosure is not limited to these specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments. In addition, in one or more embodiments, specific features, structures, or characteristics can be combined by any suitable means from the present disclosure that is clear to those skilled in the art.

[0031] For videos with invalid frames, if such videos are directly abandoned, the number of videos will be reduced; if the end of the video is manually cropped, a large amount of manpower and time is required, and the processing efficiency is relatively low. Therefore, an automated and batch processing video solution is needed to remove invalid frames in the video.

[0032] One way is to determine the invalid frames in the video frame by frame through image recognition, and automatically locate the position of the invalid frames, and then crop. However, it is difficult to determine which frames are invalid only through image recognition. For example, in some videos, transition effects such as fade-in and fade-out are sometimes used between different scenes, and black frames (i.e. frames in which all pixels are black) appear in the transition part, which are not invalid frames. At the end of the video, there are sometimes a few frames of black frames, which have no actual effect and belong to invalid frames. In the image recognition process, the recognition results of these two kinds of black frames are exactly the same, but in fact they are not all invalid frames.

[0033] Further analysis shows that the causes of some invalid frames are as follows. In the video editing process, the end time of the useful picture content is earlier than the end time of the sound in the video, that is, the end time of the video track is earlier than the end time of the audio track, and in the process of synthesizing the track and generating the video, the total length of the video is determined according to the time corresponding to the last ending track. This will cause the existence of black frames at the end of the synthesized video.

[0034] FIG. 1 shows a schematic diagram of the tracks of a video according to some embodiments of the present disclosure. As shown in FIG. 1, a certain video includes a video track 1, a video track 2, and an audio track 1, the end time of the video track 1 is t1, the end time of the video track 2 is t2, and the end time of the audio track 1 is t3, t1 < t2 < t3. Since the latest end time of the two video tracks is t2, and the end time of the audio track is t3, when the video is played after t2, although the entire video has not ended, the picture presents a pure black color in the time period between t2 and t3.

[0035] In some application scenarios, some videos are used as background videos for rendering atmosphere, and the original audio of the video is not important. The sound played in the environment comes from another file. Therefore, in this case, the black frames between t2 and t3 are invalid frames.

[0036] Of course, invalid frames are not limited to black frames. Invalid frames can be frames with missing picture information. In some embodiments, invalid frames are, for example, frames in which the video corresponding to the video track ends, but the playing of other tracks (such as audio tracks) corresponding to the video has not ended, so that the video is still playing some frames, which can be regarded as invalid frames.

[0037] FIG. 2 shows a schematic diagram of the tracks of a video according to some other embodiments of the present disclosure. The video in this figure adds a subtitle track 1 compared to the video in FIG. 1. If the subtitle track 1 is mistakenly added during video editing or is unnecessary in the current playing environment, then after the video ends (i.e., after t2), although there is still picture content, the frames between t2 and t3 are also invalid frames. Of course, if the display of subtitles between t2 and t3 is intentionally set by the video editor, then the frames between t2 and t3 are not invalid frames.

[0038] Since some videos still carry track information after editing, synthesizing tracks, and generating videos, the present disclosure provides a scheme of extracting a specified type of track from a video and then regenerating the video to efficiently remove one or more invalid frames at the end of the video in this way for the above-mentioned application scenarios.

[0039] FIG. 3 shows a flowchart of a method for processing a video according to some embodiments of the present disclosure. As shown in FIG. 3, the method according to this embodiment includes steps S302-S306.

[0040] In step S302, a first video file is parsed to obtain a plurality of tracks in the first video file, the last one or more frames of the first video file being invalid frames, the plurality of tracks including at least a track of a specified type and an audio track, the track of the specified type including a video track.

[0041] The first video file (or referred to as the first video) is a file in a video format, such as AVI (Audio Video Interleave), MOV (QuickTime Movie), FLV (Flash Video), MP4, etc. The first video file includes a video track and an audio track, and in some embodiments, can also include other types of tracks, such as a subtitle track, a special effect track, an image track, etc.

[0042] The track of the specified type includes a track that is to be retained after processing the video, i.e., content that is expected to be retained. In the scenario according to some embodiments of the present disclosure, the purpose is to remove invalid frames at the end of the video, and thus the video track is the one that is expected to be retained, and thus the track of the specified type includes the video track. According to needs, the track of the specified type can also include other types of tracks, such as a subtitle track, a special effect track, an image track, etc.

[0043] In some embodiments, the track of the specified type does not include the audio track.

[0044] The last one or more frames of the first video file being invalid frames means that the one or more consecutive frames at the end of the video are invalid frames. For example, in the example of FIG. 1, the frames between t2 and t3 of the video are all invalid frames.

[0045] In step S304, a second video file is generated according to the track of the specified type in the first video file. In the second video file, other types of tracks in the first video file, except for the track of the specified type, are not included. For example, the audio track is not included.

[0046] The second video file is also a file in a video format, which can be in the same format as the first video file or in a different format.

[0047] Referring to FIG. 1, if the specified type is a video type, the track of the specified type includes the video track 1 and the video track 2, and then a second video file is generated according to the video track 1 and the video track 2, i.e., the second video file only includes the video track 1 and the video track 2. Since the generated second video file no longer includes the audio track, the second video file ends at time t2, i.e., the last frame of the second video is the same as the last frame of the video track included in the second video file, and thus the end of the second video file no longer includes invalid frames.

[0048] In step S306, the audio file and the second video file are synthesized into a multimedia stream.

[0049] The audio file and the first video file are independent files. For example, in a scenario in which a picture of the first video file and another sound need to be played, the audio file and the second video file can be synthesized into a new multimedia stream. The multimedia stream can be sent to a terminal of a user for playing and displaying. For example, in a live broadcast scenario, the audio file and the second video file can be synthesized into a live broadcast stream. Thus, a user watching the live broadcast can view the picture of the first video file without invalid frames and hear the sound of the audio file.

[0050] The above embodiment extracts the track of the specified type such as the video track from the first video file, and generates a second video file according to the extracted track. The generated second video file does not include the audio track causing the generation of invalid frames, and thus does not include invalid frames. In this way, by using the processing mode of track extraction and track synthesis, invalid frames can be eliminated, and the efficiency and accuracy of eliminating invalid frames in a video are improved.

[0051] The method of generating the second video file is described below.

[0052] FIG. 4 shows a flowchart of the method of generating the second video file according to some embodiments of the present disclosure. As shown in FIG. 4, the method of generating according to this embodiment includes steps S402 to S408.

[0053] In step S402, the track of the specified type is extracted from the plurality of tracks.

[0054] In some embodiments, the extraction of the track can be performed using a function in some multimedia framework capable of editing a video file. The first video file is taken as a video file object, e.g., an instance of a video object supported by the multimedia framework, and by using a method provided by the multimedia framework for obtaining the track of the specified type, all tracks of the specified type in the first video file can be obtained.

[0055] For example, AVFoundation is a multimedia framework that can be used to play or edit video files. AVFoundation provides an AVMutableComposition class, which is a dynamic media composition that allows insertion, deletion, and modification of the contents of tracks in the instance. An instance of AVMutableComposition can include one or more track objects AVMutableCompositionTrack, each for storing different media content, such as video, audio, subtitles, etc. The position of insertion, deletion, and modification of a track can be controlled by setting the timeline of the AVMutableCompositionTrack. An AVMutableCompositionTrack can further include one or more AVAssetTrack objects, which is a class representing a media stream, for indicating a resource segment of the track, each AVAssetTrack including one or more AVCompositionTrackSegment objects, representing a continuous media time range.

[0056] The AVAssetTrack objects of the tracks of the first video file are obtained by calling the tracksWithMediaType method provided by the AVAsset object of the first video file.

[0057] In step S404, a new video file object is created. The new video file object does not include any multimedia resource, i.e., any track, when it is created.

[0058] In some embodiments, a new video file object, such as a new instance of AVMutableComposition, can be created.

[0059] In step S406, a track of a specified type is added to the created video file object.

[0060] For example, the tracks previously extracted from the object of the first video file can be added to the created video file object, such as AVMutableComposition, by using a track adding function.

[0061] In some embodiments, a video track of the tracks of the specified type is added to the created video file object, and the start time of the video track is set to 0. Thus, invalid frames at the beginning of the video can also be avoided.

[0062] In some embodiments, the number of the extracted tracks of the specified type is multiple, and adding the tracks of the specified type to the created video file object comprises: adding a first video track of the specified type with the earliest start time to the created video file object, and setting the start time of the first video track as 0; and adding other tracks of the specified type to the created video file object according to the offset of the start time of the first video track from the start time of the other tracks in the first video file. Thus, in the case that the first video file comprises multiple video tracks, the second video file generated can be consistent with the content of the first video file.

[0063] FIG. 5 shows a schematic diagram of tracks of a first video file according to some embodiments of the present disclosure. In FIG. 5, the start point of video track 1, which is played earlier than video track 2, is inconsistent with the start point of the first video file, and the start point of video track 2 is offset from the start point of video track 1 by an amount At. After extracting video track 1 and video track 2 and adding them to the created video file, refer to FIG. 6. In FIG. 6, the start time of video track 1 with the earliest start time is 0, and the start time of video track 2 is offset from the start time of video track 1 by an amount At.

[0064] In step S408, a second video file is generated based on the video file object. For example, the video file object is encoded or the like to generate the second video file. The tracks in the second video file are the tracks added to the video file object.

[0065] The above embodiments can efficiently generate the second video file by creating a new video file object and adding the tracks of the specified type in the first video file to the video file object, thereby improving the efficiency of removing the invalid frames.

[0066] Some embodiments of the present disclosure can also solve the problem that invalid frames affect the viewing experience of users in the scenario of playing a video in a loop. In the case that the first video file has invalid frames at the end, if the first video file is played in a loop, the effect of the invalid frames on the user's viewing is particularly obvious. For example, the first video file is played in a loop as a video for setting atmosphere, and the first video has black frames at the end, so black color appears in the screen between the end of each play and the start of the next play, which makes the user obviously feel the interruption of the video play. If the video processing method provided by the embodiments of the present disclosure is used to generate a second video file without invalid frames at the end, in the process of playing the second video in a loop, no invalid frames appear between the end of each play and the start of the next play, and the screens of the second video file played twice are smoothly switched, thereby improving the user's viewing experience.

[0067] In some embodiments, the audio file and the second video file played in a loop are synthesized into the multimedia stream. For example, in some karaoke applications or scenarios, a user can sing along with a song being played, and some background video can be played to set the mood. In this scenario, the audio file of the song and the second video file played in a loop can be synthesized into the multimedia stream, and the multimedia stream can be played for the user. Thus, the background video played in a loop can be more smoothly transitioned, and the user experience is improved.

[0068] In some embodiments, the audio file, the subtitle corresponding to the audio file, and the second video file are synthesized into the multimedia stream. Thus, the user can sing along with the audio file and the subtitle being played, and a similar karaoke effect can be achieved, and the second video file with the invalid frames removed can reduce the interference to the user and improve the user's immersion.

[0069] The above describes related method embodiments of the present disclosure. The following further describes devices and apparatuses for performing the methods of the above embodiments.

[0070] FIG. 7 shows a structural schematic diagram of a video processing apparatus according to some embodiments of the present disclosure. As shown in FIG. 7, the video processing apparatus 70 of this embodiment includes: a parsing module 701 configured to parse a first video file to obtain a plurality of tracks in the first video file, a last one or more frames of the first video file being invalid frames, the plurality of tracks including at least a track of a specified type and an audio track, the track of the specified type including a video track; a generating module 702 configured to generate a second video file according to the track of the specified type in the first video file; and a synthesizing module 703 configured to synthesize an audio file and the second video file into a multimedia stream.

[0071] In some embodiments, the synthesizing module 703 is further configured to synthesize the audio file and the second video file played in a loop into the multimedia stream.

[0072] In some embodiments, the multimedia stream is a live stream.

[0073] In some embodiments, the generating module 702 is further configured to: extract the track of the specified type from the plurality of tracks; create a new video file object; add the track of the specified type to the created video file object; and generate the second video file based on the video file object.

[0074] In some embodiments, the generating module 702 is further configured to: add a video track in the track of the specified type to the created video file object, and set a start time of the video track to 0.

[0075] In some embodiments, where the number of extracted tracks of the specified type is multiple, the generating module 702 is further configured to: add a first video track of the specified type with the earliest start time among the tracks of the specified type to the created video file object, and set the start time of the first video track as 0; and add other tracks of the specified type to the created video file object according to the offset of the start time of the first video track from the start time of the other tracks in the first video file.

[0076] In some embodiments, the synthesizing module 703 is further configured to: synthesize the audio file, the subtitle corresponding to the audio file, and the second video file into a multimedia stream.

[0077] In some embodiments, the multiple tracks in the first video file further include at least one of a subtitle track, an effect track, and an image track.

[0078] In some embodiments, the invalid frame is a black frame.

[0079] It should be noted that the above-mentioned various units are only logical modules according to the specific functions they implement, and are not intended to limit the specific implementation manner, for example, they can be implemented in software, hardware or a combination of software and hardware. In actual implementation, the above-mentioned various units can be implemented as independent physical entities, or can also be implemented by a single entity (for example, a processor (CPU or DSP, etc.), an integrated circuit, etc.). In addition, the above-mentioned various units are indicated by dashed lines in the drawings, indicating that these units can not actually exist, and the operations / functions they implement can be implemented by the processing circuit itself.

[0080] In addition, although not shown, the device can also include a memory, which can store various information generated by the device, the units included in the device in operation, programs and data for operation, data to be transmitted by the communication unit, etc. The memory can be a volatile memory and / or a non-volatile memory. For example, the memory can include, but is not limited to, a random access memory (RAM), a dynamic random access memory (DRAM), a static random access memory (SRAM), a read-only memory (ROM), a flash memory. Of course, the memory can also be located outside the device. Alternatively, although not shown, the device can also include a communication unit, which can be used for communication with other devices. In one example, the communication unit can be implemented in a suitable manner known in the art, for example, including communication components such as an antenna array and / or a radio frequency link, various types of interfaces, communication units, etc. Here will not be described in detail. In addition, the device can also include other components not shown, such as a radio frequency link, a baseband processing unit, a network interface, a processor, a controller, etc. Here will not be described in detail.

[0081] Some embodiments of the present disclosure also provide an electronic device. FIG. 8 shows a structural schematic diagram of an electronic device according to some embodiments of the present disclosure. For example, in some embodiments, the electronic device 8 can be various types of devices, for example, can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle terminals (for example, car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. For example, the electronic device 8 can include a display panel for displaying data and / or execution results utilized in the schemes according to the present disclosure. For example, the display panel can be various shapes, for example, a rectangular panel, an oval panel, or a polygonal panel, and the like. In addition, the display panel can not only be a flat panel, but also a curved panel, or even a spherical panel.

[0082] As shown in FIG. 8, the electronic device 8 of this embodiment includes a memory 81 and a processor 82 coupled to the memory 81. It should be noted that the components of the electronic device 8 shown in FIG. 8 are only exemplary and are not limiting, and the electronic device 8 can also have other components according to actual application needs. The processor 82 can control other components in the electronic device 8 to perform desired functions.

[0083] In some embodiments, the memory 81 is configured to store one or more computer readable instructions. When the processor 82 executes the computer readable instructions, the computer readable instructions are implemented by the processor 82 to perform the method according to any of the above embodiments. For specific implementation of each step of the method and related explanations, please refer to the above embodiments, and repeated parts will not be described here.

[0084] For example, the processor 82 and the memory 81 can directly or indirectly communicate with each other. For example, the processor 82 and the memory 81 can communicate through a network. The network can include a wireless network, a wired network, and / or any combination of a wireless network and a wired network. The processor 82 and the memory 81 can also communicate with each other through a system bus, and the present disclosure does not limit the communication between the processor 82 and the memory 81.

[0085] For example, the processor 82 can be embodied as various appropriate processors, processing devices, and the like, such as a central processing unit (CPU), a graphics processing unit (GPU), a network processing unit (NP), and the like; also can be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The central processing unit (CPU) can be an X86 or ARM architecture, and the like. For example, the memory 81 can include any combination of various forms of computer readable storage media, such as a volatile memory and / or a non-volatile memory. The memory 81 may, for example, include a system memory, which stores, for example, an operating system, application programs, a boot loader, a database, and other programs, and the like. Various application programs and various data, and the like, can also be stored in the storage medium.

[0086] In addition, according to some embodiments of the present disclosure, various operations / processes according to the present disclosure, in the case of being implemented by software and / or firmware, programs constituting the software can be installed from a storage medium or a network to a computer system having a dedicated hardware structure, such as the computer system 90 shown in FIG. 9, which, when various programs are installed, is capable of performing various functions, including functions such as those described above, and the like. FIG. 9 shows a structural schematic diagram of a computer system according to some embodiments of the present disclosure.

[0087] In FIG. 9, the central processing unit (CPU) 901 performs various processes according to programs stored in the read only memory (ROM) 902 or programs loaded from the storage portion 908 to the random access memory (RAM) 903. In the RAM 903, data required when the CPU 901 performs various processes, and the like, is also stored as needed. The central processing unit is merely exemplary, and can also be other types of processors, such as various processors described above. The ROM 902, the RAM 903, and the storage portion 908 can be various forms of computer readable storage media, as described below. It should be noted that although the ROM 902, the RAM 903, and the storage device 908 are shown separately in FIG. 9, one or more of them can be combined or located in the same or different memory or storage module.

[0088] The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output interface 905 is also connected to the bus 904.

[0089] The following components are connected to the input / output interface 905: an input portion 906, such as a touch panel, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, and the like; an output portion 907, including a display, such as a cathode ray tube (CRT), a liquid crystal display (LCD), a speaker, a vibrator, and the like; a storage portion 908, including a hard disk, a magnetic tape, and the like; and a communication portion 909, including a network interface card, such as a LAN card, a modem, and the like. The communication portion 909 allows communication processing to be performed via a network, such as the Internet. It is easily understood that, although the respective devices or modules in the computer system 90 are shown as communicating through the bus 904 in FIG. 9, they can also communicate through a network or other means, where the network can include a wireless network, a wired network, and / or any combination of a wireless network and a wired network.

[0090] The drive 910 is also connected to the input / output interface 905 as necessary. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like, is attached to the drive 910 as necessary, so that a computer program read therefrom is installed into the storage portion 908 as necessary.

[0091] In the case where the above series of processes are implemented by software, the program constituting the software can be installed from a network such as the Internet or a storage medium such as the removable medium 911.

[0092] According to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product including a computer program carried on a computer-readable medium, the computer program containing program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network by the communication device 909, or installed from the storage device 908, or installed from the ROM 902. When the computer program is executed by the CPU 901, the above-described functions defined in the methods of the embodiments of the present disclosure are executed.

[0093] Note that in the context of the present disclosure, a computer-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer-readable storage medium can be any tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium can include a computer-readable program code transmitted in baseband or as part of a carrier wave over a transmission medium, in which the computer-readable program code can be embodied. Such a transmitted computer-readable signal medium can take a variety of forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium that can be used to carry or transport a computer-readable program code for use by or in connection with an instruction execution system, apparatus, or device. The program code contained in the computer-readable medium can be transmitted using any suitable medium, including but not limited to wire, cable, RF (radio frequency), etc., or any suitable combination of the foregoing.

[0094] The above computer-readable medium can be included in the above electronic device; or can exist separately from the electronic device.

[0095] In some embodiments, a computer program is also provided, including instructions which, when executed by a processor, cause the processor to perform the method of any one of the above embodiments. For example, the instructions can be embodied as computer program code.

[0096] Computer program code for carrying out operations of the present disclosure can be written in any one or more of a variety of programming languages or combinations of languages including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can 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 the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0097] The flow diagrams and the block diagrams in the drawings are meant only to illustrate possible architectures, functions and operations for a system, method and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0098] The modules, components or units described in the embodiments of the present disclosure can be implemented by software or by hardware. In some cases, the name of the module, component or unit does not constitute a limitation on the module, component or unit itself.

[0099] The functions described above in the detailed description of embodiments of the present disclosure can be implemented in one or more hardware logic components or by any combination of hardware logic components and computer instructions. For example, non-limiting examples of hardware logic components include field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SOCs), complex programmable logic devices (CPLDs), etc.

[0100] The above description merely provides an overview of some embodiments of the present disclosure and the inventive concept thereof. The disclosure should not be limited by the specific illustrated embodiments, which can vary in many ways. For example, the above described embodiments and terminology are used in a non-limiting sense to provide a general description of the principles of the present disclosure. The scope of the disclosure is not limited to the specific embodiments described herein, but only to what the claims shall ultimately claim. It should be appreciated that those skilled in the art can devise other embodiments and modifications that fall within the scope and spirit of the disclosure. For example, features shown in the above described embodiments can be used in combination with each other or in other embodiments, or replaced by other features having the same or similar function. Any such modifications that do not depart from the scope and spirit of the described disclosure are intended to be included.

[0101] In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application can be practiced without these specific details. In other instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.

[0102] In addition, while operations are depicted in a particular, chronological sequence, this should not be understood as requiring such order unless otherwise specifically indicated, and include can be advantageous to perform multiple operations loading or in parallel. Likewise, while several specific implementations are discussed herein, these should not be taken as limiting. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented or provided in multiple embodiments separately or in any suitable sub-combination. It will be appreciated that numerous specific details are set forth herein, in order to provide a thorough understanding of the application. However, it is recognized that the application might be practiced without these specific details. In other instances, well-known methods, procedures and components have not been described in detail so as not to unnecessarily obscure aspects of the application.

[0103] While certain embodiments of the disclosure have been described herein, other embodiments will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. Therefore, the disclosure is not limited to these embodiments, but instead has a scope as defined by the appended claims. In addition, various modifications can be made in the details apparent to those skilled in the art without departing from the scope and spirit of the disclosure. Accordingly, the disclosure is not limited to the specific embodiments described above, but only as defined in the following claims.

Claims

1. A method for processing a video, comprising: parsing a first video file to obtain a plurality of tracks in the first video file, a last one or more frames of the first video file being invalid frames, the plurality of tracks comprising at least a track of a specified type and an audio track, the track of the specified type comprising a video track; generating a second video file according to the track of the specified type in the first video file; synthesizing an audio file and the second video file into a multimedia stream.

2. The treatment method of claim 1, wherein, The synthesizing an audio file and the second video file into a multimedia stream comprises: synthesizing an audio file and the second video file playing in a loop into a multimedia stream.

3. The treatment method according to claim 1 or 2, wherein, The multimedia stream is a live stream.

4. The treatment method according to any one of claims 1 to 3, wherein, The generating a second video file according to the track of the specified type in the first video file comprises: extracting the track of the specified type from the plurality of tracks; creating a new video file object; adding the track of the specified type into the created video file object; generating the second video file based on the video file object.

5. The treatment method of claim 4, wherein, The adding the track of the specified type into the created video file object comprises: adding the video track in the track of the specified type into the created video file object and setting a start time of the video track as 0.

6. The treatment method of claim 5, wherein, The number of the extracted tracks of the specified type is a plurality, and the adding the track of the specified type into the created video file object comprises: adding a first video track with an earliest start time in the track of the specified type into the created video file object and setting a start time of the first video track as 0; adding other tracks in the track of the specified type into the created video file object according to offsets of start times of the first video track and the other tracks in the first video file.

7. The live method according to any one of claims 1 to 6, wherein, The synthesizing an audio file and the second video file into a multimedia stream comprises: synthesizing the audio file, a subtitle corresponding to the audio file and the second video file into the multimedia stream.

8. The treatment method according to any one of claims 1 to 7, wherein, The plurality of tracks in the first video file further comprises at least one of a subtitle track, an effect track and an image track.

9. The treatment method according to any one of claims 1 to 8, wherein, The invalid frames are black frames.

10. An apparatus for processing a video, comprising: a parsing module configured to parse a first video file to obtain a plurality of tracks in the first video file, a last one or more frames of the first video file being invalid frames, the plurality of tracks comprising at least a track of a specified type and an audio track, the track of the specified type comprising a video track; a generating module configured to generate a second video file according to the track of the specified type in the first video file; a synthesizing module configured to synthesize an audio file and the second video file into a multimedia stream.

11. An electronic device, comprising: a memory; and a processor coupled to the memory, the processor configured to perform a method for processing a video according to any one of claims 1 to 9 based on instructions stored in the memory. ​ 12. A computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of processing a video according to any one of claims 1 to 9.

13. A computer program product which, when executed on a computer, causes the computer to implement the method of processing a video according to any one of claims 1 to 9.

14. A computer program comprising: instructions which, when executed by a processor, cause the processor to perform the method of processing a video according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method of composing multimedia data and video player for playing moving pictures in an android operating system

    CN105245795A

  • Video correction result storage improvement method

    CN113206853A

  • Video duration optimization processing method and system

    CN115714882A

  • Video container with editable presentation objects

    US10665264B1