annotate set-flac-tracknums.py @ 132:71df0cf3aa05
default tip
add create.py
this is a script to render out video files from entire albums,
singles, or EPs. eventually it can be edited to be more robust
(such as automatically finding discogs/musicbrainz links) but
I think it's pretty damn good for now.
It's basically just an ffmpeg frontend with a few hardcoded options
that are suitable for this kind of thing.
| author |
Paper <paper@tflc.us> |
| date |
Fri, 02 Jan 2026 10:35:03 -0500 |
| parents |
7b9795a60e59 |
| children |
|
| rev |
line source |
|
130
|
1 #!/usr/bin/env python3
|
|
|
2 import glob
|
|
|
3 import subprocess
|
|
|
4
|
|
|
5 # list of Popen classes to wait on
|
|
|
6 # this allows us to run metaflac independently on
|
|
|
7 # a huge list of files concurrently
|
|
|
8 processes = list()
|
|
|
9
|
|
|
10 i = 1
|
|
|
11
|
|
|
12 # glob the files in order
|
|
|
13 files = glob.glob("*.flac")
|
|
|
14 files.sort()
|
|
|
15 for g in files:
|
|
|
16 processes.append(subprocess.Popen(["metaflac", "--set-tag=TRACKNUMBER=%d" % (i), g]))
|
|
|
17 i += 1
|
|
|
18
|
|
|
19 for p in processes:
|
|
|
20 p.wait()
|