If you feel like this example could be improved, you may edit this example here.
In this specific example, we read an RTSP stream from a server. The RTSP server has two streams - A video stream and a ‘Data’ stream. Since we aim to print the data channel byte data to STDOUT, we are ‘mapping’ the 2nd stream of the first input (i.e.: -map 0:1) to the output. We ensure the ’encoding’ we use is text and that this encoding is set to ‘data’ format (i.e.: -c text -f data).
Finally, since FFmpeg typically expects a file output, we add the - to indicate we would like the output to go to STDOUT. That’s it!