ffmpeg-python icon indicating copy to clipboard operation
ffmpeg-python copied to clipboard

define fps in pipe

Open mayste opened this issue 4 years ago • 1 comments

Hi, I'm trying to create a video with 30 fps. I see this in the logs: Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 512x512, 188743 kb/s, 30 tbr, 30 tbn, 30 tbc but when it's write the frame it's only 25: frame= 305 fps= 25 q=-1.0 Lsize= 471kB time=00:00:10.06 bitrate= 383.2kbits/s speed=0.837x

the code, I tried with filter / input or output params: frame_writer = ffmpeg.input('pipe:', thread_queue_size=100, r=30.0, format='rawvideo', pix_fmt='rgb24' , s='512x512') frame_writer = ffmpeg.filter(frame_writer, 'fps', fps=30.0, round='up') frame_writer = ffmpeg.output(frame_writer, self._vid_path, r=30.0) frame_writer = ffmpeg.run_async(frame_writer, pipe_stdin=True, overwrite_output=True)

Thanks

mayste avatar Apr 20 '21 12:04 mayste

Try this:

frame_writer = ffmpeg.input('pipe:', thread_queue_size=100, framerate=30.0, format='rawvideo', pix_fmt='rgb24'
, s='512x512')

That worked for me

kzvdar42 avatar Apr 13 '22 17:04 kzvdar42