#10689: [Android] Provide options to tweak h264_mediacodec encoder quality vs
bitrate vs speed
-------------------------------------+-----------------------------------
             Reporter:  bubbleguuum  |                    Owner:  (none)
                 Type:  enhancement  |                   Status:  new
             Priority:  normal       |                Component:  avcodec
              Version:  unspecified  |               Resolution:
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-----------------------------------
Changes (by bubbleguuum):

 * summary:
     [Android] Provide options to tweak h264_mediacodec encoder encoding
     quality vs bitrate vs encoding speed
     =>
     [Android] Provide options to tweak h264_mediacodec encoder quality vs
     bitrate vs speed


Old description:

> As of FFmpeg v6.1, there is very little that you can do to tweak the
> video quality output of the h264_mediacodec encoder vs the bitrate
> required (think the equivalent of the libx264 -preset option).
>
> For improving quality, the only way I found is to increase the bitrate
> with the -b:v parameter.
> When that parameter is specified, the encoder will honor it: it acts as a
> max bitrate setting.
> The higher the bitrate specified with -b:v, the higher the quality.
>
> In my experience, it requires a quite high bitrate for an acceptable
> video quality. For example, for 1080p output, at least 10Mbit is required
> for acceptable quality. At 5Mbit, output is very blocky. In that regard,
> it seems to operate very much like the libx264 ultrafast or superfast
> presets.
>
> It would be great to have more control on quality (vs encoding speed and
> bitrate). I'm not super familiar with the MediaCodec encoder API but I
> believe there are settings to tweak quality. Although AFAIK, no h264
> encoder implementation on Android support constant quality (thus
> '-bitrate_mode cq' encoder specific option is not supported) so something
> like -crf cannot probably be implemented. Only VBR and CBR are broadly
> supported.

New description:

 As of FFmpeg v6.1, there is very little that you can do to tweak the video
 quality output of the h264_mediacodec encoder vs the bitrate required
 (think the equivalent of the libx264 -preset option).

 For improving quality, the only way I found is to increase the bitrate
 with the -b:v parameter.
 When that parameter is specified, the encoder will honor it: it acts as a
 max bitrate setting.
 The higher the bitrate specified with -b:v, the higher the quality.

 In my experience, it requires a quite high bitrate for an acceptable video
 quality. For example, for 1080p output, at least 10Mbit is required for
 acceptable quality. At 5Mbit, output is very blocky. In that regard, it
 seems to operate very much like the libx264 ultrafast or superfast
 presets.

 It would be great to have more control on quality (vs encoding speed and
 bitrate). I'm not super familiar with the MediaCodec encoder API but I
 believe there are settings to tweak quality. Although AFAIK, no h264
 encoder implementation on Android support constant quality (thus
 '-bitrate_mode cq' encoder specific option is not supported) so something
 like -crf cannot probably be implemented. Only VBR and CBR are broadly
 supported.

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10689#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to