如何使用本机fps与ffmpeg进行流式处理

时间:2018-06-05 11:58:33

标签: 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, 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 

可能是什么问题?

0 个答案:

没有答案