Ubuntu 如何使用ffmpeg和本机fps进行流式传输

Ubuntu 如何使用ffmpeg和本机fps进行流式传输,ubuntu,ffmpeg,pipe,streaming,Ubuntu,Ffmpeg,Pipe,Streaming,我想流与本机(30 fps)文件从原始格式(使用管道)。我有这个: ./program | ffmpeg -f rawvideo -r 30 -pixel_format bgr24 -video_size 1280x720 -i - -f mpegts -r 30 udp://127.0.0.1:12344 它是有效的。但我的输出速度为17-18 fps: Input #0, rawvideo, from 'pipe:': Duration: N/A, start: 0.000000, b

我想流与本机(30 fps)文件从原始格式(使用管道)。我有这个:

./program | ffmpeg -f rawvideo -r 30 -pixel_format bgr24 -video_size 1280x720 -i - -f mpegts -r 30 udp://127.0.0.1:12344
它是有效的。但我的输出速度为17-18 fps:

Input #0, rawvideo, from 'pipe:':
  Duration: N/A, start: 0.000000, bitrate: 663552 kb/s
    Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 1280x720, 663552 kb/s, 30 tbr, 30 tbn, 30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg2video (native))
Output #0, mpegts, to 'udp://127.0.0.1:1234':
  Metadata:
    encoder         : Lavf58.16.100
    Stream #0:0: Video: mpeg2video (Main), yuv420p, 1280x720, q=2-31, 200 kb/s, 30 fps, 90k tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.19.102 mpeg2video
    Side data:

frame=  208 fps= 17 q=31.0 Lsize=     863kB time=00:00:06.86 bitrate=1029.4kbits/s speed=0.553x 

可能是什么问题?

接收速度是多少
/program | ffmpeg-f rawvideo-r30-像素格式bgr24-视频大小1280x720-i--c copy-f null-
事实上,我知道这是个什么问题。无标志
-像素_格式bgr24
ffmpeg流,每秒30帧。但视频已损坏@Gyan哪个是准确的源像素格式?@Gyan,源视频文件具有yuv420p(ffmpeg信息)。之后,我的程序像素格式是bgr24,它的工作正常,但只有16-18 fps。如果我设置-pixel_格式yuv420p,视频将被破坏,但是如果超过30 fps,我的命令的fps输出是什么?