Pipe UDP input to FFMPEG

2019-02-15 12:21发布

问题:

A video camera is sending me video data as RTPs via UDP on a local port.

Does ffmpeg support automatically conversion of input (H.264 payload) to MP4 ?

How to do that ?

回答1:

This should work:

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

Or try:

ffmpeg -i rtp://localhost:1234 -vcodec copy output.mp4

Replace 1234 with your port. I assume that the input is already in H.264, if not, remove the -vcodec copy.



标签: ffmpeg udp rtp