get-tracks/README.md

43 lines
1.0 KiB
Markdown
Raw Normal View History

2021-03-27 21:18:08 +01:00
# Required applications
* ffmpeg
* xxd (with '-r' and '-p' options)
* awk
2021-03-27 21:18:08 +01:00
# Usage
```Bash
2021-04-06 16:10:02 +02:00
get-tracks.sh rip <audio-file> <time-file>
# Example
get-track.sh rip doom-eternal.opus doom-eternal.txt
2021-03-27 21:18:08 +01:00
```
2021-04-06 16:10:02 +02:00
`audio-file` can be in any format understood by `ffmpeg`.
2021-03-27 21:18:08 +01:00
2021-04-06 16:10:02 +02:00
The `time-file` must have this format:
2021-03-27 21:18:08 +01:00
```
0:00 First song
2:20 Second song
3:18 Awesome song
```
# Environment variables
2021-04-06 16:10:02 +02:00
* **SIMULATION**: if non empty do not invoke ffmpeg
* **FORMAT** [mp3,ogg,opus,…]: for the song file format
2021-04-06 23:03:02 +02:00
* **NONUMBER**: if equals to 1, do not write song number
2021-04-06 16:10:02 +02:00
* **SEPARATOR**: (default: ' - '), write song number, with this separator
example with SEPARATOR='_': song names will be 01_song.opus 02_song.opus…
* **HEADERS**: if equals to 1, print environment parameters (verbosity, simulation, etc.)
2021-04-06 16:10:02 +02:00
* **VERBOSITY** [0-3] (default: 1)\
2021-04-06 23:03:02 +02:00
verbosity 0: no output except errors from ffmpeg\
verbosity 1: simple indications on the current track being extracted\
verbosity 2: print actual ffmpeg commands the script currently runs
2021-03-27 21:18:08 +01:00
# More
Run `get-track.sh` without arguments.