This question comes about because I have been working on a CD ripping script in Python that utilizes a few subprocess calls. Currently, I have the following Python 3 code:
for x in range(number_of_tracks):
cdparanoia = subprocess.Popen(['cdparanoia', '-B', x, '-'], stdout=subprocess.PIPE)
flac = subprocess.run(['flac', '--best', '-o' 'output_path', '-'], stdin=cdparanoia.stdout)
While this is a little bit of a watered down excerpt of my main code, this gets the idea across.
But this got me thinking, is there any way I could 'tee' the output of the cdparanoia call to another encoder? I've used programs like dbpoweramp before that have multi-encoder options, so I would like to do something like that. But is it even plausible? If so, how would you go about it?
In advance, thanks for your time.