# Transcoding Failure - CUDA\_ERROR\_INVALID\_VALUE: invalid argument

**URL:** <https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [January 2, 2023, 9:34pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276 "2023-01-02T21:34:58Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![zenon222](https://avatars.discourse-cdn.com/v4/letter/z/e0b2c6/32.png) [@zenon222](https://forums.plex.tv/u/zenon222)\
**Post date:** [January 30, 2023, 3:21am UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/41 "2023-01-30T03:21:46Z")

</div>

I tried a bunch of files that were encoded with B-frames set to 5, I can’t explain why, but they would not play with the buffer set less than 3xB-frame setting.  
Unfortunately I don’t know what the B-frame setting was on the 10 files above. Mediainfo doesn’t report B-frame information, and for some reason ffprobe is broken.

---

<div class="post-metadata">

**Author:** ![enJOyIT](https://avatars.discourse-cdn.com/v4/letter/e/dc4da7/32.png) [@enJOyIT](https://forums.plex.tv/u/enJOyIT)\
**Post date:** [February 2, 2023, 7:28am UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/42 "2023-02-02T07:28:18Z")

</div>

So the topic is still open? 😕

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 2, 2023, 8:15am UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/43 "2023-02-02T08:15:15Z")

</div>

@enJOyIT

Yes, Topic still open.

We’re narrowing in on it.

Can you please test for me:

1. Any Nvidia 525 driver (I’m using 525.60.13)
2. PMS 1.29.2.6364

Hardware transcoding errors should be gone.

I ask this because we’re getting multiple reports of normal transcoding when using PMS 1.29.2.6364.

It was discovered last night. We’re trying to run it down and set a “known good” datapoint.

> **[plexmediaserver\_1.29.2.6364-6d72b0cf6\_amd64.deb](https://drive.google.com/file/d/11H2PdiTaLc_hFqIG6vzgb5w-1qnvt86T/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![enJOyIT](https://avatars.discourse-cdn.com/v4/letter/e/dc4da7/32.png) [@enJOyIT](https://forums.plex.tv/u/enJOyIT)\
**Post date:** [February 2, 2023, 8:30am UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/44 "2023-02-02T08:30:57Z")

</div>

Sorry, I’m on a business trip right now for a week… May @zenon222 can do that test? 🙂

---

<div class="post-metadata">

**Author:** ![zenon222](https://avatars.discourse-cdn.com/v4/letter/z/e0b2c6/32.png) [@zenon222](https://forums.plex.tv/u/zenon222)\
**Post date:** [February 2, 2023, 4:22pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/45 "2023-02-02T16:22:40Z")

</div>

I currently have 525.60.11 installed, close enough?  
When I install this new version do I remove the framebuffer flag?

I’ll look at it tonight.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 2, 2023, 5:43pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/46 "2023-02-02T17:43:17Z")

</div>

@zenon222

I’d try it both ways. There’s no harm. PMS 1.29.2 has no knowledge of it.

PMS 1.29.2 should silently remove the flag since it has no knowledge of it.

---

<div class="post-metadata">

**Author:** ![zenon222](https://avatars.discourse-cdn.com/v4/letter/z/e0b2c6/32.png) [@zenon222](https://forums.plex.tv/u/zenon222)\
**Post date:** [February 3, 2023, 1:23am UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/47 "2023-02-03T01:23:53Z")

</div>

everything plays completely fine.

---

<div class="post-metadata">

**Author:** ![enJOyIT](https://avatars.discourse-cdn.com/v4/letter/e/dc4da7/32.png) [@enJOyIT](https://forums.plex.tv/u/enJOyIT)\
**Post date:** [February 10, 2023, 12:47pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/48 "2023-02-10T12:47:27Z")

</div>

Does this mean I can install 1.31.0.6654 and everything should work? 🙂

---

<div class="post-metadata">

**Author:** ![zenon222](https://avatars.discourse-cdn.com/v4/letter/z/e0b2c6/32.png) [@zenon222](https://forums.plex.tv/u/zenon222)\
**Post date:** [February 10, 2023, 5:08pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/49 "2023-02-10T17:08:01Z")

</div>

I was testing 1.29.2.6364, my understanding is that code development is still in the works for this bugfix.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [February 10, 2023, 8:28pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/50 "2023-02-10T20:28:05Z")

</div>

1.31.0.6654 is a step in the right direction.

The problem with this is we’ve not identified the **exact** root cause because everyone’s files, while failing with the same errors, don’t fail for **everyone**.

Those cases, where the failures were reproducible by us as well **have** been addressed in 1.31.0.6654 but I doubt this is resolved yet.

( The 1080p input bit rate reduction transcoding problem )

I believe we all saw the most stable operation at 1.29.2.6364 and CUDA version 11.7  
(pre 525 drivers)

With 1.30.x, AV1 decoding is now included for those with the capability.  
Whether it’s FFMPEG core, or the transcoder, the updated transcoding with the updated (required) Nvidia drivers, is where we now see failures.

Feature wise, there is little difference between 1.29.2 and 1.30.x at this point.

The choice is yours whether to upgrade or not.

---

<div class="post-metadata">

**Author:** ![Jroot](https://avatars.discourse-cdn.com/v4/letter/j/87869e/32.png) [@Jroot](https://forums.plex.tv/u/Jroot)\
**Post date:** [March 2, 2023, 4:48pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/51 "2023-03-02T16:48:30Z")

</div>

Just want to bump this again. I have HEVC files where HW transcoding fails at anything above 720p. I’m running PMS 1.31.1.6733 with Nvidia 525.89.02 on a GTX 1660 Super.

I don’t think this is a driver or hardware issue, because the exact same files can be transcoded to H246/1080p just fine through Jellyfin, which uses ffmpeg

---

<div class="post-metadata">

**Author:** ![zenon222](https://avatars.discourse-cdn.com/v4/letter/z/e0b2c6/32.png) [@zenon222](https://forums.plex.tv/u/zenon222)\
**Post date:** [March 9, 2023, 6:20pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/52 "2023-03-09T18:20:03Z")

</div>

I see 1.31.2.6783 is out now, has this issue been resolved?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [March 9, 2023, 11:33pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/53 "2023-03-09T23:33:10Z")

</div>

The CUDA issue is solved.  
There were other issues which are also solved in this update.

A fair number of important problems got fixed.

---

<div class="post-metadata">

**Author:** ![zenon222](https://avatars.discourse-cdn.com/v4/letter/z/e0b2c6/32.png) [@zenon222](https://forums.plex.tv/u/zenon222)\
**Post date:** [March 10, 2023, 3:28am UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/54 "2023-03-10T03:28:13Z")

</div>

looks to be working. thanks!

---

<div class="post-metadata">

**Author:** ![mg3571](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mg3571](https://forums.plex.tv/u/mg3571)\
**Post date:** [March 10, 2023, 7:01pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/55 "2023-03-10T19:01:16Z")

</div>

This seems to still be an issue for me on 1.31.2.6783. I recieve the following in the logs when trying to force transcoding:

```auto
ERROR - [Req#271/Transcode] [FFMPEG] - cu->cuInit(0) failed
ERROR - [Req#271/Transcode] [FFMPEG] - -> CUDA_ERROR_UNKNOWN: unknown error
ERROR - [Req#271/Transcode] [FFMPEG] - 
DEBUG - [Req#271/Transcode] Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Generic error in an external library
DEBUG - [Req#271/Transcode] Could not create hardware context for h264
DEBUG - [Req#271/Transcode] Streaming Resource: Reducing playback quality for 1428kbps stream bitrate: video resolution to 640x480, audio channels to 2, quality to 17, disable video DS as 8081kbps is > the 1290kbps available, disable audio DS as 255kbps is > the 123kbps available
DEBUG - [Req#271/Transcode] Codecs: testing h264_nvenc (encoder)
DEBUG - [Req#271/Transcode] Codecs: hardware transcoding: testing API nvenc

```

`nvidia-smi` shows the latest drivers for my card (525.89.02) and CUDA version 12.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [March 10, 2023, 7:27pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/56 "2023-03-10T19:27:23Z")

</div>

@mg3571

1. Which Nvidia card ?
2. May I see the full DEBUG logs ZIP which contains this? (I can’t diagnose a snippet)

---

<div class="post-metadata">

**Author:** ![mg3571](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mg3571](https://forums.plex.tv/u/mg3571)\
**Post date:** [March 10, 2023, 7:42pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/57 "2023-03-10T19:42:49Z")

</div>

I’m using an Nvidia Quadro P400. Sure, have attached debug logs.

 ![Screenshot 2023-03-10 at 19.41.58](https://global.discourse-cdn.com/plex/original/4X/9/5/9/9597506404a4f5b9384eb9b67423438d3f64c732.png)

Thanks!

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [March 10, 2023, 8:33pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/58 "2023-03-10T20:33:19Z")

</div>

You logs show it being found.

```auto
Mar 10, 2023 19:35:27.043 [0x7f43370dbb38] DEBUG - [GPU] Got device: GP107GL [Quadro P400], nvidia@unknown, default true, best true, ID /dev/dri/renderD129, DevID [10de:1cb3:10de:11be], flags 0x7
Mar 10, 2023 19:35:27.043 [0x7f43370dbb38] DEBUG - [GPU] Got device: Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller, intel@builtin, default false, best false, ID /dev/dri/renderD128, DevID [8086:0412:1458:d000], flags 0x11

```

In your Preferences.xml file, with Plex stopped, try this:

```auto
HardwareDevicePath="/dev/dri/renderD129"

```

Your Preferences.xml should look like this: (it’s the last pref in the file)

```auto
SomeOtherPref="Value" HardwareDevicePath="/dev/dri/renderD129" />

```

---

<div class="post-metadata">

**Author:** ![nika1667](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/nika1667/32/168383_2.png) [@nika1667](https://forums.plex.tv/u/nika1667)\
**Post date:** [March 10, 2023, 8:50pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/59 "2023-03-10T20:50:41Z")

</div>

I’m still having the same CUDA\_ERROR\_INVALID\_VALUE error with the latest update with a quadro p2000 on version 515.86

![image](https://global.discourse-cdn.com/plex/original/4X/c/9/1/c913b8403e44ab0881412210d935c7ba9707f3e9.png)  
[Plex Media Server Logs\_2023-03-10\_20-48-46.zip](https://forums.plex.tv/uploads/short-url/hl7CW57Hm9lJ0fPLHmKJ6Tl0Nri.zip) (2.0 MB)

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [March 10, 2023, 9:09pm UTC](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276/60 "2023-03-10T21:09:17Z")

</div>

Are you using Docker in a VM?

```auto
Mar 10, 2023 20:48:16.373 [0x7f9055bd8b38] INFO - Plex Media Server v1.31.1.6782-77dfff442 - Docker Docker Container (LinuxServer.io) x86_64 - build: linux-x86_64 debian - GMT 00:00
Mar 10, 2023 20:48:16.374 [0x7f9055bd8b38] INFO - Linux version: 5.15.0-67-generic, language: en-US
Mar 10, 2023 20:48:16.374 [0x7f9055bd8b38] INFO - Processor: 6-core Common KVM processor
Mar 10, 2023 20:48:16.374 [0x7f9055bd8b38] INFO - Compiler is - Clang 11.0.1 (https://plex.tv 9b997da8e5b47bdb4a9425b3a3b290be393b4b1f)
Mar 10, 2023 20:48:16.374 [0x7f9055bd8b38] INFO - /usr/lib/plexmediaserver/Plex Media Server

```

How many layers are involved ? Looks like you have a few there.

PLEASE enable [DEBUG logging](https://support.plex.tv/articles/201643703-reporting-issues-with-plex-media-server/#toc-1) again. (Turning it off saves nothing as logs are limited)

Playback again for 30 seconds  
Stop playback  
Download logs ZIP  
Attach ZIP

You can upgrade to Ubuntu-provided default versions.  
Make certain to update initramfs and reboot after updating drivers

```auto
[chuck@lizum docker.2039]$ nvidia-smi
Fri Mar 10 16:09:48 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.60.13 Driver Version: 525.60.13 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Quadro P2200 On | 00000000:07:00.0 Off | N/A |
| 48% 37C P8 4W / 75W | 1MiB / 5120MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
[chuck@lizum docker.2040]$
```

[Previous page](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276.md?page=2)

[Next page](https://forums.plex.tv/t/transcoding-failure-cuda-error-invalid-value-invalid-argument/825276.md?page=4)
