rigaya / NVEnc

NVENCによる高速エンコードの性能実験
https://rigaya34589.blog.fc2.com/blog-category-17.html
Other
1.03k stars 108 forks source link

libopus: Please support mapping_family as well as recommended/default bitrates #585

Closed agressiv closed 6 days ago

agressiv commented 2 months ago

When encoding libopus audio, please consider adding support for mapping_family argument that the encoder supports. ffmpeg supports it via -mapping_family 1 as a parameter. In addition, the bitrates NVEnc (and QSVEnc) default to are very low for multi-channel audio.

As an example, a 7.1 channel audio from a movie:

When encoded with NVEnc/QSVEnc (forced to 416k) or ffmpeg WITHOUT -mapping_family 1:

When encoded via opusenc.exe (via piping from ffmpeg or eac3to), or ffmpeg with -mapping_family 1:

NVEnc/QSVEnc would otherwise default to 192kilobit/sec, regardless of channels. It would be great if it they both used a bitrate that was proportional to the number of channels:

7.1 = 416k 6.1 = 352k 5.1 = 320k 2.0 = 96k 1.0 = 64k

Thanks!

rigaya commented 2 months ago

Setting "mapping_family" for libopus should be already available by --audio-codec libopus:mapping_family=1.

I'll think about the default audio bitrate in the next release. NVEnc defaults 192kbps if not set as you have mentioned, but it might be better to let audio codec itself to decide as same as ffmpeg.

rigaya commented 1 month ago

NVEnc 7.53 will let codecs (like libopus) to set bitrate automatically when --audio-bitrate is not set, allowing the default bitrate to change according to the number of channels.

agressiv commented 6 days ago

Thanks for this change!