Jump to content

Transcoding in Linux - only 1 GPU transcode running?


Recommended Posts

Posted

I should have also said that I ran the patch for unlimited transcodes as well.

Happy2Play
Posted (edited)

To me it looks like a limitation in the card.  But the devs would have to comment more.

decoder->cvdl->cuvidCreateDecoder(&decoder->decoder, params) failed -> CUDA_ERROR_OUT_OF_MEMORY: out of memory

But per the Nvidia matix you only have 1 decoder.

image.thumb.png.0a3eebaa05147813bb4bd8a65905c892.png

Video Encode and Decode GPU Support Matrix [NEW] | NVIDIA Developer

But have no idea how the patch works.

Edited by Happy2Play
Posted

These are also both tone mapping, which is a very intensive process. Are you sure it can handle two of that at once?

Posted

Oh so it is a memory error? It should be able to handle 2 transcodes at once. I will try without tonemapping. If memory is an issue then I will get a p600 with 4gb ram.

Is the out of memory error from ffmpeg?

Posted

Hmm. So I tried without tone mapping but still only get a single transcode. How much memory does a 4k transcode typically use?

Posted
4 hours ago, Luke said:

These are also both tone mapping, which is a very intensive process

That's true, but only when done in sw. The CUDA tone mapping is just about nothing for an Nvidia card.

Posted (edited)
2 minutes ago, softworkz said:

That's true, but only when done in sw. The CUDA tone mapping is just about nothing for an Nvidia card.

Good to know! Do you think the issue is available ram then? I can get 5 1080p he transcodes but only 1 4k.

Edited by BirdBare
Posted
35 minutes ago, Luke said:

@softworkz may have some insight. Thanks.

@BirdBare - Let's find out whether it's a memory issue or an NVDEC limitation.

For testing that, choose a video with a small frame size, e.g. 720p, choose an even lower quality in the clients (to make sure it transcodes) and try to play simultaneously.

Posted
Just now, softworkz said:

@BirdBare - Let's find out whether it's a memory issue or an NVDEC limitation.

For testing that, choose a video with a small frame size, e.g. 720p, choose an even lower quality in the clients (to make sure it transcodes) and try to play simultaneously.

See above message for 1080p testing.

Posted
1 minute ago, BirdBare said:

Good to know! Do you think the issue is available ram then? I can get 5 1080p he transcodes but only 1 4k.

OK, that already answers the question. A 4k frame requires 4x the memory of a 1080 frame.

Posted (edited)

So I should at least get two 4k transcodes according to my recent test. I'll push it and see the max 1080p transcodes for this card.

 

EDIT: I'm wrong above. I need to test the max. Hopefully I can hit 8 simultaneous.

Edited by BirdBare
Posted
Just now, BirdBare said:

So I should at least get two 4k transcodes according to my recent test. I'll push it and see the max 1080p transcodes for this card.

Only when you could do 8 parallel 1080 transcodes.

But you can't exactly calculate like that. It also very much depends on the amount of intermediate processing steps:

>>>>>>  Processing Plan
Info    Name                                        CanDoInHardware      WillDoInHardware     Reason                                  
Info    NVDEC Quadro P620 - H.265 (HEVC)         >> True                 True                 Hardware Codec                           
Info    VideoInput                               >> True                 True                 Matching hardware context                
Info    Scaling                                  >> True                 True                                                          
Info    ToneMapping (when possible)              >> True                 True                                                          
Info    VideoOutput                              >> True                 True                 Hardware encoder                         
Info    NVENC Quadro P620 - H.264 (AVC)          >> True                 True                 Hardware Codec                           

From one-step to another, it takes memory for the intermediate frames while they travel through the pipeline.

Posted

I almost forgot: Your 4k videos are 10bit and your 1080 videos are probably 8bit..

Posted

Understood. It's sad to hear. I'll do the test but it may be best to look for a card with more ram.

Posted

One thing we could try is to reduce parallelization in the pipeline processing, maybe(!) that helps reducing the used memory.

To test this, could you please install the diagnostics plugin from the plugin catalog?

Posted (edited)

TEST 2

Do as follows:

Under "Diagnostic Options", you'll see two find-replace text boxes for modifying ffmpeg commands:

Search: -filter_complex 

Replace: -threads:v:0 1 -filter_complex_threads 1 -filter_complex 

Edited by softworkz
Simplified instructions
Posted

Note that I edited the previous post.

Posted

BTW, you can also use the nvidia-smi command line tool to check GPU memory usage.

Posted

Hello!

So I tried the above command and did not see any reduction in ram usage. I attached the logs just in case it didn't apply properly.

With the nvidia-smi command I see about 1300mB ram usage for 1 4k transcode. So indeed it is a ram issue. That is super frustrating to say the least. Do you have any more suggestion to reduce ram usage with software? :)

I share my 4k library with family so 2 transcodes would be perfect if we can manage.

embyserver(2).txt ffmpeg-transcode-09b25518-b998-4551-bb60-08efe758e14a_1.txt

Posted

I forgot to mention. I really appreciate the help thus far! I absolutely love this community.

  • Like 1
Posted
43 minutes ago, BirdBare said:

Hello!

So I tried the above command and did not see any reduction in ram usage. I attached the logs just in case it didn't apply properly.

With the nvidia-smi command I see about 1300mB ram usage for 1 4k transcode. So indeed it is a ram issue. That is super frustrating to say the least. Do you have any more suggestion to reduce ram usage with software? :)

I share my 4k library with family so 2 transcodes would be perfect if we can manage.

embyserver(2).txt 121.58 kB · 0 downloads ffmpeg-transcode-09b25518-b998-4551-bb60-08efe758e14a_1.txt 24.21 kB · 0 downloads

The diagnostic options change did not apply in fact.

Those settings don't survive reboots. Please don't forget to click Save and don't reboot after setting the diag options.

Posted
6 hours ago, softworkz said:

The diagnostic options change did not apply in fact.

Those settings don't survive reboots. Please don't forget to click Save and don't reboot after setting the diag options.

How about now? I didn't see a difference in ram usage still so I am hesitant to say I did it correctly.

 

 

embyserver(3).txt ffmpeg-transcode-5b0edcdb-2943-43ea-8387-686cb3d78b0b_1.txt ffmpeg-transcode-7b8c5cd6-f93c-4d64-a399-dadddefdead6_1.txt

Posted
Just now, BirdBare said:

Oh I searched the text. It applied. Still only 1 transcode so far

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...