Write multiple streams using pipes
See original GitHub issueI work with multistream audio files in ffmpeg:
ffmpeg -i stream1.m4a -i stream2.m4a -map 0:1 -map 0:2 out.m4a
As I understand this has been discussed here this is supported. Is this correct?
Now is there a way to use pipes as input and doing this in ffmpeg-python so that I can create multistream outputs from e.g. numpy arrays?
Here is an example what I use for single stream outputs:
# audio: numpy array
process = ffmpeg.input('pipe:', format='f32le').output(path).run_async()
process.stdin.write(audio.astype('<f4').tobytes())
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
How to use multiple pipe streams - java - Stack Overflow
I'm trying to make a pipedinputstreams. Its about reading two txt files and filtering that files' data. In LifeCycleManager, reading student, ...
Read more >[stream] support piping multiple streams into a single stream #93
Another use case - piping data from multiple clients into one stream and then piping the stream back into each client, e.g. for...
Read more >Pipe a single read stream to multiple write streams
I havce a single read stream that I want to pipe to multiple write streams on separate iterations of the event loop (using...
Read more >How to connect streams with pipe? - Mario Kandut
With the pipe method it is possible to chain multiple streams together. The requirement for this is that the destination stream is both ......
Read more >Using Streams to Implement Pipes
Piped input and output streams are convenient for methods that produce output to be used as input by someone else. For example, suppose...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As a workaround for muxing multiple stereo streams into one multistream file (e.g. two stereo audio file into a single 2-stream audio file), I came up with the idea of stacking the stereo streams into multiple channels and use a complex filter to map the channels to streams such as:
Would this be implementable in ffmpeg-python? @loretoparisi @kkroening
@loretoparisi I managed to do this now with
-complex_filter
and multiple maps. Is there an example how to use-complex_filter
inffmpeg-python
?