I decided to update this post and streamline it bit since I felt users who just wanted to set up a C7 as a Plex Media Server probably wouldn't want to sift through all the original wall of text. 1/24/2015
Using the C7 as a Plex Media Server
First off, you need to have crouton installed on your Chromebook. There are many guides on this such as this one: Crouton
Here's a run through:
If you don't have Crouton on your Chromebook (Skip Otherwise)
- First off you need to be Developer mode for your Chromebook
- This can be achieved by hitting esc + refresh + power button on your chromebook. note: switching to developer mode will wipe your data so do not do this until you have backed up anything you want to save
- Your chromebook should reinstall and reboot
- When it comes back up you will need to hit ctrl + d to load quickly into ChromeOS. note: you will always have to do this from now on when turning on the chromebook from a cold boot (other wise it takes long to get into ChromeOS and it will make a beeping noise). There is a work around this issue but from what I've read it is somewhat dangerous so I will not post how to do it here
- Once developer mode is enabled
- download crouton from: https://goo.gl/fd3zc
- hit alt + ctrl + t. this opens a crosh tab which should look like a terminal
- type shell and hit enter
- type sh ~/Downloads/crouton -t cli-extra and hit enter. this should create a cli chroot environment without X
- after it is done installing you should be able to enter your chroot environment using sudo enter-chroot command
Installing / Setting Up Plex
- Personally I rather use my desktop to configure the chromebook so I would install SSH sudo apt-get install openssh-server
- run ssh server: sudo /etc/init.d/ssh start
- not sure if it applies to everyone else but I've had issues making connections to my chromebook if I do not flush iptables so I always have to run this script prior to using openssh/plex
- The site shows the required commands such as the chmod for permission to run the script and the command for running the script: /root/fw.stop
- Keep in mind you usually have to run this script prior to starting any of the servers (openssh or plex)
- Then I would use PuTTy to tunnel in
- I would also install the vim package since I haven't been able to kill my bad arrow key habits sudo apt-get install vim
- Next I want to install Plex, the way I do it is downloading the deb file and just installing it manually
- first install the dependencies
- sudo apt-get install avahi-daemon avahi-utils
- download plex
- wget DOWNLOAD_URL
- e.g "wget https://downloads.plex.tv/plex-media-server/0.9.11.7.803-87d0708/plexmediaserver_0.9.11.7.803-87d0708_amd64.deb"
- FYI you can copy pasta with a chromebook in the terminal by using two finger tap on the pad to paste
- install plex
- sudo dpkg -i DEB_PACKAGE
- e.g. "sudo dpkg -i plexmediaserver_0.9.11.7.803-87d0708_amd64.deb"
- make sure you are in the right directory
- start up plex
- sudo /usr/sbin/start_pms plex
- in my experience services seem to have issues on a chroot environment so I have to run plex using commands instead of the traditional "sudo service some_service_here start" command.
- configure and use plex hooray
- navigate on your browser localhost:32400/web/ [IF YOU ARE ON CHROMEBOOK]
- navigate on your browser IP_ADDRESS_OF_CHROMEBOOK:32400/web/ [IF YOU ARE ON ANOTHER COMPUTER]
C7 as a Plex Server Performance Concerns
Using WinSCP and BitviseSSH, I have benchmarked file transfer speeds on the chromebook and it appears to be capped at about 16MB/s (using gigabit switch). Using htop, during file transfers the processor usage was capped out, as a result it appears to be a processor bottle neck rather than my initial impression that the hard drive was a bottleneck. the Intel Dual Core B847 1.1 GHz is a bit lackluster for a Plex Media Server, but works fine for directplay (no transcoding).
For a benchmark comparison, I had purchased for bit a under $80 on ebay recently, a Lenovo ThinkCentre with a E8400 Intel Core2 Duo and 3GB. I also had an old low-end rig with an Intel G620 for about $200 from about 2-3 years back. Processing Benchmarks. As a result the C7 is not a cost effective plex media server.
The C7 Experience
Based on my experiences, if you plan on using subtitles with the C7 as a Plex Media Server using the web player, it only has enough processing power for 720p quality with minimal stuttering during playback for one device and quite a bit of lag when skipping ahead or backtracking. Heavy stuttering occurs when viewing 1080p video with subtitles (the web player and android application requires the media server to render subtitles on top of each frame). However the PLEX HOME THEATRE Application (not the server) for Windows, Linux, Mac can utilize direct play with subtitles thus in this case, content does not stutter from the Chromebook.
Old Post:
So I'm not sure why but it seems that every program I install onto my chroot environment on the Chromebook doesn't seem to be able to install its corresponding service properly. As a result I pretty much cannot run any Media Server type of software:
sudo service some_service_here start
start: unknown job: some_service_here
Usually this results from broken installations but all of these programs were installed without a hitch using apt-get and reinstalling made no difference. Perhaps there is a configuration problem with my chroot environment.start: unknown job: some_service_here
Never the less when first installing Plex Media Server: Possible through apt-get or by getting the deb file from the Plex Website:
sudo apt-get install plexmediaserver
no issues occured aside from the fact I couldn't start it using service start commands--instead I used:
sudo /usr/sbin/start_pms plex
Then I headed over to (using a browser) localhost:32400/web/ to configure the location of the library and other options. Then when I tried to stream something...I got nothing. The web browser player displayed a loading animation so I thought the Chromebook didn't have enough grunt for transcoding. However I used htop to check cpu usage (I scrapped xfce and x altogether and just run the chroot environment through command line) and noticed the usage was sitting ~2-5% per core. My C7 has a 1.1GHz Sandy Bridge Dual Core Celeron processor. So this pointed out that the processor wasn't even transcoding at this point, something else was up. I terminated the server (ctrl + c) but for some reason other background processes were still running for Plex despite terminating the original process I executed so I had to terminate them individually.
Overall PLEX worked wonders on my Windows Server so I decided to have another go at it. This time I found the solution. Prior to installing PLEX using the deb file on their website, I needed to install two things:
sudo apt-get install avahi-daemon avahi-utils
Strangely enough when originally installing PLEX, it did not complain about not having these two dependencies installed. Second time around, it did complain. Still, I could not run PLEX through the service starting commands so I used the command from earlier to start PLEX. This time however, it streamed without a hitch, the CPU usage capped around ~5% per core while streaming the maximum web browser player settings (20Mbps for 1080p).
Not sure if its placebo or not, but it seemed to me that despite using the highest quality possible, there appeared to be noticeable quality loss in comparison with the Windows Server so I may need to look into this. Nevertheless it is working and I am happy with it.
So currently the Chromebook is on a crosh tab active on the 'precise' chroot environment running htop (I plan to have it on this 24/7 until I find a better informational utility to run). I control it with my main computer by using PuTTY and XMING to connect to the OpenSSH server installed on the Chromebook. In order to keep programs running using SSH, I started using a nifty program called screen.
sudo apt-get install screen
Closing PuTTY after executing a program will terminate that program so with screen I first create a session, for example: screen -S plex. It will create a new session where I can run a program and close PuTTY while keeping the application is still running. So I run PLEX then hit ctrl + a + d. This exits the screen, but the program running in the screen is still active. To go back to the screen I would use: screen -r plex. Then to close the screen I would terminate whatever program is running in the screen (if there is any) and just type exit. For my current Chromebook Media Server configuration, I'd first turn off power saving since the Chromebook will automatically go to sleep when closing the lid. Then I would enter my chroot envrionment (thanks Crouton), then start up whatever servers I desire (for me, just OpenSSH and PLEX for now).
Edit: So I realized that I had directplay settings enabled meaning the server could simply avoid transcoding altogether and directly stream data to the browser for playing media. As a result after disabling direct play to test the transcoding abilities of the C7, it definitely does NOT have enough processing power to transcode 1080p at 20mbps. The C7 was capped 100% for both cores and there was heavy stuttering (unwatchable). For my case, this is fine as I am able to watch movies just fine on any computer or even on my android phone using DirectPlay.
Subtitles on the other hand, requires transcoding for PLEX. The cores max out ~99% each when using subtitles however, it is watchable (little to no stutter) but there are issues if you plan to skip around.
Edit #2: After watching more films that needed subtitles with, I figured that the Chromebook (C7) does not have enough processing power for subtitles at 1080p (my previous test was streaming a 720p documentary with subtitles). When using Plex Media Server, even with directplay enabled, subtitles are manually rendered onto each frame rather than being sent separately in an independent data stream. As a result using subtitles requires quite a bit of processing power from the server. However if you use the Desktop client for Plex to watch your movies, the application is able to acquire subtitle data separate from the media data stream (thus does not require transcoding in this case), the browser player is unable to do this.
Edit #3: The Android application for PLEX also does not support a separate data stream for subtitles independent of the video and audio stream. As a result the PLEX Android App will also require Transcoding (if using subtitles and/or directplay is disabled). Hopefully PLEX addresses this in the future.
4 comments
wow! awesome breakdown. im trying to run plex media server on a chromebook (using the basic setup of ubuntu through crouton). The media server just takes me to web page addressed "localhost:32400/manage" and says "unable to connect" Any ideas? I wasn't sure if the above would the same steps for my situation.
ReplyDeleteI followed these directions for plex on my precise crout. Everything works great streaming from my chromebox, however, I can't access my server on other computers using the same network. I followed Plex's troubleshooting guide and still can't figure it out. I was wondering if you had similar problems. As far as I can tell I'm not using any proxies or vpn. I can see the local host on another computer, but no content.
ReplyDeleteIll be having a video on this Jeremy.
ReplyDeleteIll be having a video on this Jeremy.
ReplyDelete