Jump to content

Software transcoding


kevage

Recommended Posts

Hi. First post on the forum!

I have my emby server set up on unraid using docker and gpu passthrough, and it has been working perfectly(Using GeForce GTX 1060) But today when playing a video file using apple tv 4k it went from hw to sw transcoding on the first episode of a season, and when playing the next episode it went back to hw transcoding(Both episodes are the same when it comes to codec(h264) and container (flv) )

So I was wondering what could be the reason for this? I have attached my ffmpeg logs of both episodes. On the one where hw transcoding fails it says:

19:57:05.847 [AVHWDeviceContext @ 0x47f640] cu->cuInit(0) failed -> CUDA_ERROR_NOT_INITIALIZED: initialization error
19:57:05.848 Device creation failed: -1313558101.
19:57:05.848 [h264_cuvid @ 0x5a39c0] No device available for decoder: device type cuda needed for codec h264_cuvid.
19:57:05.848 Stream mapping:
19:57:05.848 Stream #0:0 (h264_cuvid) -> scale_cuda
19:57:05.848 setsar -> Stream #0:0 (h264_nvenc)
19:57:05.848 Stream #0:1 -> #0:1 (copy)
19:57:05.848 Device setup failed for decoder on input stream #0:0 : Unknown error occurred
 
I have no idea what this means, but what i don't understand is why it only happened on the first episode.

Untitled.jpg

ffmpeg-transcode-0428d68a-57fe-4ead-aa5e-62969a174a13_1.txt ffmpeg-transcode-bd0bd7f3-d34d-4673-a4c2-eee4b80b127e_1.txt

Edited by kevage
Link to comment
Share on other sites

26 minutes ago, Luke said:

Hi there, did you take a look at this?

 

Hi. I used this video by spaceinvader one to set it up:

 

GPU transcoding is working, and I can see it with the watch nvidia-smi command. But for some reason it sometimes switches to software transcoding as stated in my first post, and I can understand that this happens when the file can not be transcoded with hardware. What I don't understand it why only one of two videofiles(episode one and two of a series) is hardware transcoded, when they are identical in terms of audio and video codec, subtitle and so on. They both were being played on an Apple TV box. Just curious as to why?

Thanks for replying!

Edited by kevage
Link to comment
Share on other sites

This is not an issue with Emby:

19:57:05.847 [AVHWDeviceContext @ 0x47f640] cu->cuInit(0) failed -> CUDA_ERROR_NOT_INITIALIZED: initialization error
19:57:05.848 Device creation failed: -1313558101.

It seems that sometimes it works, sometimes it doesn't. Or are you saying that it always fails for specific files?

 

Link to comment
Share on other sites

4 minutes ago, softworkz said:

This is not an issue with Emby:


19:57:05.847 [AVHWDeviceContext @ 0x47f640] cu->cuInit(0) failed -> CUDA_ERROR_NOT_INITIALIZED: initialization error
19:57:05.848 Device creation failed: -1313558101.

It seems that sometimes it works, sometimes it doesn't. Or are you saying that it always fails for specific files?

Yes, it sometimes work, and sometimes it doesn't, but it mostly works as it should, so it's not a huge problems, but it just seems a bit strange. It doesn't seem related to any specific files, as I have seen it happen on files with other audio and video codec in another format as well. I haven't really noticed it until the last couple of days, but I have not made any changes as I can remember, so it may have been like this for a longer period of time. And it has only occurred(so far) when playing from Apple TV or in a firefox browser. Never on android app, in chrome browser or ios app on phone. So as I said, it's not a huge problem at this time, but I was just curious if anyone here would have any idea as to what could trigger this based on the ffmpeg logs of the one that failed and the one that hw trancoding works. The one where it works was played immediately after the first one when it failed.

Link to comment
Share on other sites

7 minutes ago, softworkz said:

Could it be possible that it fails in cases where a previous transoding session hasn't finished yet?

 

Not in this case. There was no prior transcoding session before episode 1 was played, in fact this was the only activity on the sever at the time.

Link to comment
Share on other sites

25 minutes ago, softworkz said:

Then I would try to install Emby on the host OS to rule out virtualization.

Not sure what you mean by this. Could be due to the fact that several beers have been consumed

I'm running Emby on Unraid.

Thank you for taking the time to reply

Edited by kevage
Link to comment
Share on other sites

1 hour ago, softworkz said:

Then I would try to install Emby on the host OS to rule out virtualization.

= direct install, no container

Link to comment
Share on other sites

If it would still happen there, we would need to create a minimal ffmpeg command line to reproduce and then proceed to troubleshooting this with Nvidia.

Thanks.

Link to comment
Share on other sites

14 minutes ago, softworkz said:

If it would still happen there, we would need to create a minimal ffmpeg command line to reproduce and then proceed to troubleshooting this with Nvidia.

Thanks.

I will report back to you if it still happens there. Thank you for helping me out.

Link to comment
Share on other sites

  • 2 weeks later...

Sorry for replying so late. For some magical and mysterious reason this problem seems to have disappeared. I have not, since making this forum post had any more problems, even though I did not do anything. Thank you softworkz for taking you time to answer and come up with possible solutions. I really appreciate it.

Link to comment
Share on other sites

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...