这两天折腾FFmpeg,想要通过rtp把音频和视频一同推送出去,一直失败,如下图
后面度娘之后,才知道这是rtp自身的限制,只能推送一个媒体流。
Your ffmpeg command creates two streams, one for video, one for audio. Do this instead:
ffmpeg -re -i SomeVideo.mp4 -vcodec copy -an -f rtp rtp://127.0.0.1:11111 -vn -acodec copy -f rtp rtp://127.0.0.1:11112
Port 11111 then has video without audio (-an).
Port 11112 then has audio without video (-vn).
Read each stream with, e.g., ffplay rtp://127.0.0.1:11112.