Plex Export

Plex Export allows you to export your Plex Media Server Library to an interactive HTML page that can then be uploaded and shared with others.

Download: GitHub download
Preview: My Movies
Source code: GitHub repo

Features include:

  • Media library to JSON exporter
  • Search box with live filtering
  • Sort by rating, release date and name
  • Filter by genre
  • View information on a film or TV show including cast, runtime etc
  • Lazy loading of images for those with 500 films

Plex Export requires PHP to be installed for the command line exporter to be run, however the final page can be run on any webserver.

70 Responses to Plex Export

  1. Jonas says:

    Looks really good!

    One thing I would like to see added, would be to be able to browse individual tv episodes, and sort them by when they were added in Plex. This would make it easy for people on my lan to see what is new.

    • Luke L says:

      @Jonas TV episode support is planned, but it’ll require a larger rewrite of code which is why I’m holding off at the moment.

  2. Danny says:

    Gorgeous! I love this. I had posted a request for this on plexapp’s forums but didn’t hold my breath. This came out wonderful. Donation Sent!

  3. Atrolon says:

    Love this Exporter, great job :)

    A watch/unwatch feature would be cool


  4. Fredrik says:

    It would be quite cool if the movies were accessible as html5 movies from the “web export” i.e. the web export provides a link to Plex media server’s html5 movie.

    • Luke L says:

      This has been requested but has currently being left out for two reasons: when sharing your library it may not be able to access Plex unless this has been set up correctly i.e. a support nightmare. And secondly, providing access to copyrighted materials online is sure to end badly. The only way to prevent this is to require a password or similar, but this then requires additional server-side code which will negate the portability of the current system (many people currently use Dropbox to host their export).

  5. Josselin says:

    Awesome job ! thanks a lot !

  6. Pingback: Exporter sa médiathèque sur le web | [fr]

  7. Paul says:

    Works great for me!
    Thanks a lot for the feature.

  8. Pingback: Vous utilisez Plex ? Vous devez essayer ça ! @ Un, deux, trois, blog !

  9. Pierro says:

    Thanks a lot for that, it works like a charm, even with movie summary in french.

    Some artworks are missing but I think it’s because they are manually added. I suppose it will be corrected in the next release.

    One request if it’s not too hard to do : could you find a way to let us translate the menu and other language element in French for example ?

    I can do the translation for you, but, you have to find a way to not to have to do it at each update…

    I hope my comment is clear ! :-)

    Keep the good work, I will be definitely doing a donation if you can make it translatable !

  10. robert says:

    Great tool – working fantastic and the generated pages are awesome! Thank you very much…

  11. Akrug says:

    Lovely interface. If this could work as a remote control for Plex, it would be the best looking remote I’ve ever seen!

  12. Guest says:

    I’m trying to integrate the Plex exported webpage into my WordPress-based blog. Currently, I have to do tons of edits on your CSS to resolve conflicts with my WordPress theme. I’d like the next version to be WordPress-friendly with unique names space for plex-related stuff, etc.

    • Luke L says:

      Because of the dynamic nature of Plex Export, integrating it into another site is possible but not recommended. The new version does feature more specific ID and classes for roles, but I can’t guarantee it will work 100% out of the box. Any chance I can see your integrated page to make future tweaks?

  13. Jon Hollamby says:

    First of all, love your work sir, this is a fantastic effort. I do have a few questions though, when I view the page on a PC, I get some weird things happening. In IE, nothing loads, but this is to be expected really. In Firefox on the other hand, it seems to think it’s an iPhone and displays the site using that CSS file rather than the normal one. Any ideas why that would be the case? Looking at the HTML:

    I have a feeling that this should be amended slightly to correct this issue.

    Any thoughts?


    • Jon Hollamby says:

      Grrr, the code didn’t show up…was just looking at the stylesheet links, I’m sure you know what I’m talking about :)

    • Luke L says:

      Thanks, I didn’t actually test the export on Windows (mentally justified it by saying Plex itself is Mac only), but it is on my todo list for version two as who knows might view it. If you use the contact form you should be able to send me the code snippet you mentioned.

  14. Pingback: » Plex Export

  15. TV says:

    This a great project. I would love to se:

    filter by year

    and support to Export my music library from plex. It seems to only do TV & Movies


  16. David says:

    That’s gorgeous, thanks a lot.
    I just translated it into french, send me an email if you are interested !

  17. Wow… I have been looking for something like this for some time now and when I found your site I though that this might get close… I was wrong however… this is EXACTLY what I was looking for and it looks so fancy!!! Really a good job.

    Only thing I was wondering (don’t know if it is possible and/or easy to accomplish) but would it be possible that you provide this tool via the plex apps? So that you can export this library from within Plex and maybe that it even automatically saves the output on an FTP server (so that it is available online)?

    If not then no worries, I will use the tool this way as well since I am really loving it!!!


    • Luke L says:

      Hi Nico, I will look at asking Plex to show this via the Tools but I’m not sure how close a fit it is to them. And glad you like it.

  18. Daniel says:

    I’d been looking for an export tool for quite a bit (never went beyond writing a short perl script to extract my movie list), and this is exactly what I needed.

    Thank you for the great tool!

  19. ipguy says:

    amazing, beautiful, fantastic, exactly what I was looking for !!
    one question, is there any way to sort by date, not release date of the movie but the date of the avi file ?

  20. stefan says:

    thank you! thats really a great tool.

    due to chromiums js restrictions it fails when running locally (XMLHttpRequest cannot load plex-data/data.js. Origin null is not allowed by Access-Control-Allow-Origin.) . but that can be fixed by loading the data.js file with a script tag in the header.

    • Luke L says:

      It can be, but it then makes the source file available to others much more easily. The new version (that used a JS DB) did use JSONP initially.

  21. AKIRA says:

    Sorting by date added like in Plex would be great, otherwise awsome tool!

  22. HB2011 says:

    Great Job
    I would like to know if it is possible to retrieve the path of the media. Is it possible ? Where can i find info to add this data to your scripting ?


    • Luke L says:

      The path to the media e.g. /Users/hb/movies/juno.m4v isn’t saved as you should be using the Plex API to display the stream. If you read it provides more information on how to get a stream.

      • HB2011 says:

        Thanks for the quick answer !
        Actually i do not plan to stream the media because it is not possible with the set top box i use. For my project, i need to develop a script that will retrieve all metadata, pictures and media paths and put it in a folder or container in the Hard Drive of my set top box.

        I will also develop a plex player on my set top box using this container, that is why i need to extract the path.
        Do you think it is possible with the plex api ?

        • Luke L says:

          Definitely, the paths are available via the API for each media item, just look for the tags.

          • HB2011 says:

            I’m still struggling with the actual media path. I cannot find a way to retrieve this info, can you detail this please ?


  23. CRiMe says:

    Works very well. Thanks so much!

    Just one question:
    Is it possible, after uploading the folder to Dropbox, to view it on an iPad or iPhone?


  24. Julian says:


    Thanks for this, it’s really awesome! One feature request though:
    I really like the sort option, but it would be great if you would be able to sort by recently added, so that I can see which movies my friends added lately.



  25. Julian says:

    Oh wow, I just see a few comments above that there’s a V2 version that does include this.

    Going to check that out now! Thanks!

  26. MACscr says:

    Just an idea, but why not add links to trailers as well? BTW, great work on this. I havent used it yet, but it looks pretty amazing. I really think its something that Plex should offer directly from the media server versus having to export it, etc.

    • Luke L says:

      Unfortunately I can’t get the trailer data out of Plex, but if you know a service that can provide them for an IMDB title or similar please let me know!

  27. Daniel says:

    Hey, this looks great but the download site is just giving me a server error atm, so hopefully it’s fixed soon and I can download it!
    Cheers :)

  28. john says:

    Hi ! I have an idea i’d like to share with you ! Is it possible to develop a third version of Plex Export with the addition of a media player (flash and html5) ? When selecting a movie, you can play directly the media. I’m ready to help for the development of such feature :)

    Many thanks !

    • Luke L says:

      This will work locally but not online at the moment and there is the additional problem of security (anyone can play your content). I’m waiting for Plex to make some changes and then might revisit this idea. Thanks.

  29. john says:

    Well, actually, that’s what i’m looking for, playing the media locally… do you know if it is esay to achieve at the moment ? i suppose it is necessary to embbed a player and specify the file path…

  30. tv says:

    This is great but it never loads in Chrome or IE on Mac or Windows..

  31. Srikanth says:


    Just downloaded plex-export. It was one of the feature I was missing in plex, when compared to mythtv. I love the interface and love the easy way of just one cammand. Hope plex will intergrate this functionality in by default. Like everyone here, would love to open a movie and play it in the web browser.

    Once again thanks a lot for sharing your work with all of us.


  32. John says:

    Is it possible for you to merge PLEX EXPORT AND SUBSONIC ( ?????????????????? WOULD KICK ASSS ! :-)

  33. frank says:

    This export tool is really amazing!! Thanks so much!!

    Only one question:
    Is it possible to change the standard view to “recently added” for all sections (movies, series, …)?
    It always takes a lot of time to change the view because my library contains hundreds of movies and series…
    This would be great!


  34. John says:

    Hi Luke

    I’ve tweaked your script a little bit : now, Plex Export can work as a Web Client :)

    i have added to each movie the link to play the video directly in the browser and i’ve also added the link to the video trailer on youtube. Works fine.

    • Dominik says:

      Hey John

      Would you happen to be willing to part with your version of the script? Using this as a webclient to Plex would be just what I was looking for.

      I’d be entirely grateful.


  35. Rogerio says:

    Hello Luke,
    I recently got to know a feature called Collections in Media Manager. It could probably be of better use to me than Sections, since a movie can be in more then one at the same time.
    Please, how the plex export handles collections? Does it list them and includes a filter in the page? Is it possible? Could I filter right in the export like the argument ‘-sections=…’ to keep some collections private?
    Thank you!

    • Luke L says:

      Hi Rogerio, Collections were added after I created Plex Export so I haven’t added them in yet. It is one of my top feature requests, but I haven’t had the time to add them unfortunately. Cheers.

  36. miskotes says:

    When running localhost/cli.php it’s writing thumbs but then I’m getting this error and webpage shows no media. Wamp server on Win 7.

    ( ! ) SCREAM: Error suppression ignored for
    ( ! ) Warning: fwrite() expects parameter 1 to be resource, string given in C:\wamp\www\Plex\cli.php on line 603
    Call Stack
    # Time Memory Function Location
    1 0.0135 564464 {main}( ) ..\cli.php:0
    2 23.5645 12462008 load_items_for_section( ) ..\cli.php:89
    3 26.8497 12662224 load_data_for_show( ) ..\cli.php:498
    4 26.8497 12662832 plex_log( ) ..\cli.php:317
    5 26.8497 12663152 fwrite ( ) ..\cli.php:582
    6 26.8497 12663840 plex_error_handler( ) ..\cli.php:582
    7 26.8497 12664120 fwrite ( ) ..\cli.php:603

    Many thanks.

    • Luke L says:

      Hi miskotes, I haven’t tested Plex Export on Win 7, but it should work as expected. Can you confirm which version of PHP WAMP is using?

      • miskotes says:

        Hello Luke,
        Many thanks for your reply. PHP version Wamp Server is using is 5.4.3, SQL 5.5.24, Apache 2.4.2.


  37. alex says:


    i have the same error with xampp on win7. i change the max execution time manually to few hours in php.ini. that works for me

  38. John says:

    Love it. Works great. THANK YOU

  39. ggsm says:


    I’ve tried an export and the demo page on Safari and Firefox (latest versions) but it get only the message: “Loading Please wait while this section loads…”

    Any ideas?

    • Luke L says:

      Can you confirm the address you’re using to load the webpage? If it looks like file://, the browsers will block the request as it’s a security danger.

  40. Dominik says:

    Hi Luke

    I took your script and added code to include the collections.
    I was wondering if you would like to have a copy of the files, or how I would go about adding it to the github repo (If that is even possible or desired).

    If anybody wants a copy, reply to this comment and I’ll send you the changed files.


  41. Jonathan says:

    I’ve been playing around with the plexexport script for a couple of hours and while i can get it to export the DB, I’ve been unsuccessful in getting the html file to display anything.
    From reading previous posts it seems the security of chrome might be what’s causing it.
    I’ve tried safari, chrome & firefox unsuccessfully.
    The only time I was able to get the data displayed was to drag the html file into a IOS simulator (iphone).
    So I’m pretty sure the data is ok.

    I’ve also tried to sync the collection of files up to dropbox, but that’s no good either. As in I just get basic html displayed.

    The error I get in chrome is “Uncaught ReferenceError: raw_plex_data is not defined”
    Further up, XMLHttpRequest cannot load file://[location of data.js]
    I’ve checked the data.js file and it does have the raw_plex_data var at the start, so i’m pretty sure it’s security related… just not sure what!

    Appreciate any help.


    • Luke L says:

      Hi JC, this is indeed the security policies of most modern browsers. Basically, they are stopping the HTML from loading the file as it’s on your computer, not a webserver. This is to stop say a page on the Internet from accessing file://MyDocs/my-secret-passwords.txt. You will need to access the page over http, this means either localhost or online somewhere. If you’re using OS X, you already have Apache installed which can serve websites. Your other best bet is Dropbox, which can give a public link to a file.

  42. thenet says:

    Nice Job! Exactly what i’ve looked for. Thanks!!

  43. JG says:

    Love plex export, its what I’ve been seeking for a while. I host it on Win 2008 R2 internallly in my home to allow my family to easily see what’s available to watch on our Roku’s via plex. Excellent work!

    Works great on IIS 7 with php installed.

  44. Steve says:

    Perfect job! Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>