[FFmpeg-user] live rawimage feed to h264 file issues

Olivier Langlois olivier at trillion01.com
Thu Feb 27 07:43:09 CET 2014


Hi,

with this command in a bash script:


ffmpeg -f rawvideo -video_size 296x296 -pixel_format bgr24 -framerate 30
-i /dev/stdin \
 -c:v libx264 -preset superfast -profile:v main -level 4.1 -pix_fmt
yuv420p \
 -x264opts keyint=60:bframes=2:ref=1 -maxrate 400k -bufsize 800k
-shortest $4.mkv \
 &>> /tmp/pipe_ffmpeg.out

I am feeding ffmpeg with a live rawimage feed. It is working but I have
2 probably small issues:

1. The raw images are bitmaps with upside down rows (like standard bmp
file images format). ie: the first row is the bottom most row of the
picture.

This result into having the output video image upside down. Is there an
efficient way to fix that? There must be one as my feed is essentially a
sequence of Microsoft BMP images minus the file header.

2. In theory my live feed should be 30 fps but in reality, it is more
like ~10fps.

The consequence is that the output movie playback feels like 10x faster
than the real speed. Is this possible to address that with ffmpeg? Maybe
to reuse the same frame for a couple of frames until a new frame becomes
available.

thank you in advance for your advices




More information about the ffmpeg-user mailing list