CoolFace
Apppublic

Canstralian/ai-video-composer

sourceHugging Faceupdated 2y agoView on Hugging Face
1likes
App README

๐Ÿž AI Video Composer

AI Video Composer is an intelligent media processing application that uses natural language instructions to create videos from your media assets. It leverages the Qwen2.5-Coder language model to generate FFmpeg commands based on your requirements.

How It Works

  1. 1.Upload Media Files:
  • โ€”Supports multiple file formats including:
  • โ€”Images: .png, .jpg, .jpeg, .tiff, .bmp, .gif, .svg
  • โ€”Audio: .mp3, .wav, .ogg
  • โ€”Video: .mp4, .avi, .mov, .mkv, .flv, .wmv, .webm, and more
  • โ€”File size limit: 10MB per file
  • โ€”Video duration limit: 2 minutes
  1. 1.Provide Instructions:
  • โ€”Write natural language instructions describing how you want to process your media
  • โ€”Examples:
  • โ€”"Convert these images into a slideshow with 1 second per image"
  • โ€”"Add this audio track to the video"
  • โ€”"Make the video play 2x faster"
  • โ€”"Create a waveform visualization for this audio file"
  1. 1.Advanced Parameters:
  • โ€”Top-p (nucleus sampling): Controls diversity of generated commands (0-1)
  • โ€”Temperature: Controls randomness in command generation (0-5)
  1. 1.Processing:
  2. 2.The app analyzes your files and instructions
  3. 3.Generates an optimized FFmpeg command using Qwen2.5-Coder
  4. 4.Executes the command and returns the processed video
  5. 5.Displays the generated FFmpeg command for transparency

Features

  • โ€”Smart Command Generation: Automatically generates optimal FFmpeg commands based on natural language input
  • โ€”Error Handling: Validates commands before execution and retries with alternative approaches if needed
  • โ€”Multiple Asset Support: Process multiple media files in a single operation
  • โ€”Waveform Visualization: Special support for audio visualization with customizable parameters
  • โ€”Image Sequence Processing: Efficient handling of image sequences for slideshow creation
  • โ€”Format Conversion: Support for various input/output format conversions
  • โ€”Example Gallery: Built-in examples demonstrating common use cases

Technical Details

  • โ€”Built with Gradio for the user interface
  • โ€”Uses FFmpeg for media processing
  • โ€”Powered by Qwen2.5-Coder for command generation
  • โ€”Implements robust error handling and command validation
  • โ€”Processes files in a temporary directory for safety
  • โ€”Supports both simple operations and complex media transformations

Limitations

  • โ€”Maximum file size: 10MB per file
  • โ€”Maximum video duration: 2 minutes
  • โ€”Output format: Always MP4
  • โ€”Processing time may vary based on input complexity

Contributing

If you have ideas for improvements or bug fixes, please open a PR:

![Open a Pull Request](https://huggingface.co/spaces/huggingface-projects/video-composer-gpt4/discussions)