[FFmpeg-user] Capture multiple streams into same container?

Simon Roberts simon at dancingcloudservices.com
Wed Jun 24 06:31:25 EEST 2020


Greetings all, I'm a pretty low-level ffmpeg user, just doing screen
captures, compressions, and some simple format conversions. I have not made
much progress understanding more advanced key concepts; I apologize if this
is a basic question.

I have a four-input video capture card, (Blackmagic DeckLink) and I
successfully built ffmpeg with support for that. I can capture using the
card, and I can run two captures concurrently as independent processes
putting output into two different files. I haven't tried running all four
at once (though that's my long-term goal, along with another four audio
channels from a USB capture device).

However, I would like to be able to put the multiple streams into a single
file. There are a couple of reasons for this, and if my expectations are
misplaced, now's a great time to tell me. One is that I'd like the
timecodes to be synchronized, another is that I'd prefer a single command
to start everything, and end everything, at the same instant. This, I hope
will reduce the complexity of synchronizing the channels in later editing.

But I have no clue how to start with this. I tried simply adding more input
channels to my input specifications:

ffmpeg -f decklink -i 'DeckLink Quad HDMI Recorder (1)' -f decklink -i
'DeckLink Quad HDMI Recorder (4)'  -c:v copy -c:a copy -metadata
title=DeckLinkCapture  capture.mov

But all I got was a ton of buffer overruns, and a file that ffprobe said
only contained one video stream.

I believe that .mov can hold multiple streams, but I have not particular
reason for using that file format, other than I often use it when I go with
a prores compression. (I'm hoping that later in this project I might get
enough CPU power to go that route, and reduce bandwidth and storage
requirements to less insane levels)

Can someone point me at a template for a command line that might do what I
need? If the explanation or resources might help me understand the concepts
better, that would be a bonus (and might result in my becoming a little
more self-sufficient!)

Cheers,
Simon


--
Simon Roberts
(303) 249 3613


More information about the ffmpeg-user mailing list