Assume that I have a fifo of bytes that is essentially coming from a capture card. Basically, this is NOT A FILE ON DISK.
The data in this fifo is a multi-program MPEG-TS. There are three programs, each containing a video stream and one or more audio streams.
When I run FFmpeg by piping in the fifo, it displays the programs and the streams inside of it. However, sometimes Program 1 contains streams 0:1 and 0:3 and other times it may contain 0:4 and 0:2. Even though the PID's always stay the same, FFmpeg tends to give them a random numbering.
My question: Is there a way to select the appropriate streams - I'm fine with selecting by PID - using FFmpeg? (I'm using CLI, btw)
Keep in mind that the map option in FFmpeg will not work because the stream numbers are "randomized" each time I run the ffmpeg command.