A command-line tool for video and audio processing using FFmpeg, Whisper, and local translation capabilities.
- Transcribe audio from video files using Whisper
- Translate audio to different languages
- Change video playback speed
- Support for various video and audio formats
- macOS or Linux
- FFmpeg
- Whisper (installed via Homebrew)
- Go 1.23 or later
-
Install Homebrew if you haven't already:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install FFmpeg and Whisper:
brew install ffmpeg whisper-cpp
-
Clone the repository:
git clone https://github.com/gleicon/transcoder.git cd transcoder
-
Build the project:
make setup
Linux
944B a>-
Install FFmpeg and Whisper:
# Ubuntu/Debian sudo apt update sudo apt install ffmpeg # Install whisper-cpp from source git clone https://github.com/ggerganov/whisper.cpp.git cd whisper.cpp make sudo make install # Fedora sudo dnf install ffmpeg # Install whisper-cpp from source git clone https://github.com/ggerganov/whisper.cpp.git cd whisper.cpp make sudo make install
-
Clone the repository:
git clone https://github.com/gleicon/transcoder.git cd transcoder
-
Build the project:
make setup
The tool supports both video and audio files. For video files, it can extract audio, transcribe it, and optionally change the video speed. For audio files, it can transcribe and translate them directly.
transcoder -i input.mp4 -o output.mp4 -lang en -speed 1.5
Options:
-i
: Input video file-o
: Output video file-lang
: Target language for translation (e.g., en, es, fr)-speed
: Playback speed multiplier (e.g., 1.5 for 50% faster)
transcoder -i input.wav -o output.srt -lang en
Options:
-i
: Input audio file-o
: Output SRT file-lang
: Target language for translation (e.g., en, es, fr)
- MP4 (.mp4)
- AVI (.avi)
- MOV (.mov)
- MKV (.mkv)
- WAV (.wav)
- MP3 (.mp3)
- M4A (.m4a)
- OGG (.ogg)
If you encounter errors about missing dependencies:
-
For FFmpeg:
# macOS brew install ffmpeg # Ubuntu/Debian sudo apt install ffmpeg # Fedora sudo dnf install ffmpeg
-
For Whisper:
# macOS brew install whisper-cpp # Linux git clone https://github.com/ggerganov/whisper.cpp.git cd whisper.cpp make sudo make install
-
Whisper not found: Make sure whisper-cli is installed and available in your PATH:
which whisper-cli
-
FFmpeg not found: Ensure FFmpeg is installed and available in your PATH:
which ffmpeg
-
Permission issues: If you encounter permission errors, make sure you have write access to the output directory.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.