[FFmpeg-devel] Sharing cuda context between transcode sessions to reduce initialization overhead

2017-06-12 Thread Ganapathy Raman Kasi
Hi, Currently incase of using 1 -> N transcode (1 SW decode -> N NVENC encodes) without HW upload filter, we end up allocating multiple Cuda contexts for the N transcode sessions for the same underlying gpu device. This comes with the cuda context initialization overhead. (~100 ms per context

[FFmpeg-devel] [PATCH] avcodec/nvenc : fix hw accelerated transcode with bframes

2017-06-02 Thread Ganapathy Raman Kasi
Hi, HW accelerated transcode (h264_cuvid -> h264_nvenc with -hwaccel cuvid) was broken after the filtergraph initialization was changed to intialize decoder first followed by encoder (commit af1761f7b5b1b72197dc40934953b775c2d951cc). During initialzing encoder with bframes, local buffers are al

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Add default value for AVCodecContext::refs

2017-06-01 Thread Ganapathy Raman Kasi
Timo, >> Is this supposed to fix the issue with -bf >0? We are working on another patch which will fix hw accelerated transcode (with -hwaccel cuvid) for bf > 0 and will send out for review soon. Thanks Ganapathy From: ffmpeg-devel on behalf of Timo Ro

Re: [FFmpeg-devel] [PATCH] NVENC Surface Allocation Reduction

2017-04-26 Thread Ganapathy Raman Kasi
Timo, > Also, the same command line, but with -bf 1 or any higher number causes: > [h264_nvenc @ 0x2c788c0] EncodePicture failed!: no encode device (1) > > This is not a new issue, it is happening ever since. It only happens when > -hwaccel cuvid is specified. > It's not an issue with the CUDA F

Re: [FFmpeg-devel] [PATCH] Remove qmin and qmax constraints for nvenc vbr

2017-03-01 Thread Ganapathy Raman Kasi
:32 +0100 Miroslav Slugeň wrote: > 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

Re: [FFmpeg-devel] [PATCH] Remove qmin and qmax constraints for nvenc vbr

2017-02-27 Thread Ganapathy Raman Kasi
Can someone please help review patch. Thanks. Ganapathy -Original Message- From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of Ganapathy Raman Kasi Sent: Thursday, February 23, 2017 5:42 PM To: FFmpeg development discussions and patches Subject: [FFmpeg-devel

Re: [FFmpeg-devel] [PATCH] Remove qmin and qmax constraints for nvenc vbr

2017-02-23 Thread Ganapathy Raman Kasi
Sorry, typo below: Change -preset medium to -preset slow in ii) Ganapathy -Original Message- From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of Ganapathy Raman Kasi Sent: Thursday, February 23, 2017 6:01 PM To: FFmpeg development discussions and patches Subject

Re: [FFmpeg-devel] [PATCH] Remove qmin and qmax constraints for nvenc vbr

2017-02-23 Thread Ganapathy Raman Kasi
NV_ENC_PARAMS_RC_VBR With patch : $OUT_medium and $OUT_slow will be different and ii) will take more time to run and usually results in better quality. Thanks Ganapathy -Original Message- From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of Ganapathy Raman Kasi Sent

[FFmpeg-devel] [PATCH] Remove qmin and qmax constraints for nvenc vbr

2017-02-23 Thread Ganapathy Raman Kasi
Hi, qmin and qmax are not necessary for nvenc vbr. Enforcing this constraint, doesn't allow user to use vbr 2 pass mode ( NV_ENC_PARAMS_RC_2_PASS_VBR) without explicity setting the qmin and qmax options and reverts to the default vbr mode ( NV_ENC_PARAMS_RC_VBR). If needed user can still set

Re: [FFmpeg-devel] [PATCH] libavcodec/nvenc.c Reduce initialization time for gpu id > 0

2017-01-19 Thread Ganapathy Raman Kasi
Yes, this is a simpler logic. Works for me locally. Can you please apply this patch to ffmpeg master. Thanks. -Original Message- From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of Timo Rothenpieler Sent: Wednesday, January 18, 2017 3:01 PM To: ffmpeg-devel@ffmpeg.or

[FFmpeg-devel] [PATCH] libavcodec/nvenc.c Reduce initialization time for gpu id > 0

2017-01-17 Thread Ganapathy Raman Kasi
Hi, The attached patch reduces initialization time when using a gpu device > 0 in a multi-gpu setup. It removes the initialization of cuda context and nvenc session for gpus which are not requested by the user, thereby increasing startup performance. This is my first time sending a patch to ff