[Libav-user] Freeswitch+Libav with NVENC encoder gives Could not open codec (-12)(Cannot allocate memory)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] Freeswitch+Libav with NVENC encoder gives Could not open codec (-12)(Cannot allocate memory)

José Lopes
Hello,

I am trying to use Video Conferences (MCU) from Freeswitch with libav (ffmpeg 3.2 from jessie-backports) with NVIDIA Tesla P4 (encoder nvenc).


I have done some tests and it worked good until 10 video calls on the conference. 

* After 10 video calls to the same conference, i notice the video sometimes freezes. 
* After 19 video calls, when enter new video conference it gives me the next error from libav 

avcodec.c:981 Could not open codec (-12)(Cannot allocate memory) 

So Freeswitch stop using NVENC encoder.

I am also monitoring the status of NVIDIA Cards, with the command nvidia-smi and i check that Freeswitch allocates 2432MB on graphic card and the graphic card have more than 5000MB of memory free.  The GPU used is arround 3%, so i think the NVIDIA can support more video calls.


I also compile the last version of ffmpeg and after the ~19 video calls, Freeswitch can't use the NVENC encoder, but it gives a different error:

avcodec.c:981 Could not open codec (-542398533)(Generic error in an external library)

Can anyone point me a direction to analyse this problem?

Thanks in advance


Best regards,

José Lopes
Research and Development Technician

Phone: <a href="tel:%2B351%20256%20370%20980" value="+351256370980" style="color:rgb(17,85,204)" target="_blank">+351 256 370 980
Email: [hidden email]


_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: Freeswitch+Libav with NVENC encoder gives Could not open codec (-12)(Cannot allocate memory)

Andy Shaules


On Sep 6, 2017 6:23 AM, "José Lopes" <[hidden email]> wrote:
Hello,

I am trying to use Video Conferences (MCU) from Freeswitch with libav (ffmpeg 3.2 from jessie-backports) with NVIDIA Tesla P4 (encoder nvenc).


I have done some tests and it worked good until 10 video calls on the conference. 

* After 10 video calls to the same conference, i notice the video sometimes freezes. 
* After 19 video calls, when enter new video conference it gives me the next error from libav 

avcodec.c:981 Could not open codec (-12)(Cannot allocate memory) 

So Freeswitch stop using NVENC encoder.

I am also monitoring the status of NVIDIA Cards, with the command nvidia-smi and i check that Freeswitch allocates 2432MB on graphic card and the graphic card have more than 5000MB of memory free.  The GPU used is arround 3%, so i think the NVIDIA can support more video calls.


I also compile the last version of ffmpeg and after the ~19 video calls, Freeswitch can't use the NVENC encoder, but it gives a different error:

avcodec.c:981 Could not open codec (-542398533)(Generic error in an external library)

Can anyone point me a direction to analyse this problem?

Thanks in advance


Best regards,

José Lopes
Research and Development Technician

Phone: <a href="tel:%2B351%20256%20370%20980" value="+351256370980" style="color:rgb(17,85,204)" target="_blank">+351 256 370 980
Email: [hidden email]


_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user

check nvidia docs for maximum number of instances they can create. its not the ram, its the lack of pixel fill processors to stream decode in hardware. 

_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user