#5390 closed defect (fixed)
Nvenc Based HEVC Encoding Compability Fix
Reported by: | smallishzulu | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avcodec |
Version: | git-master | Keywords: | nvenc |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Hello,
Nvidia Nvenc bassed HEVC encoding need Access Unit Delimeters based on HEVC specification:
Access Unit Delimiter, which is mandatory.
ITU-T H.222.0 Amendment 3 (01/2014)
14 Clause 2.17
2.17 Carriage of HEVC
2.17.1 Constraints for the transport of HEVC
Each HEVC access unit shall contain an access unit delimiter NAL unit;
Currently, nvenc HEVC coding does not enable AUD which causes LG and Sony TVs unable to decode FFmpeg generated MPEGTS streams.
The Fix is:
libavcodec/nvenc.c Line 951:
951: case AV_CODEC_ID_H265:
952: ctx->encode_config.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourMatrix = avctx->colorspace;
Needs to be changed to:
951: case AV_CODEC_ID_H265:
952: ctx->encode_config.encodeCodecConfig.hevcConfig.outputAUD = 1;
953: ctx->encode_config.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourMatrix = avctx->colorspace;
So Access Unit Delimiter for HEVC Encoding is Enabled.
Problem is fixed for Sony and LG TVs in decoding.
Regards,
Change History (5)
comment:1 by , 9 years ago
Keywords: | aud removed |
---|---|
Priority: | important → normal |
follow-up: 3 comment:2 by , 9 years ago
Hi again,
Used command line:
ffmpeg -i input.ts -s 3840x2160 -r 50 -vcodec nvenc_hevc -preset llhq -vb 25000k -acodec aac -ab 128k -muxrate 30000k -f mpegts output.ts
The output does not generate any error in FFmpeg log. The issue is if you try to play this TS file in LG and Sony TVs, the TS file can not be displayed as there is no AUD in Nvenc HEVC encoding. So it is needed to be enabled by ctx->encode_config.encodeCodecConfig.hevcConfig.outputAUD = 1; in line 952.
Regards,
comment:3 by , 9 years ago
Replying to smallishzulu:
ffmpeg -i input.ts -s 3840x2160 -r 50 -vcodec nvenc_hevc -preset llhq -vb 25000k -acodec aac -ab 128k -muxrate 30000k -f mpegts output.ts
The output does not generate any error in FFmpeg log.
Please provide the log to make this a valid ticket.
comment:4 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I suspect this was fixed in b3557c79dcd8c3415a7de06d51294ed79e4489bf
Either
git format-patch
to the development mailing list. This is of course always preferred.