What is ffmpeg's UDP protocol?

后端 未结 4 1581
傲寒
傲寒 2021-02-09 00:21

What is ffmpeg\'s UDP protocol ?

Here is example from another question

ffmpeg -i udp://localhost:1234 -vcodec copy output.mp4
Or try:

ffmpeg -i rtp://lo         


        
4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-09 00:38

    udp:// in ffmpeg means that it will stream/parse direct video/audio content (e.g. H.264) into/from UDP network packets, with no intermediate protocols.

    rtp:// on the other hand, adds another level of encapsulation, where video/audio content will be encapsulated into an RTP packet, and the RTP packet will be in turn encapsulated into the UDP packet.

    RTP is much better suited for media streaming, because it includes timestamp and sequencing information. Raw UDP packets lack that information, being more prone to out-of-order and dropped packets, leading to video/audio artifacts.

提交回复
热议问题