https://github.com/ttskch/audio2video-cli
A CLI tool to convert an audio file to a simple video file.
https://github.com/ttskch/audio2video-cli
audio cli converter video
Last synced: 10 months ago
JSON representation
A CLI tool to convert an audio file to a simple video file.
- Host: GitHub
- URL: https://github.com/ttskch/audio2video-cli
- Owner: ttskch
- License: mit
- Created: 2016-06-19T12:58:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-17T09:46:23.000Z (almost 9 years ago)
- Last Synced: 2025-02-08T12:25:59.443Z (about 1 year ago)
- Topics: audio, cli, converter, video
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# audio2video-cli
A CLI tool to convert an audio file to a simple video file.
Maybe it's useful for attaching just audio to your tweet. (We cannot attach audio file but can do video file.)
## Installation
### Homebrew
```sh
$ brew tap ttskch/audio2video
$ brew install audio2video
```
> ### Manual
>
> The following are require.
>
> * PHP 5.4+
> * ffmpeg (with toolchain)
> * imagemagick
> * php-imagick
>
> ```sh
> # e.g. for macOS
> $ brew tap homebrew/php
> $ brew install ffmpeg --with-tools
> $ brew install php71 imagemagick php71-imagick
>
> # e.g. for Ubuntu
> $ apt-get install -y php ffmpeg libavcodec-extra imagemagick php-imagick
> ```
>
> Then you can install me.
>
> ```sh
> $ git clone git@github.com:ttskch/audio2video-cli.git
> $ cd audio2video-cli
> $ composer install
> $ ln -s $(pwd)/audio2video /usr/local/bin/
> ```
## Usage
```
$ audio2video conv --help
Usage:
conv [options] [--] []
Arguments:
audio-file path to audio file
output-format extension of output video file [default: "mp4"]
Options:
-i, --image-file=IMAGE-FILE path to image file
-c, --image-color=IMAGE-COLOR if "--image_file" isn't set, you can specify the color of auto-generated simple color image [default: "black"]
-r, --image-resolution=IMAGE-RESOLUTION if "--image_file" isn't set, you can specify the resolution of auto-generated simple color image [default: "800x450"]
-f, --video-frame-rate=VIDEO-FRAME-RATE frame rate of output video file [default: "30"]
-w, --overwrite if this flag is set, existing same named video file will be overwritten
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Convert audio file to simple video file
```
### Examples
```sh
$ audio2video conv sample.mp3
$ audio2video conv sample.mp3 avi
$ audio2video conv sample.mp3 avi -i sample.png
$ audio2video conv sample.mp3 m4v -c white
$ audio2video conv sample.mp3 m4v -c "#123456" -r 1600x900
$ audio2video conv sample.mp3 m4v -c white -r 1600x900 -f 15
```
For example, when you input a mp3 file like below:

And exec command below:
```sh
$ audio2video conv sample.mp3
/path/to/current/sample.mp4 is generated successfully.
```
Then you get mp4 file like below:

## See also
This feature as a service is here:
* http://audio2video.me
* [ttskch/audio2video](https://github.com/ttskch/audio2video)