Hi,
this will add support for b_adapt for HEVC encoder, now Turing HEVC
NVENC with SDK 9.0 also supports B-frames and this option is in default
mode disabled. Enable it by default, because it could add around 0.02
PSNR for free.
--
Miroslav Slugeň
+420 724 825 885
diff --git a/libavcodec
Dne 28.2.2017 v 10:44 Timo Rothenpieler napsal(a):
Am 28.02.2017 um 01:24 schrieb Ganapathy Raman Kasi:
Can someone please help review patch. Thanks.
I have seen an marked it, but I don't have time to review and test stuff
right now.
Will get to it eventually.
__
Dne 14.2.2017 v 09:33 Steven Liu napsal(a):
2017-02-14 16:30 GMT+08:00 Miroslav Slugeň :
Dne 14.2.2017 v 04:59 Steven Liu napsal(a):
2017-02-13 21:15 GMT+08:00 Miroslav Slugeň :
This patch will fix cutting hls segments into exactly same length. Because
it will intialize only on first
Dne 14.2.2017 v 04:59 Steven Liu napsal(a):
2017-02-13 21:15 GMT+08:00 Miroslav Slugeň :
This patch will fix cutting hls segments into exactly same length. Because
it will intialize only on first ref_packet, which is video frame, not audio
frame (old behavior)
Now it should be possible to
Dne 14.2.2017 v 06:51 Hendrik Leppkes napsal(a):
On Mon, Feb 13, 2017 at 11:00 PM, Timo Rothenpieler
wrote:
It is problem in NVENC.
You create first frame before initialization of NVENC in CUVID, so this
first frame is not accesible to NVENC until
dl_fn->cuda_dl->cuCtxPushCurrent(ctx->cu_conte
Dne 13.2.2017 v 23:00 Timo Rothenpieler napsal(a):
It is problem in NVENC.
You create first frame before initialization of NVENC in CUVID, so this
first frame is not accesible to NVENC until
dl_fn->cuda_dl->cuCtxPushCurrent(ctx->cu_context) is called in NVENC.
This trivial patch should fix your
Dne 13.2.2017 v 11:18 Timo Rothenpieler napsal(a):
That's what it looks like for me:
https://bpaste.net/show/890855410dac
Happens on two independend machines, on both Windows using MSVC and
Linux with gcc.
Both machines are definitely nowehre near out of memory, on either
system or device memory
Dne 13.2.2017 v 17:07 Philip Langdale napsal(a):
On Mon, 13 Feb 2017 07:21:51 -0800
Philip Langdale wrote:
On Mon, 13 Feb 2017 08:52:34 +0100
Miroslav Slugeň wrote:
I am using current STABLE drivers 375.26, because BETA drivers
378.09 caused some crashes while encoding on NVENC.
I
parameter.
This is required to support adaptive HLS.
This patch was splitted to two parts, this is first independent part
--
Miroslav Slugeň
>From 2d0bbf0a68bc5f85f24c65a65e3ae70c362e82dc Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Mon, 13 Feb 2017 14:13:18 +0100
Subj
Dne 12.2.2017 v 23:27 Timo Rothenpieler napsal(a):
I just tried your build with this cmd line:
ffmpeg -hwaccel cuvid -c:v h264_cuvid -i simpson_1920p_h264.mp4 -y -c:v
hevc_nvenc -an -b:v 512K -qmin 5 -qmax 50 -preset slow
out_1920p_1920p_hq.mp4
And everything works well, do you have not working
Dne 13.2.2017 v 09:11 Hendrik Leppkes napsal(a):
On Mon, Feb 13, 2017 at 9:08 AM, Miroslav Slugeň wrote:
Problem is that when you are using for example 200 input streams you have to
always specify correct input format h264/mpeg2/nvenc. Also when you are
using -hwaccel cuvid you have to specify
Dne 13.2.2017 v 05:08 wm4 napsal(a):
On Sun, 12 Feb 2017 21:20:12 +
Mark Thompson wrote:
On 12/02/17 20:37, Miroslav Slugeň wrote:
This patch is for discussion only, not ready to commit yet and maybe newer will
be.
We were facing issue when using -hwaccel cuvid we have to also specify
Dne 13.2.2017 v 05:03 wm4 napsal(a):
On Sun, 12 Feb 2017 21:07:40 +0100
Miroslav Slugeň wrote:
Dne 12.2.2017 v 20:59 Hendrik Leppkes napsal(a):
On Sun, Feb 12, 2017 at 8:51 PM, Miroslav Slugeň wrote:
This patch is for discussion only, not ready to commit yet.
1. Cuvid decoder actualy
Dne 12.2.2017 v 23:35 Michael Niedermayer napsal(a):
On Sun, Feb 12, 2017 at 07:31:43PM +0100, Miroslav Slugeň wrote:
This patch will fix cutting hls segments into exactly same length.
Because it will intialize only on first ref_packet, which is video
frame, not audio frame (old behavior)
It
Dne 12.2.2017 v 23:20 Philip Langdale napsal(a):
On Sun, 12 Feb 2017 22:43:41 +0100
Miroslav Slugeň wrote:
Dne 12.2.2017 v 22:31 Timo Rothenpieler napsal(a):
On 2/12/2017 10:25 PM, Miroslav Slugeň wrote:
This patch is for discussion only, not ready to commit yet and
maybe newer will be
Dne 12.2.2017 v 22:31 Timo Rothenpieler napsal(a):
On 2/12/2017 10:25 PM, Miroslav Slugeň wrote:
This patch is for discussion only, not ready to commit yet and maybe
newer will be.
NVENC in current CUDA 8 SDK is setting wrong aspect ratio when encoding
resolution 720x576 and 720x480 and using
very ugly
way how to fix it. I hope someone in NVIDIA will fix this soon, because
all encoded streams are not displayed correctly for example in videojs
player.
Support for HEVC is currently broken.
--
Miroslav Slugeň
>From 2300c38e381ee9bf4af96e6c0f6d05193738bcab Mon Sep 17 00
Dne 12.2.2017 v 22:06 Timo Rothenpieler napsal(a):
I have seen those patches in mailing list. Have you tried it on QUADRO
cards which are not limited to only 2 streams per system? It could be
related to protection in NVIDIA drivers for NON-PRO cards.
It it definitely not related to that limitati
Dne 12.2.2017 v 20:59 Timo Rothenpieler napsal(a):
On 2/12/2017 8:53 PM, Miroslav Slugeň wrote:
Dne 12.2.2017 v 20:25 Timo Rothenpieler napsal(a):
On 2/12/2017 8:18 PM, Miroslav Slugeň wrote:
This patch is for discussion only, not ready to commit yet.
We were facing issue when using -hwaccel
specify -cuvid and ffmpeg will pick cuvid decoder for any supported input.
I don't know correct solution for this yet.
--
Miroslav Slugeň
>From 08e448c036166b645a0364c0a2a6b2b1dbdd869d Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Sun, 12 Feb 2017 21:32:45 +0100
Add drop_second_field for CUVID input. It is not enabled by default this
time and will fix reporting correct frame_rate
--
Miroslav Slugeň
>From c5277c84eba2b1f7b6ee92cf7cb4a2df23a9b536 Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Sun, 12 Feb 2017 21:20:56 +0100
Subj
Dne 12.2.2017 v 21:01 Timo Rothenpieler napsal(a):
On 2/12/2017 8:56 PM, Miroslav Slugeň wrote:
2. We should change it in libx264 and libx265
Changing it in nvenc now would be kind of an API break, as the behaviour
might change without someone expecting it
Dne 12.2.2017 v 20:59 Hendrik Leppkes napsal(a):
On Sun, Feb 12, 2017 at 8:51 PM, Miroslav Slugeň wrote:
This patch is for discussion only, not ready to commit yet.
1. Cuvid decoder actualy support scaling input to requested resolution
without any performance penalty (like libnpp does), so
Dne 12.2.2017 v 20:56 Timo Rothenpieler napsal(a):
On 2/12/2017 8:35 PM, Miroslav Slugeň wrote:
Thx for comment,
cuvid can't output 50fps deinterlaced output, both frames are same, and
default behavior for yadif is to downcovert to half frame rate, so i
think is very clever to do the same
Dne 12.2.2017 v 20:52 Timo Rothenpieler napsal(a):
On 2/12/2017 8:43 PM, Miroslav Slugeň wrote:
Dne 12.2.2017 v 20:29 Timo Rothenpieler napsal(a):
The current behavior is intended like it is.
On the default of -1, it does not care about I/IDR frame requests, in
mode 0 it will generate intra
Dne 12.2.2017 v 20:25 Timo Rothenpieler napsal(a):
On 2/12/2017 8:18 PM, Miroslav Slugeň wrote:
This patch is for discussion only, not ready to commit yet.
We were facing issue when using -hwaccel cuvid, then we were unable to
use -filter_complex filters for video streams, this hack fixed it
tests only in 4px steps, this
is also very nice, because hwaccel cuvid hasn't any cropping filter.
Anybody feel free to adopt this patch and modify it for final commit.
--
Miroslav Slugeň
>From 9f5dfd6e9cabd3d419a3a58f7bfa3b3c1e179638 Mon Sep 17 00:00:00 2001
From: Mirosla
Dne 12.2.2017 v 20:29 Timo Rothenpieler napsal(a):
The current behavior is intended like it is.
On the default of -1, it does not care about I/IDR frame requests, in
mode 0 it will generate intra frames, and in mode 1 it will generate
full IDR frames.
_
Dne 12.2.2017 v 20:27 Timo Rothenpieler napsal(a):
On 2/12/2017 7:53 PM, Miroslav Slugeň wrote:
If there is input like DVB-T streams it can change aspect ratio
on-the-fly, so nvenc should respect this change and change aspect ratio
in encoder.
Haven't tested yet, but seems like a good
stay with that!
if (ctx->deint_mode != cudaVideoDeinterlaceMode_Weave)
avctx->framerate = av_mul_q(avctx->framerate, (AVRational){2, 1});
Miroslav Slugeň
+420 724 825 885
Dne 12.2.2017 v 20:25 Timo Rothenpieler napsal(a):
It does make sense, the deinterlacers convert 50 interlace
This patch is for discussion only, not ready to commit yet.
We were facing issue when using -hwaccel cuvid, then we were unable to
use -filter_complex filters for video streams, this hack fixed it, but i
am sure that it is not ready to commit, because it is dirty/ugly fix.
--
Miroslav Slugeň
There is no need to copy second field if deinterlacing, it doesn't make
sense to use two times same image.
--
Miroslav Slugeň
>From 73d8f9fa17c26125a5b03243284f67126c70d7a6 Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Sun, 12 Feb 2017 20:00:51 +0100
Subject: [P
If there is input like DVB-T streams it can change aspect ratio
on-the-fly, so nvenc should respect this change and change aspect ratio
in encoder.
--
Miroslav Slugeň
>From d836780d56fb7d7a63d91a2af87a0f84743d95d6 Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Sun, 12
intialization packet PTS.
Now it should be possible to create segments at exactly same length if
we use new -force_key_frames hls:time_in_seconds parameter.
This is required to support adaptive HLS.
--
Miroslav Slugeň
>From a59a7dbe6fdcab64c1402adb8f11cc31400f4516 Mon Sep 17 00:00:00 2
.
--
Miroslav Slugeň
>From 90d0636ea6cd34c9b51e4b568bb9e8aa461fa615 Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Sun, 12 Feb 2017 19:08:27 +0100
Subject: [PATCH 1/1] ffmpeg: add new forced_keyframes option -hls:time for
inserting keyframes exactly athlsenc position compatible w
If there is progressive input it will disable deinterlacing in cuvid for
all future frames even those interlaced.
I suggest to backport this patch to stable, because deinterlacing of
combined files (progressive+interlaced) is currently broken in cuvid.
--
Miroslav Slugeň
>F
There was error in forcing key frames. If IDR was set to -1 (default)
forced key frame will be never propagated to encoder.
I also suggest to backport this patch to current stable version, because
-forced_keyframe behavior in NVENC is actualy broken.
--
Miroslav Slugeň
>F
Dne 9.2.2017 v 07:49 wm4 napsal(a):
On Wed, 8 Feb 2017 23:31:54 +0100
Miroslav Slugeň wrote:
It is much more robust solution to always calculate second field (when
deinterlacing) PTS from frame rate, then relating on previous PTS,
because if there are B frames in input and some video frames
Dne 8.2.2017 v 23:59 Carl Eugen Hoyos napsal(a):
2017-02-08 23:31 GMT+01:00 Miroslav Slugeň :
It is much more robust solution to always calculate second field
(when deinterlacing) PTS from frame rate
Without looking at your patch, I would have guessed that not
every stream has a useful frame
in do_video_out.
--
Miroslav Slugeň
>From f8a19eb5fb82fee0cce1e1d7248bec57bdea08ac Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Wed, 8 Feb 2017 23:26:28 +0100
Subject: [PATCH 1/1] cuvid: Always calculate second field pts from frame rate
---
libavcodec/cuvid.c |
-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
--
Miroslav Slugeň
+420 724 825 885
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Dne 30.12.2016 v 17:38 Mark Thompson napsal(a):
On 30/12/16 16:12, Miroslav Slugeň wrote:
Dne 30.12.2016 v 15:32 Mark Thompson napsal(a):
On 29/12/16 21:02, Miroslav Slugeň wrote:
Somebody changed AUD to active in NVENC by default, which is not very clever,
libx264 also has this future
Dne 30.12.2016 v 15:32 Mark Thompson napsal(a):
On 29/12/16 21:02, Miroslav Slugeň wrote:
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
Dne 30.12.2016 v 05:48 Ali KIZIL napsal(a):
2016-12-30 0:02 GMT+03:00 Miroslav Slugeň :
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
Dne 30.12.2016 v 05:48 Ali KIZIL napsal(a):
2016-12-30 0:02 GMT+03:00 Miroslav Slugeň :
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
Round qpIntra and qpInter calculation instead of old floor behavior.
Adopted from vaapi_encode_h264.c
--
Miroslav Slugeň
>From f983a74bd055d2786de2f3f0227d444361310721 Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Thu, 29 Dec 2016 22:08:41 +0100
Subject: [PATCH 1/1] NVENC: Ro
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ň
>F
which should
not be used
3. Always reducing DAR width and height is very useful for future use
when we will be monitoring aspect ratio change for reseting encoder...
--
Miroslav Slugeň
>From 53bda222d1a3d4c461816d144dcecf792762da49 Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Su
enc not yet, that is the reason why that bug was hidden.
--
Miroslav Slugeň
>From 6eb95f381add35de0ae83e826ee8fdeaccf6c31d Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Sun, 27 Nov 2016 00:58:16 +0100
Subject: [PATCH 1/1] vf_scale_npp: move aspect ratio correction
Thanks, sending corrected version.
just changed OFFSET(surfaces) to OFFSET(nb_surfaces)
Miroslav Slugeň
Dne 21.11.2016 v 13:29 Timo Rothenpieler napsal(a):
Does not compile:
libavcodec/cuvid.c:861:19: error: 'CuvidContext' has no member named
'surfaces'
#defin
Thanks, sending corrected version.
just changed OFFSET(surfaces) to OFFSET(nb_surfaces)
Miroslav Slugeň
+420 724 825 885
Dne 21.11.2016 v 13:29 Timo Rothenpieler napsal(a):
Does not compile:
libavcodec/cuvid.c:861:19: error: 'CuvidContext' has no member named
'surfaces'
We are using more decoding threads at once, so it is sometime useful to
lower number of surfaces used for decoding, it could lower GPU memory usage.
--
Miroslav Slugeň
>From 30ddf173c87a9da16ba4725f8beea67d8fa6f537 Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Mon, 21 Nov 2016 10
Thx, i has same opinion :)
Miroslav Slugeň
+420 724 825 885
Dne 21.11.2016 v 12:57 Timo Rothenpieler napsal(a):
Please split the patch into two (or three) patches to make
the review and possible regression tests easier.
The bug was implicitly fixed by the new code, it doesn't seem nece
something that is not intended:
ctx->encode_config.rcParams.enableLookahead = 1;
ctx->encode_config.rcParams.lookaheadDepth = 0;
ctx->encode_config.rcParams.disableIadapt = 0;
ctx->encode_config.rcParams.disableBadapt = 0;
--
Miroslav Slugeň
>From ab98c06a19086ee3763722556295f
Maximum usable surfaces is limited to MAX_REGISTERED_FRAMES constant in
nvenc.h
--
Miroslav Slugeň
>From 96b28516942d76b65e9dce033317909e4c0e019a Mon Sep 17 00:00:00 2001
From: Miroslav Slugen
Date: Mon, 21 Nov 2016 11:04:45 +0100
Subject: [PATCH] NVENC: Maximum usable surfaces is limited
55 matches
Mail list logo