Opened 3 years ago
Last modified 7 weeks ago
#9574 new defect
-profile option only accepts numeric values for aac_at encoder
Reported by: | Markus | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
The definition of
static const AVOption options[] = {
misses the line
FF_AAC_PROFILE_OPTS
so profile names cannot be mapped to numbers. When specified as numeric values, the profiles work just fine, e.g. 4 works as aac_he and 28 as aac_he_v2
Change History (4)
comment:1 by , 7 weeks ago
comment:2 by , 7 weeks ago
To be specify, this is not using the ffmpeg
command line executable, but rather the libavcodec/libav directly.
I compile it for conda-forge https://github.com/conda-forge/ffmpeg-feedstock so it isn't too hard to go to historical versions.
Unfortunately, I use PyAv https://github.com/PyAV-Org/PyAV/ shims for compatibility, so it isn't super easy for me to give you code in C to reproduce.
comment:3 by , 7 weeks ago
Code highlighting:
ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers built with gcc 13.3.0 (conda-forge gcc 13.3.0-1) configuration: --prefix=/home/conda/feedstock_root/build_artifacts/ffmpeg_1727723455708/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac --cc=/home/conda/feedstock_root/build_artifacts/ffmpeg_1727723455708/_build_env/bin/x86_64-conda-linux-gnu-cc --cxx=/home/conda/feedstock_root/build_artifacts/ffmpeg_1727723455708/_build_env/bin/x86_64-conda-linux-gnu-c++ --nm=/home/conda/feedstock_root/build_artifacts/ffmpeg_1727723455708/_build_env/bin/x86_64-conda-linux-gnu-nm --ar=/home/conda/feedstock_root/build_artifacts/ffmpeg_1727723455708/_build_env/bin/x86_64-conda-linux-gnu-ar --disable-doc --enable-openssl --enable-demuxer=dash --enable-hardcoded-tables --enable-libfreetype --enable-libharfbuzz --enable-libfontconfig --enable-libopenh264 --enable-libdav1d --disable-gnutls --enable-libmp3lame --enable-libvpx --enable-libass --enable-pthreads --enable-vaapi --enable-libopenvino --enable-gpl --enable-libx264 --enable-libx265 --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-pic --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libopus --pkg-config=/home/conda/feedstock_root/build_artifacts/ffmpeg_1727723455708/_build_env/bin/pkg-config libavutil 59. 39.100 / 59. 39.100 libavcodec 61. 19.100 / 61. 19.100 libavformat 61. 7.100 / 61. 7.100 libavdevice 61. 3.100 / 61. 3.100 libavfilter 10. 4.100 / 10. 4.100 libswscale 8. 3.100 / 8. 3.100 libswresample 5. 3.100 / 5. 3.100 libpostproc 58. 3.100 / 58. 3.100 Input #0, lavfi, from 'nullsrc=s=256x256:d=8': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: wrapped_avframe, yuv420p, 256x256 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn Stream mapping: Stream #0:0 -> #0:0 (wrapped_avframe (native) -> h264 (h264_nvenc)) Press [q] to stop, [?] for help Output #0, null, to 'pipe:': Metadata: encoder : Lavf61.7.100 Stream #0:0: Video: h264 (Main), yuv420p(tv, progressive), 256x256 [SAR 1:1 DAR 1:1], q=2-31, 2000 kb/s, 25 fps, 25 tbn Metadata: encoder : Lavc61.19.100 h264_nvenc Side data: cpb: bitrate max/min/avg: 0/0/2000000 buffer size: 4000000 vbv_delay: N/A [out#0/null @ 0x55c0b8b40940] video:9KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: unknown frame= 200 fps=0.0 q=9.0 Lsize=N/A time=00:00:07.88 bitrate=N/A speed=23.2x $ ffmpeg -hide_banner -f lavfi -i nullsrc=s=256x256:d=8 -f null -vcodec h264_nvenc -profile:v 77 - Input #0, lavfi, from 'nullsrc=s=256x256:d=8': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: wrapped_avframe, yuv420p, 256x256 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn [h264_nvenc @ 0x55ee6eaf5e00] Value 77.000000 for parameter 'profile' out of range [0 - 3] [h264_nvenc @ 0x55ee6eaf5e00] Error setting option profile to value 77. [vost#0:0/h264_nvenc @ 0x55ee6eaf59c0] Error applying encoder options: Numerical result out of range Error opening output file -. Error opening output files: Numerical result out of rang
works but reveals that the error that I'm getting through the C-API might be due to a missing lookup????
And sorry, i just noticed that the issue was opened 3 years ago.... i thought I read "3 days ago"...
I've noticed the same thing for the h264 encoders (h264_nvenc, hevc_nvenc, libopenh264).
One thing I've noticed is that:
If I try to specify profile 77 (as a string) it finds the MAIN profile for all 3 on version 7.1.0 it works.
On Version 6.1.2 and 7.0.2 profile 77 (as a string) gives: Numerical result out of range with h264_nvenc.
I'm currently switching on the version of FFMPEG to get around it.