Search

CN-122027823-A - FFmpeg-based creative video editing method, system and related equipment

CN122027823ACN 122027823 ACN122027823 ACN 122027823ACN-122027823-A

Abstract

The invention provides a creative video editing method, a creative video editing system and related equipment based on FFmpeg, wherein the method comprises responding to video importing operation, analyzing the video by using an FFmpeg engine, and obtaining video metadata comprising frame rate and resolution; the method comprises the steps of selecting or recommending an adaptive special effect template set from a preset special effect material library based on video metadata, receiving target special effects determined by a user through a preset mode, wherein the preset mode comprises a visual selection mode and an AI text instruction customization mode, performing special effect synthesis and audio-video synchronization on the target special effects and the video to generate an effect video, and performing content complexity-based self-adaptive coding on the effect video to derive a target video file. According to the invention, special effect adaptation is performed by merging the AI mode, so that the creation threshold of a user is reduced, and the efficiency and effect of video creation are improved.

Inventors

  • JIANG YAMING
  • CHEN ZIWEN

Assignees

  • 深圳麦风科技有限公司

Dates

Publication Date
20260512
Application Date
20260206

Claims (10)

  1. 1. A creative video editing method based on FFmpeg, comprising: responding to video importing operation, analyzing the video by using an FFmpeg engine, and obtaining video metadata comprising frame rate and resolution; Screening or recommending an adapted special effect template set from a preset special effect material library based on the video metadata; Receiving a target special effect determined by a user through a preset mode, wherein the preset mode comprises a visual selection mode and an AI text instruction customization mode; Performing special effect synthesis and audio-video synchronization on the target special effect and the video to generate an effect video; and after the effect video is subjected to self-adaptive coding based on content complexity, a target video file is derived.
  2. 2. The FFmpeg-based creative video editing method of claim 1, wherein the receiving the target special effect determined by the user through the preset mode comprises: If the preset mode is an AI text instruction customization mode, a natural language processing model is adopted to identify core effects, trigger conditions and effect attributes in text instructions input by a user; Invoking a target detection model to locate the space-time position of the triggering condition in the video frame of the video; and mapping the core effect and the effect attribute into a target effect customized based on the effect template set based on a preset rule base, and applying the target effect at the space-time position.
  3. 3. The FFmpeg-based creative video editing method of claim 1, wherein the receiving the target special effect determined by the user through the preset mode further comprises: If the preset mode is a visual selection mode, displaying the special effect template set to a user in a mode of icon, name and scene label; When a user selects a target special effect from the special effect template set, reading a JSON configuration file of the target special effect through a plug-in engine to dynamically load the target special effect, wherein the configuration file comprises special effect parameters, icons and associated sound effect information.
  4. 4. The FFmpeg-based creative video editing method of claim 1, wherein the performing special effects synthesis and audio video synchronization on the target special effects and the video to generate an effect video comprises: Detecting and tracking joint point coordinates of a special effect object in a video picture of the video by adopting a human body posture estimation algorithm; And dynamically binding the center coordinates of the target special effects with the joint point coordinates to enable the special effect track of the target special effects to move in real time along with the target actions of the special effect objects.
  5. 5. The FFmpeg-based creative video editing method of claim 4, wherein the performing special effects synthesis and audio video synchronization on the target special effects and the video, generating an effect video further comprises: And binding the sound effect time stamp associated with the special effect with the initial frame time stamp of the target action by adopting a PTS time stamp alignment mechanism, so as to realize sound and picture synchronization.
  6. 6. The FFmpeg-based creative video editing method of claim 1, wherein the deriving a target video file after adaptively encoding the effect video based on content complexity comprises: Analyzing the content complexity of different fragments in the effect video; And dynamically adjusting CRF values of different fragments in the encoding process according to the content complexity.
  7. 7. The FFmpeg-based creative video editing method of claim 6, wherein dynamically adjusting CRF values of different segments in the encoding process according to the content complexity comprises: the CRF value of a first numerical interval is adopted for high-complexity fragments with special effect indexes larger than a preset first threshold value and/or motion indexes larger than a preset second threshold value; and adopting the CRF value of a second numerical interval for the low-complexity segment with the special effect index smaller than or equal to the preset first threshold value and/or the motion index smaller than or equal to the preset second threshold value, wherein the first numerical interval is smaller than the second numerical interval.
  8. 8. A creative video editing system based on FFmpeg is characterized in that, the FFmpeg-based creative video editing system comprises: the video data analysis module is used for responding to the video importing operation, analyzing the video by using the FFmpeg engine and acquiring video metadata comprising frame rate and resolution; The special effect template adaptation module is used for screening or recommending an adapted special effect template set from a preset special effect material library based on the video metadata; The target special effect acquisition module is used for receiving a target special effect determined by a user through a preset mode, wherein the preset mode comprises a visual selection mode and an AI text instruction customization mode; the effect video synthesis module is used for carrying out effect synthesis and audio-video synchronization on the target effect and the video to generate an effect video; And the target video export module is used for exporting a target video file after carrying out self-adaptive coding based on the content complexity on the effect video.
  9. 9. An FFmpeg based creative video editing device comprising a memory and at least one processor, the memory having instructions stored therein, the memory and the at least one processor being interconnected by a line; The at least one processor invoking the instructions in the memory to cause the FFmpeg-based creative video editing device to perform the FFmpeg-based creative video editing method of any of claims 1-7.
  10. 10. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the FFmpeg-based creative video editing method of any one of claims 1-7.

Description

FFmpeg-based creative video editing method, system and related equipment Technical Field The invention relates to the technical field of video editing, in particular to a creative video editing method, system and related equipment based on FFmpeg. Background With the vigorous development of mobile internet and social media platforms, short videos become a mainstream form of information transmission and personal expression, and video editing demands are also growing increasingly, so that various video editing tools appear on the market to meet the demands, however, the conventional video editing tools generally only provide special effect selection of page display forms on special effect selection, and cannot support personalized special effect matching according to the creation intention of users. Accordingly, the prior art is still in need of improvement and development. Disclosure of Invention The invention provides a creative video editing method, a creative video editing system and related equipment based on FFmpeg, and aims to solve the technical problems in the background technology in the prior art. The first aspect of the invention provides a creative video editing method based on FFmpeg, which comprises the following steps: responding to video importing operation, analyzing the video by using an FFmpeg engine, and obtaining video metadata comprising frame rate and resolution; Screening or recommending an adapted special effect template set from a preset special effect material library based on the video metadata; Receiving a target special effect determined by a user through a preset mode, wherein the preset mode comprises a visual selection mode and an AI text instruction customization mode; Performing special effect synthesis and audio-video synchronization on the target special effect and the video to generate an effect video; and after the effect video is subjected to self-adaptive coding based on content complexity, a target video file is derived. In an optional implementation manner of the first aspect of the present invention, the receiving the target special effect determined by the user through the preset mode includes: If the preset mode is an AI text instruction customization mode, a natural language processing model is adopted to identify core effects, trigger conditions and effect attributes in text instructions input by a user; Invoking a target detection model to locate the space-time position of the triggering condition in the video frame of the video; and mapping the core effect and the effect attribute into a target effect customized based on the effect template set based on a preset rule base, and applying the target effect at the space-time position. In an optional implementation manner of the first aspect of the present invention, the receiving the target special effect determined by the user through the preset mode further includes: If the preset mode is a visual selection mode, displaying the special effect template set to a user in a mode of icon, name and scene label; When a user selects a target special effect from the special effect template set, reading a JSON configuration file of the target special effect through a plug-in engine to dynamically load the target special effect, wherein the configuration file comprises special effect parameters, icons and associated sound effect information. In an optional implementation manner of the first aspect of the present invention, the performing special effect synthesis and audio-video synchronization on the target special effect and the video, and generating an effect video includes: Detecting and tracking joint point coordinates of a special effect object in a video picture of the video by adopting a human body posture estimation algorithm; And dynamically binding the center coordinates of the target special effects with the joint point coordinates to enable the special effect track of the target special effects to move in real time along with the target actions of the special effect objects. In an optional implementation manner of the first aspect of the present invention, the performing special effect synthesis and audio-video synchronization on the target special effect and the video, and generating the effect video further includes: And binding the sound effect time stamp associated with the special effect with the initial frame time stamp of the target action by adopting a PTS time stamp alignment mechanism, so as to realize sound and picture synchronization. In an optional implementation manner of the first aspect of the present invention, after the adaptively encoding the effect video based on content complexity, the deriving the target video file includes: Analyzing the content complexity of different fragments in the effect video; And dynamically adjusting CRF values of different fragments in the encoding process according to the content complexity. In an optional implementation manner of the first aspect of the presen