Skip to main content

ArtBox is a tool set for handling multimedia files.

Project description

ArtBox

ArtBox is a tool set for handling multimedia files.

Features

TBD

Setup

ArtBox uses some dependencies that maybe would not work well in your machine. In order to have everything well installed, create a conda/mamba environment and install artbox there.

$ mamba create --name artbox "python>=3.8.1,<3.12" pygobject pip
$ conda activate artbox
$ pip install artbox

Examples

For the following examples, create the a temporary folder for artbox:

$ mkdir /tmp/artbox

Convert text to audio

By default, the artbox speech uses edge-tts engine, but if you can also specify gtts with the flag --engine gtts.

$ echo "Are you ready to join Link and Zelda in fighting off this unprecedented threat to Hyrule?" > /tmp/artbox/text.md
$ artbox speech text-to-speech \
    --title artbox \
    --input-path /tmp/artbox/text.md \
    --output-path /tmp/artbox/speech.mp3 \
    --engine edge-tts

If you need to generate the audio for different language, you can use the flag --lang:

$ echo "Bom dia, mundo!" > /tmp/artbox/text.md
$ artbox speech text-to-speech \
    --title artbox \
    --input-path /tmp/artbox/text.md \
    --output-path /tmp/artbox/speech.mp3 \
    --lang pt

If you are using edge-tts engine (the default one), you can also specify the locale for that language, for example:

$ echo "Are you ready to join Link and Zelda in fighting off this unprecedented threat to Hyrule?" > /tmp/artbox/text.md
$ artbox speech text-to-speech \
    --title artbox \
    --input-path /tmp/artbox/text.md \
    --output-path /tmp/artbox/speech.mp3 \
    --engine edge-tts \
    --lang en-IN

Additionally, if you are using edge-tts, you can specify --rate, --volume, and --pitch, for example:

$ echo "Do you want some coffee?" > /tmp/artbox/text.md
$ artbox speech text-to-speech \
    --title artbox \
    --input-path /tmp/artbox/text.md \
    --output-path /tmp/artbox/speech.mp3 \
    --engine edge-tts \
    --lang en \
    --rate +10% \
    --volume -10% \
    --pitch -5Hz

Download a youtube video

If you want to download videos from the youtube, you can use the following command:

$ artbox youtube download \
    --url https://www.youtube.com/watch?v=zw47_q9wbBE \
    --output-path /tmp/artbox/

The command above downloads using a random resolution. If you want a specific resolution, use the flat --resolution:

$ artbox youtube download \
    --url https://www.youtube.com/watch?v=zw47_q9wbBE \
    --output-path /tmp/artbox/ \
    --resolution 360p

Create a song based on the musical notes

# json format
echo '["E", "D#", "E", "D#", "E", "B", "D", "C", "A"]' > /tmp/artbox/notes.txt
$ artbox sound notes-to-audio \
  --input-path /tmp/artbox/notes.txt \
  --output-path /tmp/artbox/music.mp3 \
  --duration 2

Remove the audio from a video

First, download the youtube video https://www.youtube.com/watch?v=zw47_q9wbBE as explained before.

Next, run the following command:

$ artbox video remove-audio \
  --input-path "/tmp/artbox/The Legend of Zelda Breath of the Wild - Nintendo Switch Presentation 2017 Trailer.mp4" \
  --output-path /tmp/artbox/botw.mp4

Extract the audio from a video

First, download the youtube video https://www.youtube.com/watch?v=zw47_q9wbBE as explained before.

Next, run the following command:

$ artbox video extract-audio \
  --input-path "/tmp/artbox/The Legend of Zelda Breath of the Wild - Nintendo Switch Presentation 2017 Trailer.mp4" \
  --output-path /tmp/artbox/botw-audio.mp3

Combine audio and video files

First, execute the previous steps:

  • Download a youtube video
  • Remove the audio from a video
  • Extract the audio from a video

Next, run the following command:

$ artbox video combine-video-and-audio \
  --video-path /tmp/artbox/botw.mp4 \
  --audio-path /tmp/artbox/botw-audio.mp3 \
  --output-path /tmp/artbox/botw-combined.mp4

Additional dependencies

If you want to use Python to play your audio files, you can install playsound:

$ pip wheel --use-pep517 "playsound (==1.3.0)"

Troubleshoot

After installing with poetry install:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

artbox-0.13.0.tar.gz (23.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

artbox-0.13.0-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file artbox-0.13.0.tar.gz.

File metadata

  • Download URL: artbox-0.13.0.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.13 Linux/6.14.0-1017-azure

File hashes

Hashes for artbox-0.13.0.tar.gz
Algorithm Hash digest
SHA256 7ff93501f206df7305e7de95dbb07db64ab5340aa28113bc82e3bcf93ceff49d
MD5 cf895e65b6ae7e05e64deb80e091cfe8
BLAKE2b-256 0d58ac5c3a72009b69e2ec9daa150def9a6b218dfee153ee91c5206e276e31b7

See more details on using hashes here.

File details

Details for the file artbox-0.13.0-py3-none-any.whl.

File metadata

  • Download URL: artbox-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.13 Linux/6.14.0-1017-azure

File hashes

Hashes for artbox-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b3100b1ca6dcc869d634bf88643b0482200e95b441ac42723c9469c443e4852
MD5 eb9bba1f04e1b96b108eaa4dd49fbc7b
BLAKE2b-256 ce06d7dfba514e41f0c595d0b4e425e7d0889ecab6a3b66ea81942b16a15a3f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page