Jump to content

how to make emby plugin for kodi transcode all video files by default?


jody

Recommended Posts

hi there, I have a server installed with emby for linux and all my video files are also on this server. Then i have a client on the network that has kodi installed, as well as the emby plugin for kodi. 

besides the default config in the emby plugin for kodi I have enabled the https option and in playback I have enabled to "play from http instead smb".

When I select a video file on my kodi via emby plugin i want each video to be transcoded and then streamed to my kodi client, how can I enable that by default?

 

Link to comment
Share on other sites

Angelblue05

If you want them to transcode, you need to lower the video quality. If you leave play from http with default or high video quality, the file will usually direct stream. So to force transcoding (unless you meant direct streaming) you just need to adjust the video quality option in the playback tab of the add-on settings.

Edited by Angelblue05
  • Like 1
Link to comment
Share on other sites

If you want them to transcode, you need to lower the video quality. If you leave play from http with default or high video quality, the file will usually direct stream. So to force transcoding (unless you meant direct streaming) you just need to adjust the video quality option in the playback tab of the add-on settings.

I brought it down to the lowest level "664Kbps SD" playing but i still see no transcoding happening and I'm playing a 1080HD file, what else can I try?

Link to comment
Share on other sites

Angelblue05

If you check your server dashboard and you mouseover the Kodi session, what does it say **during playback? 

Edited by Angelblue05
Link to comment
Share on other sites

If you check your server dashboard and you mouseover the Kodi session, what does it say **during playback? 

direct streaming

Link to comment
Share on other sites

Angelblue05

Strange. Make sure the setting is correctly saved. You can even try to restart Kodi after saving the setting to make sure it's actually applied. There's nothing that changed in that area so that would be the only thing I can think of.

 

In your log you should see something like this when it's transcoding: 

05:35:00 T:12376  NOTICE: PLAY Called
05:35:00 T:12376  NOTICE: EMBY PlayUtils -> Can't direct play: Play from HTTP is enabled.
05:35:00 T:12376  NOTICE: EMBY PlayUtils -> The network speed is insufficient to playback the file.
05:35:00 T:12376  NOTICE: EMBY PlayUtils -> Playurl: http://192.168.0.190:8096/mediabrowser/Videos/c49c866cb486bd2a632b6f58efb07f8b/master.m3u8?mediaSourceId=c49c866cb486bd2a632b6f58efb07f8b&VideoCodec=h264&AudioCodec=aac,ac3&deviceId=8EA99AA447946388A2F8D273A178318&VideoBitrate=664000
05:35:00 T:12376  NOTICE: EMBY PlayUtils -> File is transcoding.
Edited by Angelblue05
Link to comment
Share on other sites

 

Strange. Make sure the setting is correctly saved. You can even try to restart Kodi after saving the setting to make sure it's actually applied. There's nothing that changed in that area so that would be the only thing I can think of.

 

In your log you should see something like this: 

05:35:00 T:12376  NOTICE: PLAY Called
05:35:00 T:12376  NOTICE: EMBY PlayUtils -> Can't direct play: Play from HTTP is enabled.
05:35:00 T:12376  NOTICE: EMBY PlayUtils -> The network speed is insufficient to playback the file.
05:35:00 T:12376  NOTICE: EMBY PlayUtils -> Playurl: http://192.168.0.190:8096/mediabrowser/Videos/c49c866cb486bd2a632b6f58efb07f8b/master.m3u8?mediaSourceId=c49c866cb486bd2a632b6f58efb07f8b&VideoCodec=h264&AudioCodec=aac,ac3&deviceId=8EA99AA447946388A2F8D273A178318&VideoBitrate=664000
05:35:00 T:12376  NOTICE: EMBY PlayUtils -> File is transcoding.

I thought of that before posting, so I first checked setting in kodi/emby plugin, was set, then shutdown of kodi, then shutdown of emby server, restarted emby server, then kodi client and kodi, checked emby plugin setting, was still set as before and played the file, then i got the logs which i uploaded here.

Link to comment
Share on other sites

Angelblue05

Ok, is it doing this for all your files or only that one file? Also why do you want to force transcode? This puts a bigger strain on the cpu, than direct play or direct stream.

@@jody The logic is it will always try to direct play (unless play from http is enabled), then direct stream (unless the bitrate to playback content is too low), then transcode. So if the setting is applied correctly, this means the bitrate required to play your movie is lower to what is needed to playback. I can't explain it if it's a true 1080p movie.

Edited by Angelblue05
Link to comment
Share on other sites

Ok, is it doing this for all your files or only that one file? Also why do you want to force transcode? This puts a bigger strain on the cpu, than direct play or direct stream.

@@jody The logic is it will always try to direct play (unless play from http is enabled), then direct stream (unless the bitrate to playback content is too low), then transcode. So if the setting is applied correctly, this means the bitrate required to play your movie is lower to what is needed to playback. I can't explain it if it's a true 1080p movie.

all files, well i have not tested all, but I have tested several files and all same behavior. reason is because kodi client is actually connected via my private vpn to my network but is located in a different country and there the internet connection is not fast enough for HD content, sometimes even SD stutters, thus i want it to transcode all content.

Also "play from http" is enabled since the beginning so it should transcode as you say :(

my server hardware is well equipped to handle multiple full HD transcodes in parallel

Edited by jody
  • Like 1
Link to comment
Share on other sites

Angelblue05

Ok, yes in that case transcoding is desired. I don't understand why the bitrate has no effect?....It's working perfectly for me. I will add extra logging for this in the next version. Hopefully it will tell us where the problem lies.

  • Like 1
Link to comment
Share on other sites

Ok, yes in that case transcoding is desired. I don't understand why the bitrate has no effect?....It's working perfectly for me. I will add extra logging for this in the next version. Hopefully it will tell us where the problem lies.

I did restart everything again and this time it works with all the other files i tested, also 720 and 1080 :) thx for your time and help! however this specific file is still doing direct streaming. I have attached its mediainfo

media-info.log

Link to comment
Share on other sites

Angelblue05

Ok, I'm about to push the newer version containing the extra logging. Can you capture once more the playback of that specific file and post the log? Thanks.

 

Awesome news!

 

Edit: Give it a few minutes, the update should be available shortly via the Emby for Kodi beta repository.

Edited by Angelblue05
  • Like 1
Link to comment
Share on other sites

Ok, I'm about to push the newer version containing the extra logging. Can you capture once more the playback of that specific file and post the log? Thanks.

 

Awesome news!

 

Edit: Give it a few minutes, the update should be available shortly via the Emby for Kodi beta repository.

Okay, did as you instructed. Attached the logs, btw when I enable https then kodi/emby says it can't connect. Also attached logs for that, many thanks :)

kodi-https.log

kodi2.log

emby2.log

Link to comment
Share on other sites

Angelblue05

I'm not seeing the line I expect... Did you restart Kodi after updating? Sorry I should have mentioned....

Link to comment
Share on other sites

Angelblue05

As for the https, it's trying to connect to this:

Server unreachable at: https://xx.xxx.xxx.x:8096/mediabrowser/Users/Public?format=json 

Pretty sure the port is incorrect. Make sure you have the correct one in your settings and restart Kodi.

  • Like 1
Link to comment
Share on other sites

I'm not seeing the line I expect... Did you restart Kodi after updating? Sorry I should have mentioned....

I think i did, but to be sure I repeated it from the start, attached the outcome. You were absolutely right about the port for https, stupid me, that was kind of obvious. Thank you again :)

I have tested some more other files and found others for which it shows the same behaviour, namely direct streaming over transcoding albeit settings being unchanged.

emby2.log

kodi2.log

Link to comment
Share on other sites

Angelblue05

Again I'm not seeing the line. What the heck is going on.... ? Maybe I'm just too tired I'm not seeing it. I will catch some sleep and look into it a bit later, sorry. :(

 

Ahhhhh, maybe I think I found something interesting.....

Edited by Angelblue05
  • Like 1
Link to comment
Share on other sites

Again I'm not seeing the line. What the heck is going on.... ? Maybe I'm just too tired I'm not seeing it. I will catch some sleep and look into it a bit later, sorry. :(

thank you very much!! sleep well :) 

Link to comment
Share on other sites

Angelblue05

One last thing. For one of the title, can you take a screenshot of the media info in the webclient directly (after the crew and cast once you select the content):

55c60e85becdd_mediainfo3.png

 

Is there a Bitrate value to your Video track?

  • Like 1
Link to comment
Share on other sites

It looks like for files which it does not transcode it shows no mediainfo in the webbrowser, The only info you see is container and path to the file, that's it. It does show the mediainfo (like in your screenshot) for others, which are being transcoded. 

My media library is being refreshed every 24 hours and these files have been stored for multiple weeks. Maybe something is going wrong during library scan, so I went into the metadata manager to one of the files and did an advanced refresh with choosing the option of replacing all existing info. Also did another "identify" and saved it. Afterwards I went to check in the webclient about the mediainfo and it was there now. Tested the file in kodi/emby and indeed it was transcoding now :)

I will manually initiate a library refresh scan on the parent directory in the hope it might correct the missing info for other files as well.

 

  • Like 2
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...