I try to extract only one (meta)data stream from a mpegts stream
This are the streams returned by ffprobe
Stream #0:0[0x12c]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x12d]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
Stream #0:2[0x5]: Data: bin_data ([6][0][0][0] / 0x0006)
Stream #0:3[0x262]: Data: bin_data (FBID / 0x44494246)
Stream #0:4[0x258]: Data: klv (KLVA / 0x41564C4B)
I only need the video, audio and the klv stream (0:4).
While I could map this stream by specifying its index
ffmpeg -i udp://[IP] -map 0:4 -map 0:v -map 0:a -f mpegts udp://[IP]
I don't want to rely on the the klv streams position in the container.
I also tried it like
ffmpeg -i udp://[IP] -map 0:d:m:klv -map 0:v -map 0:a -f mpegts udp://[IP]
But this was more guesswork.
How can I either include video, audio and klv or exclude the streams 0:2 and 0:3 without specifying the stream index so the resulting mpegts stream looks like?
Stream #0:0[0x12c]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x12d]: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
Stream #0:2[0x258]: Data: klv (KLVA / 0x41564C4B)