Wednesday, 18 July 2018

bash - Piping with Process substitution and joining output again

I'm trying to make use of a powerful remote server in terms of video encoding.


I have a local DVD drive for ripping DVD to memory, finally residing in an mbuffer.


From there, I would like to split streams, redirecting the raw video stream over the network to the remote agent for encoding and piping the resulting stream back, whilst, at the same time, converting the audio stream locally to another format stream. Then, finally, I would like to join both resulting streams to a new file.


Part of this can be solved by teeing the mbuffer contents and redirecting appropriately:


(reading commands) | mbuffer -p 1 -m 5G | tee <(ffmpeg -i - (splitting video stream here) -f avi | ssh 1.2.3.4 'ffmpeg -i - (doing some encoding here) -f - ') | <( ffmpeg -i (processing audio adequately) )


but this leaves me with two pipes redirected without logical separation. In clear: how do I join both streams again (I need to receive distinct input streams for another command: ffmpeg -i -i (doing final conversion) ? Any chance to do that?

No comments:

Post a Comment

Where does Skype save my contact&#39;s avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...