Jump to content


Photo

Using 3rd party plugin in Emby for servicing content from Google Drive


  • Please log in to reply
44 replies to this topic

#1 ddurdle OFFLINE  

ddurdle

    Advanced Member

  • Members
  • 315 posts
  • Local time: 10:27 PM

Posted 05 August 2018 - 10:28 AM

As a hobby, I've been helping some emby users setup their Emby to use Google Drive as a media source.  There are "traditional" methods such as mounting the drive as a mount point or windows drive, but there is performance impact and affect on google drive quotas.

 

I've written a bunch of open-source software that can setup your Google Drive as a media source for Emby, via the support for STRM files.  Once deployed, the solution is self-maintaining -- new video files added to your Google Drive are automatically exported into STRMs and imported into Emby.

 

Another big advantage with this solution is transcoding.  With a tweak, transcoding requests are now handled through Google Drive transcoding, relieving critical CPU cycles on the emby server.

 

The setup is a bit complicated.  And although it works on Windows (I have a number of users who report back they are successfully using the setup in Windows), there is no "magic EXE" a user can download to run -- the code is in Python, so every other operating system comes with everything you need, but on windows, you'll need to setup Python.  The preferred system configuration is a debian-based linux (including ubuntu). There will be plans to eventually push out a EXE file for Windows users, but it is not high on my priority list.

 

For the adventurous, you can setup the install yourself.  But I've been lending my time (no cost) to help deploy and setup user's Emby Google Drive host.  The proper setup that runs everything with optimal performance (in particular google transcoding) can be time consuming and confusing.  I have deployed complete entire new GCE spun instances in as little as 30 mins, purely because I've done it enough times.

 

Hardware wise, there is no additional memory or cpu requirements for the code.  It is designed to run on the Emby host, but it can also run on a different server.  I've successfully setup working installs on as little as 256MB VPS.  It'll also work fine on shared vCPU instances (free tier) on Google Compute Engine.  All my test servers are hosted in GCE.  The extra ram offered in the 1 vCPU package will provide great speed improvements for navigation of large libraries (by leveraging the extra ram to host the emby sqlite ibrary.db file).

 

I'm willing to work with new users who want to get this setup for their family, by offering my time to help speed up the setup by working with you on setting up the instances.  I ask, in turn, that you support Emby by purchashing premier.  All the user's I have helped were very happy with the setup that they had no issue supporting Emby by purchasing Emby premier.

 

 

If you want to help you with your setup or help you get hosted on GCE, reply here or direct message me.

 

If you want to setup yourself, the github links are below.  Please feel free to provide feedback and request features through "issues" on github.

 

the service that delivers the Google Drive media:

https://github.com/d...ive-VideoStream

 

some additional optional scripts for emby for tweaking features with regards to Google Drive hosted content:

https://github.com/d...deoStream_extra

 

 

Disclaimers:

 

I'm not affiliated with Emby.  I'm also not doing this as a business, but as a hobby (I already have a full time job).  I don't work with any hosting providers and will not recommend any hosting service provider beside Google Compute Engine.  I've always been interested in movies and tv and "the cloud".  

 

 



#2 lepitismak OFFLINE  

lepitismak

    Advanced Member

  • Members
  • 171 posts

Posted 13 August 2018 - 10:15 AM

@ddurdle make a video tuto please



#3 lepitismak OFFLINE  

lepitismak

    Advanced Member

  • Members
  • 171 posts

Posted 14 August 2018 - 09:11 AM

@ddurdle I really have interest but I have no knowledge in linux. How could you help me? I am willing to pay your time if it is necessary.

#4 ddurdle OFFLINE  

ddurdle

    Advanced Member

  • Members
  • 315 posts
  • Local time: 10:27 PM

Posted 15 August 2018 - 10:50 AM

@ddurdle I really have interest but I have no knowledge in linux. How could you help me? I am willing to pay your time if it is necessary.

I pinged you but never heard back.



#5 numberedthought OFFLINE  

numberedthought

    Member

  • Members
  • 14 posts
  • Local time: 06:27 PM

Posted 17 August 2018 - 10:54 PM

ddurtle, if you're still available for help on this, I'd appreciate it.

 

I'm familiar with linux and python.  Started looking through your git and my head swum a bit.  I'd like to throw this up on a GCE instance to give it a shot if I could get your help.



#6 numberedthought OFFLINE  

numberedthought

    Member

  • Members
  • 14 posts
  • Local time: 06:27 PM

Posted 20 August 2018 - 11:51 AM

So I've gotten this to work with @ddurtle's Videostream (Awesome work by the way)  Setup was simple.  I now only have a few issues that make it unusable for me.  Primarily that google only muxes the first audio track of a file as it's audio choice.  This means that for most bluray rips it grabs the commentary track as the primary output.  Anyone know a way around that?

 

Besides that, strm playback in emby using google's output is freaking insanely fast and super stable.



#7 ddurdle OFFLINE  

ddurdle

    Advanced Member

  • Members
  • 315 posts
  • Local time: 10:27 PM

Posted 20 August 2018 - 05:13 PM

So I've gotten this to work with @ddurtle's Videostream (Awesome work by the way)  Setup was simple.  I now only have a few issues that make it unusable for me.  Primarily that google only muxes the first audio track of a file as it's audio choice.  This means that for most bluray rips it grabs the commentary track as the primary output.  Anyone know a way around that?

 

Besides that, strm playback in emby using google's output is freaking insanely fast and super stable.

 

The issue is actually a Google one.  If the source file has a DD track, Google will default to this as primary for transcoding.  Most movies that have multiple tracks will put the commentary track as the DD.  Some movies that will have multiple DD tracks will be fine since the commentary track won't be the primary DD track.  This is only an issue when transcoding due to audio support (such as playing back a video with a DTS audio on a device without DTS support).

 

The solution is to use the helper script that does two things: 1) adds the settings quality selector during playback and 2) intercepts transcoding requests so it can select the proper audio track for transcoding.

 

It's in:

git clone https://github.com/d...deoStream_extra

 

sample commands to remap transcoders to use the wrapper:

#remap transcoders
cd  /opt/emby-server/bin; sudo mv ffmpeg ffmpeg.oem; sudo mv ffprobe ffprobe.oem
sudo ln -sf /u01/GoogleDrive-VideoStream_extra/transcoders/emby_ffmpeg.pl ffmpeg; sudo ln -sf /u01/GoogleDrive-VideoStream_extra/transcoders/emby_ffprobe.pl ffprobe
 

There are a few custom parameters in the scripts to examine and adjust as needed.


Edited by ddurdle, 20 August 2018 - 05:13 PM.


#8 numberedthought OFFLINE  

numberedthought

    Member

  • Members
  • 14 posts
  • Local time: 06:27 PM

Posted 20 August 2018 - 07:52 PM

Thanks for the heads up @ddurdle.  You've thought of everything :) I'll throw this into the mix tonight.  I've got to do a dance because I'm in docker.  Shouldn't be too bad.



#9 numberedthought OFFLINE  

numberedthought

    Member

  • Members
  • 14 posts
  • Local time: 06:27 PM

Posted 25 August 2018 - 04:50 PM

@ddurdle

 

I've followed your instructions, but unfortunately do not have any success showing multiple playback options.

 

I've tried both in docker and in a straight install of Emby on ubuntu.

I renamed the ffmprobe and ffmpeg files as specified and created the symlinks.  Playback works the same as it did before.  I do not see anything in the logs showing any new transcode actions, nor does /tmp have a transcode.log file as specified in the perl scripts.

 

I'd really appreciate any help you can offer.

 

Thanks



#10 ddurdle OFFLINE  

ddurdle

    Advanced Member

  • Members
  • 315 posts
  • Local time: 10:27 PM

Posted 25 August 2018 - 07:13 PM

Are you forcing the transcode by selecting the quality setting during playback and changing it, so that emby invokes transcoding?

 

@ddurdle

 

I've followed your instructions, but unfortunately do not have any success showing multiple playback options.

 

I've tried both in docker and in a straight install of Emby on ubuntu.

I renamed the ffmprobe and ffmpeg files as specified and created the symlinks.  Playback works the same as it did before.  I do not see anything in the logs showing any new transcode actions, nor does /tmp have a transcode.log file as specified in the perl scripts.

 

I'd really appreciate any help you can offer.

 

Thanks



#11 numberedthought OFFLINE  

numberedthought

    Member

  • Members
  • 14 posts
  • Local time: 06:27 PM

Posted 25 August 2018 - 07:28 PM

Are you forcing the transcode by selecting the quality setting during playback and changing it, so that emby invokes transcoding?

I tried to, but everything kept direct playing still.

 

I'm wondering if there's something funky with my strm generation too.  I'm deleting my libraries and regenerating my strms and will check back.



#12 ddurdle OFFLINE  

ddurdle

    Advanced Member

  • Members
  • 315 posts
  • Local time: 10:27 PM

Posted 25 August 2018 - 07:28 PM

What version of emby are you using?



#13 numberedthought OFFLINE  

numberedthought

    Member

  • Members
  • 14 posts
  • Local time: 06:27 PM

Posted 25 August 2018 - 07:31 PM

latest - Version 3.5.2.0


Edited by numberedthought, 25 August 2018 - 07:32 PM.


#14 ddurdle OFFLINE  

ddurdle

    Advanced Member

  • Members
  • 315 posts
  • Local time: 10:27 PM

Posted 25 August 2018 - 08:03 PM

latest - Version 3.5.2.0

 

Some of my testers running android have reported the inability to transcode using the quality selector -- always "direct plays".  I haven't looked into it deep enough yet to raise a thread here about it.  Emby never triggers ffmpeg regardless what quality setting the user selects.

 

 There are also two other issues as well being investigated on a test server I have with emby 3.5.2.

 

Everything works as designed on emby 3.3.10., the last version thoroughly tested 


Edited by ddurdle, 25 August 2018 - 08:03 PM.


#15 numberedthought OFFLINE  

numberedthought

    Member

  • Members
  • 14 posts
  • Local time: 06:27 PM

Posted 25 August 2018 - 08:34 PM

So, I downgraded to Version 3.3.1.0 and did the ffmpeg and probe replacements again.

 

I've forced transcoding and received no option to change the audio.  Please see the playback info screenshot below

 

https://i.imgur.com/MDtCJps.png

 

There's nothing in the preplay screen allowing me to choose audio or playback options.

 https://i.imgur.com/ReBCVfz.jpg

 

I also can't find anything in the media playback controls once playing

https://i.imgur.com/ZQ3RXZL.png

 

I'm at a loss.  It's too bad too, because the strm playback is fast as heck.



#16 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 131327 posts
  • Local time: 10:27 PM

Posted 25 August 2018 - 08:36 PM

Best thing to do is stay on the latest version and see how to report a media playback issue. thanks.



#17 ddurdle OFFLINE  

ddurdle

    Advanced Member

  • Members
  • 315 posts
  • Local time: 10:27 PM

Posted 25 August 2018 - 08:51 PM

So, I downgraded to Version 3.3.1.0 and did the ffmpeg and probe replacements again.

 

I've forced transcoding and received no option to change the audio.  Please see the playback info screenshot below

 

https://i.imgur.com/MDtCJps.png

 

There's nothing in the preplay screen allowing me to choose audio or playback options.

 https://i.imgur.com/ReBCVfz.jpg

 

I also can't find anything in the media playback controls once playing

https://i.imgur.com/ZQ3RXZL.png

 

I'm at a loss.  It's too bad too, because the strm playback is fast as heck.

 

Got to the server dashboard, user settings, ensure the section for Media Playback is fully checked as below:

 

5b81f976069f7_Screenshotat20180825205026



#18 numberedthought OFFLINE  

numberedthought

    Member

  • Members
  • 14 posts
  • Local time: 06:27 PM

Posted 25 August 2018 - 09:15 PM

confirmed.



#19 ddurdle OFFLINE  

ddurdle

    Advanced Member

  • Members
  • 315 posts
  • Local time: 10:27 PM

Posted 25 August 2018 - 09:24 PM

confirmed.

 

 

What happens when you click on the quality in this shot?  Do you get a popup asking to change the quality?

 

https://i.imgur.com/ZQ3RXZL.png



#20 numberedthought OFFLINE  

numberedthought

    Member

  • Members
  • 14 posts
  • Local time: 06:27 PM

Posted 26 August 2018 - 01:05 PM

What happens when you click on the quality in this shot?  Do you get a popup asking to change the quality?

 

https://i.imgur.com/ZQ3RXZL.png

 

Yes I do, I can change it down to different qualities.  I've noticed something very weird though.

 

So I got angry at it, and the just wiped everything out, went to the newest Emby version, then just had it scan the strm library and went to bed.

 

Before I went to bed, when I selected playback via the web interface, I had the same result as before.  Playback was uber quick, You can see it load the webm player in the background and I started playback of a google transcode.  It was direct playing and I had fast scrubbing.

 

When I woke up in the morning,  I decided to play with it some more.  What do you know, it now has multiple audio tracks on my test video and it chooses the 7.1 as default.  I start playback and it looks like its playing back the original mkv..

 

I started playback via the web interface and it transcoded due to a subtitle format issue.

Started playback via phone and it direct played.  According to the stats it sees the container as mkv. (apparently my phone can direct play a remux)

 

 

I'm wicked confused  :) .  BTW this is without the transcode helpers.  I went back to the docker container.

 

Still have scrubbing issues on mobile though.  I think that may just be an Emby issue.


Edited by numberedthought, 26 August 2018 - 01:06 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users