HOWTO: Change JWPlayer to the HTML5 version
Posted: Fri Jan 18, 2013 3:42 pm
Hey guys,
I was getting tired of using Flash, it slowed down my processor waaay too much. So I've switched from JWPlayer 5 to 6.
Here's how I did it, it's a really quick and dirty way to fix it, I wish I would have time to integrate more features, for example, different video qualities, video seeking, etc (which I might do eventually).
Disclaimer: I'm not responsible for anything that could go wrong with your computer after doing this.
First of, know that this will probably only work in Chrome as I'm encoding everything in WebM file, but it shouldn't be too hard to adapt the script to make it work with MP4 or etc.
Everywhere that says _location_ is the location of your jetty folder, for my version of Subsonic under Ubuntu, it's /var/subsonic/jetty/3105/ (3105 could change depending on your version I think).
So, download JWPlayer 6.10 (latest version as of this post). Extract the files to your desktop.
Copy the "jwplayer.flash.swf" file to your _location_/webapp/flash with "jw-player-6.10.swf" as the name, so that you have the file _location_/webapp/flash/jw-player-6.10.swf.
Copy the "jwplayer.html5.js" and "jwplayer.js" files to _location_/webapp/script. No need to rename those files.
Afterwards, download the attached videoPlayer.jsp file, and replace your file that is located in _location_/webapp/WEB-INF/jsp, overwriting your existing file.
Once you got all those files in place, we just need to adjust the transcoding option, so login to Subsonic, go in Settings -> Transcoding, and for the video line, put the following information:
For step 1, if you want it to go faster, increase the amount of threads. I set it to 2 threads on my quad core server, as this creates 3 threads and leaves me one core for other stuff. But for HD stuff, you'll definitely need more than 1 thread
After all that, it should work properly. Test it out, and let me know how it goes!
Like I said, I'm not sure if it will work for you, as this works well for me under Win/Chrome and my Ubuntu Server.
I was getting tired of using Flash, it slowed down my processor waaay too much. So I've switched from JWPlayer 5 to 6.
Here's how I did it, it's a really quick and dirty way to fix it, I wish I would have time to integrate more features, for example, different video qualities, video seeking, etc (which I might do eventually).
Disclaimer: I'm not responsible for anything that could go wrong with your computer after doing this.
First of, know that this will probably only work in Chrome as I'm encoding everything in WebM file, but it shouldn't be too hard to adapt the script to make it work with MP4 or etc.
Everywhere that says _location_ is the location of your jetty folder, for my version of Subsonic under Ubuntu, it's /var/subsonic/jetty/3105/ (3105 could change depending on your version I think).
So, download JWPlayer 6.10 (latest version as of this post). Extract the files to your desktop.
Copy the "jwplayer.flash.swf" file to your _location_/webapp/flash with "jw-player-6.10.swf" as the name, so that you have the file _location_/webapp/flash/jw-player-6.10.swf.
Copy the "jwplayer.html5.js" and "jwplayer.js" files to _location_/webapp/script. No need to rename those files.
Afterwards, download the attached videoPlayer.jsp file, and replace your file that is located in _location_/webapp/WEB-INF/jsp, overwriting your existing file.
Once you got all those files in place, we just need to adjust the transcoding option, so login to Subsonic, go in Settings -> Transcoding, and for the video line, put the following information:
- Code: Select all
Name: mp4/h264 video
Convert from: avi mpg mpeg mp4 m4v mkv mov wmv ogv divx m2ts
Convert to: webm
Step 1: ffmpeg -ss %o -t %d -i %s -async 1 -vf lutyuv=y=val*1.3 -b %bk -s %wx%h -ar 44100 -ac 2 -v 0 -f webm -vcodec libvpx -preset superfast -acodec libvorbis -threads 0 -
For step 1, if you want it to go faster, increase the amount of threads. I set it to 2 threads on my quad core server, as this creates 3 threads and leaves me one core for other stuff. But for HD stuff, you'll definitely need more than 1 thread
After all that, it should work properly. Test it out, and let me know how it goes!
Like I said, I'm not sure if it will work for you, as this works well for me under Win/Chrome and my Ubuntu Server.