我希望从原始格式(使用管道)获取原生(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
可能是什么问题?