4k encoding

We are having Quadro P2000 GPU card and Cuda-8.0 installed the library.

We are using ffmpeg with the hevc_nvenc codec to encode the source. If we do one output we can encode at 50fps (1x) speed, in this case, 40% of GPU utilized. If we try to encode 2 outputs simultaneously then output fps is 37 (0.73x) speed, in this case also only 40% of GPU is used.

We are trying to encode live 4k stream into multiple bitrates which need 1x transcoding speed for all the outputs.

For business needs, we need to know if we can achieve 4k live transcoding for multiple outputs with Quadro P2000 GPU card or not.

Please review commands and let us know how optimally we use Quadro P2000 GPU for 4k live encoding.

Command used for single output

ffmpeg -re -y -loglevel info -c:v hevc_cuvid -gpu 1 -i "source/UEFA_Euro_2016_Closing_Ceremony.ts" -map 0:p:1:0 -c:v hevc_nvenc -gpu 1 -preset 0 -force_key_frames "expr:gte(t,n_forced*1)" -sc_threshold 0 -ignore_unknown -flush_packets 0 -pix_fmt p010le -flags +cgop+low_delay -b:v 10M -maxrate:v 10M -bufsize:v 10M -s 3840x2160 -an  Out/h3.ts

Command used for multiple outputs.

ffmpeg -y -loglevel info -c:v hevc_cuvid -gpu 1 -i "source/UEFA_Euro_2016_Closing_Ceremony.ts" -filter_complex "[0:p:1:0]split=2[v0][v1]" -map [v0] -c:v hevc_nvenc -gpu 1 -preset llhq -force_key_frames "expr:gte(t,n_forced*1)" -sc_threshold 0 -ignore_unknown -flush_packets 0 -pix_fmt p010le -zerolatency true  -flags +cgop+low_delay -s 3840x2160 -profile:v rext  -b:v 10M -maxrate:v 10M -bufsize:v 10M -an Out/h3.ts -map [v1] -c:v hevc_nvenc -gpu 1 -preset llhq -force_key_frames "expr:gte(t,n_forced*1)" -sc_threshold 0 -ignore_unknown -flush_packets 0 -pix_fmt p010le -zerolatency true -flags +cgop+low_delay -s 3840x2160 -profile:v rext -b:v 15M -maxrate:v 15M -bufsize:v 15M -an Out/h4.ts

below are some test result for HEVC 3840x2160 source to same output resolution using hevc_nvenc codec

source_fps source(Mbps) profiles out(Mbps) out_fps speed GPU
50 25.9 1 10 50 1x 40%
59.94 51.6 1 10 59 0.98 40%
50 25.9 2 15,10 37 0.73 40%
59.94 51.6 2 15,10 36 0.6 40%