[FFmpeg-user] vaapi_h264 encoding very low bitrate
owen s
owen94012 at gmail.com
Thu Jan 21 10:05:12 EET 2021
Hi Mark,
You're correct in that increasing the framerate for the image input
increases the bitrate.
You also suggested lowering the gop, but that would cause issues if I am
trying to stream at these settings since the gop needs to be 2* framerate.
there's no way to have higher framerate w/ an input image is there?
On Wed, Jan 20, 2021 at 9:08 PM Mark Thompson <sw at jkqxz.net> wrote:
> On 19/01/2021 16:07, owen s wrote:
> > I am running this command with
> > ffmpeg -y -loglevel debug \
> > -vaapi_device /dev/dri/renderD128 \
> > -loop 1 -r 1 -i ./image.jpg -pix_fmt vaapi_vld \
> > -b:v 18000k -minrate 18000k \
> > -vf 'format=nv12|vaapi,hwupload,scale_vaapi=w=1280:h=720' \
> > -rc_mode 3 \
> > -r 30 -g 60 \
> > -c:v h264_vaapi -f flv /dev/null
> >
> > I am getting high encoding speed of greater than 3x but the bitrate is
> > terrible 350Kbits/s
> >
> > Why is that when I can get better encoding speeds using cpu? log file
> > http://0x0.st/-i2j.txt
>
> Given that you're encoding the same image repeatedly, most of the frames
> will be a trivial "this frame is the same as the previous one" which can be
> signalled with very few bits.
>
> If you want to push the bitrate up then either don't use the same frame
> repeatedly as input or decrease the gop size (-g option) so that it is
> forced to intra-code more frames (I would guess that at -g 1 it will
> probably be able to hit the 18M target).
>
> - Mark
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list