Pipe input in to ffmpeg stdin

ffmpeg has a special pipe flag that instructs the program to consume stdin. note that almost always the input format needs to be defined explicitly. example (output is in PCM signed 16-bit little-endian format): cat file.mp3 | ffmpeg -f mp3 -i pipe: -c:a pcm_s16le -f s16le pipe: pipe docs are here supported audio types are … Read more

Bash Pipe Handling

I decided to write a slightly more detailed explanation. The “magic” here lies in the operating system. Both programs do start up at roughly the same time, and run at the same time (the operating system assigns them slices of time on the processor to run) as every other simultaneously running process on your computer … Read more

link several Popen commands with pipes

I think you want to instantiate two separate Popen objects here, one for ‘ls’ and the other for ‘sed’. You’ll want to pass the first Popen object’s stdout attribute as the stdin argument to the 2nd Popen object. Example: p1 = subprocess.Popen(‘ls …’, stdout=subprocess.PIPE) p2 = subprocess.Popen(‘sed …’, stdin=p1.stdout, stdout=subprocess.PIPE) print p2.communicate() You can keep … Read more