[FFmpeg-devel] [PATCH] nvenc: Make AUD optional for h264_nvenc and hevc_nvenc

Miroslav Slugeň thunder.m at email.cz
Fri Dec 30 11:07:43 EET 2016


Dne 30.12.2016 v 05:48 Ali KIZIL napsal(a):
> 2016-12-30 0:02 GMT+03:00 Miroslav Slugeň <thunder.m at email.cz>:
>
>> Somebody changed AUD to active in NVENC by default, which is not very
>> clever, libx264 also has this future disabled, so we should stay in sync
>> with libx264 behavior.
>>
>> Enabled AUD will work only without B-frames. There is BUG in Nvidia NVENC
>> when you use AUD for H264 with B-frames, it will return corrupted stream,
>> because NVIDIA is inserting AUD type 0 (I-frame) before B-frames instead of
>> AUD type 7 (any-frame).
>>
>> H264 encoded with B-frames and AUD active will not play for example on
>> Panasonic TX-AS640E, other decoders just ignore wrong AUD type.
>>
>>
>> --
>> Miroslav Slugeň
>>
>>
> AUD set to active by default was for LG and Sony like UHD TVs which could
> not decode NVENC encoded HEVC MPEGTS properly.
> If patch sets AUD active by default if there is no B-Frames (as so in NVENC
> HEVC encoding), patch will be ok in common.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
I checked how libx264 and libx265 works

For libx265 default is off:

void x265_param_default(x265_param* param) {
param->bEnableAccessUnitDelimiters = 0;
}

Only for UHD BLURAY is on:

if (p->uhdBluray) {
p->bEnableAccessUnitDelimiters = 1;
}

For libx264 default is off:

void x264_param_default( x264_param_t *param ) {
param->b_aud = 0;
}

Only for BLURAY and AVC-Intra compat

if( h->param.b_bluray_compat ) {
h->param.b_aud = 1;
}

/* 200,100,50 */
if( h->param.i_avcintra_class ) {
h->param.b_aud = 1;
}

So how we should implement this to NVENC? :)

I still think we should default AUD to off and set in on only in special 
cases like BLURAY and AVC-Intra.

-- 
Miroslav Slugeň
+420 724 825 885



More information about the ffmpeg-devel mailing list