[FFmpeg-user] How to set h264_nvenc encode 4K bitrate to 500mb?
Dennis Mungai
dmngaie at gmail.com
Thu Jul 4 12:50:57 EEST 2019
On Thu, 4 Jul 2019 at 12:34, 冯良怀 <flhcd at 163.com> wrote:
>
>
> hi,
> The maximum code rate set by h264_nvenc encoder for 4K coding is 140
> mb. Program error occurs when the code rate exceeds 140 mb:[h264_nvenc @
> 0000017e632de440] InitializeEncoder failed: invalid param (8).
> How to Set the Bit Rate to 500MB in 4K Coding?
>
>
> ffmpeg.exe -i L:\1.mp4 -c:v h264_nvenc -b:v 500000k -g 25 -c:a aac -f
> mp4 l:\test500mb.mp4 -y
> ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
> libavutil 56. 14.100 / 56. 14.100
> libavcodec 58. 18.100 / 58. 18.100
> libavformat 58. 12.100 / 58. 12.100
> libavdevice 58. 3.100 / 58. 3.100
> libavfilter 7. 16.100 / 7. 16.100
> libswscale 5. 1.100 / 5. 1.100
> libswresample 3. 1.100 / 3. 1.100
> libpostproc 55. 1.100 / 55. 1.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'L:\1.mp4':
> Metadata:
> major_brand : qt
> minor_version : 512
> compatible_brands: qt
> encoder : Lavf58.12.100
> Duration: 00:01:08.60, start: 0.000000, bitrate: 18142 kb/s
> Stream #0:0(eng): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv,
> unknown/bt2020/unknown), 3840x2160 [SAR 1:1 DAR 16:9], 11996 kb/s, 25 fps,
> 25 tbr, 12800 tbn, 25 tbc (default)
> Metadata:
> handler_name : DataHandler
> Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 7.1,
> s16, 6144 kb/s (default)
> Metadata:
> handler_name : DataHandler
> Stream mapping:
> Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_nvenc))
> Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
> Press [q] to stop, [?] for help
> [h264_nvenc @ 0000017e632de440] InitializeEncoder failed: invalid param (8)
> Error initializing output stream 0:0 -- Error while opening encoder for
> output stream #0:0 - maybe incorrect parameters such as bit_rate, rate,
> width or height
> [aac @ 0000017e6322b700] Qavg: 45469.547
> [aac @ 0000017e6322b700] 2 frames left in the queue on closing
>
>
>
>
>
> --
>
>
>
>
>
>
> 成都东方盛行电子有限责任公司
>
> 研发中心 冯良怀
>
> 2019年7月4日
>
> ADD:成都高新区天华二路81号天府软件园C区C10号楼9楼
>
> P C:610041
>
> TEL:028-85441107-891\892
>
> HTTP:www.ds.net.cn
>
>
NVENC's encoder bitrate limit is 50M.
You cannot initialize the encoder with values for -b:v, -maxrate:v or
-bufsize:v exceeding 50M.
I believe the same also applies to Intel's implementations (QuickSync and
VAAPI).
More information about the ffmpeg-user
mailing list