Nvidia EVENC limited 2 encoding sessions for "None Professional" Card overcome ? - Page 1
Forum section: electronics / general

author: phucpd
author_rank: Newbie
timestamp: June 06, 2016, 02:06:29 pm
content: Hi there,Recently i got involve into a project which requires quite a lot encoding & transrate stuff. Mostly live HD 1080 - h.264 streams to multi profilesBy using hardware encoding GPU ( h.264 ) graphic cards such as Nvidia would accelerate the process up to maybe 3 or 5 times compare to traditional CPU.But for "Consumer grade" cards such as Geforce ( 970 980 Titan ..ect ) you are only allow to create 2 concurrent instances.Again if you buy professional card such as Quadro then you are allowed to have unlimited instances, as much as the card can handle.Since some of you guys here have successfully modified your GTXs card to Quadro variants. Could you please share your information on this "restriction" after you modified your card, let say to a K5000, does it remove the limited 2 sessions ?The idea is let say a Titan X which would have similar specs to a M6000, but would cost 1/5 of the price.One thing through, i have done quite extensive research on this issue, it's seem like the restriction is locked on the driver level, which will identify your Card type and Model and return the result if you can have more than two jobs at the same time and below is a bit of the code for nvenc.c---------------------------------------------------------if (!dl_fn->cuda_lib) {357 av_log(avctx, AV_LOG_FATAL, "Failed loading CUDA library\n");358 goto error;359 }360361 CHECK_LOAD_FUNC(PCUINIT, dl_fn->cu_init, "cuInit");362 CHECK_LOAD_FUNC(PCUDEVICEGETCOUNT, dl_fn->cu_device_get_count, "cuDeviceGetCount");363 CHECK_LOAD_FUNC(PCUDEVICEGET, dl_fn->cu_device_get, "cuDeviceGet");364 CHECK_LOAD_FUNC(PCUDEVICEGETNAME, dl_fn->cu_device_get_name, "cuDeviceGetName");365 CHECK_LOAD_FUNC(PCUDEVICECOMPUTECAPABILITY, dl_fn->cu_device_compute_capability, "cuDeviceComputeCapability");366 CHECK_LOAD_FUNC(PCUCTXCREATE, dl_fn->cu_ctx_create, "cuCtxCreate_v2");367 CHECK_LOAD_FUNC(PCUCTXPOPCURRENT, dl_fn->cu_ctx_pop_current, "cuCtxPopCurrent_v2");368 CHECK_LOAD_FUNC(PCUCTXDESTROY, dl_fn->cu_ctx_destroy, "cuCtxDestroy_v2");369370 return 1;371372 error:--------------------------------------------------------------------------i've tried of a GTX 980 and every times i tried to create more than 2 instances in ffmpeg, it's return with errors, but on a system with Quadro 4000 i can create as much as the card and sever can handle.In a russian forum, there's a guy also tried to overcome this issue by modifying the binary code of nvenc, still since it's google translated the final result is not clear and i'm not much of a assembler guy.I've included the link to his finding here.https://translate.google.com/translate?hl=en&sl=ru&u=https://habrahabr.ru/post/262563/&prev=searchBTW. i'm willing to give a 970 to be modified to a Quandro variants to see if we can over come this issue.Cheers

author: phucpd
author_rank: Newbie
timestamp: June 14, 2016, 05:04:45 pm
content: Anyone out there ?

author: YourChief
author_rank: Newbie
timestamp: November 05, 2016, 01:03:43 pm
content: Hi!I`m author of topic from russian habrahabr.ru. Patch works, and another guy made script which applies patch to binary:https://github.com/keylase/nvidia-patch/blob/master/patch.shApply it to /usr/lib/x86_64-linux-gnu/libnvidia-encode.so. I`ve tested it few months ago and it was actual for recent Nvidia drivers.