{"id":6866,"date":"2020-06-05T11:47:11","date_gmt":"2020-06-05T16:47:11","guid":{"rendered":"https:\/\/www.blackgate.net\/blog\/?p=6866"},"modified":"2020-07-20T11:16:04","modified_gmt":"2020-07-20T16:16:04","slug":"mymedia-under-screen","status":"publish","type":"post","link":"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/","title":{"rendered":"MyMedia under screen"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I use a Python application called <a href=\"https:\/\/community.roku.com\/t5\/Channel-Issues-Questions\/My-Media-Your-Music-and-Video-on-the-Roku-DVP\/td-p\/118002\">MyMedia<\/a> to stream videos from my Ubuntu media server to my Roku boxes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I installed Ubuntu 20 yesterday. The painfully slow navigation problem (caused by the slow but inevitable deprecation of python 2) re-appeared, and I tried to re-create the fix. Initially, I just succeeded in preventing MyMedia from running at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is what actually worked.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>First, I copied all of my backed up MyMedia files to <code>\/usr\/local\/bin\/mymedia<\/code><\/li><li>Then I installed python 2.7&#8230;<\/li><li><code>sudo apt-get install python2<\/code><\/li><li>Then I installed pip, but first I had to install curl&#8230;<\/li><li><code>sudo apt-get install curl<\/code><\/li><li><code>curl \"https:\/\/bootstrap.pypa.io\/get-pip.py\" -o \"get-pip.py\"<\/code><\/li><li><code>sudo python2 get-pip.py<\/code><\/li><li>Then I installed Pillow<\/li><li><code>sudo python2 -m pip install --upgrade Pillow<\/code><\/li><li>It might not have been necessary, but I installed several image libraries&#8230;<\/li><li><code>sudo apt-get install libjpeg-dev<\/code><\/li><li><code>sudo ln -s \/usr\/lib\/x86_64-linux-gnu\/libjpeg.so \/usr\/lib<\/code><\/li><li><code>sudo apt-get install zlib1g-de<\/code><\/li><li><code>sudo ln -s \/usr\/lib\/x86_64-linux-gnu\/libz.so \/usr\/lib<\/code><\/li><li>In <code>common.py<\/code>, I made sure that this&#8230;<\/li><li><code>import Image<\/code><\/li><li>&#8230; had been replaced with this&#8230;<\/li><li><code>#import Image<br>from PIL import Image<\/code><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Huge success!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that during this process, I got several warnings about Python 2.7 being deprecated, like this one:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><span class=\"has-inline-color has-vivid-red-color\">DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https:\/\/pip.pypa.io\/en\/latest\/development\/release-process\/#python-2-support<\/span><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It&#8217;s only a matter of time before MyMedia becomes unusable. I would love to get access to the git repository and try to update it for Python 3, if that&#8217;s possible. I&#8217;ve asked, but the original developer is no longer associated with the project. It may be that I&#8217;ll have to find a new solution to this problem in a year or so.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, I have updated my init script (<code>\/etc\/init.d\/memedia<\/code>), which runs mymedia in a <a href=\"https:\/\/www.howtogeek.com\/662422\/how-to-use-linuxs-screen-command\/\">screen<\/a> &#8230;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>#!\/bin\/sh<\/code><br><code>### BEGIN INIT INFO<br># Provides: minidlna<br># Required-Start: $local_fs $network $remote_fs<br># Required-Stop: $local_fs $network $remote_fs<br># Default-Start: 2 3 4 5<br># Default-Stop: 0 1 6<br># Short-Description: mymedia server<br># Description: mymedia media server.<br>### END INIT INFO<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code># Do NOT \"set -e\"<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code># PATH should only include \/usr\/* if it runs after the mountnfs.sh script<br>DESC=\"MyMedia media server\"<br>MEDIAPATH=\/var\/media<br>DAEMONPATH=\/usr\/local\/bin\/mymedia\/server<br>DAEMON=$DAEMONPATH\/mymedia.py<br>SCRIPTNAME=\/etc\/init.d\/mymedia<br>SCREENNAME=mymedia<br>USER=bblackmoor<br>GROUP=media<br>EXECUSER=root<br>EXECGROUP=media<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>case \"$1\" in<br>start)<br>chown -R $EXECUSER:$EXECGROUP $DAEMONPATH<br>chown -R $USER:$GROUP $MEDIAPATH<br>su - $USER -c \"cd $DAEMONPATH; screen -dm -S $SCREENNAME python2 $DAEMON\"<br>;;<br>stop)<br>su - $USER -c \"screen -S $SCREENNAME -X quit\"<br>su - $USER -c \"screen -wipe\"<br>;;<br>status)<br>su - $USER -c \"screen -list | grep $SCREENNAME\"<br>;;<br>*)<br>echo \"Usage: $SCRIPTNAME {start|stop|status}\" &gt;&amp;2<br>exit 3<br>;;<br>esac<br>:<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use a Python application called MyMedia to stream videos from my Ubuntu media server to my Roku boxes. I installed Ubuntu 20 yesterday. The painfully slow navigation problem (caused by the slow but inevitable deprecation of python 2) re-appeared, and I tried to re-create the fix. Initially, I just succeeded in preventing MyMedia from [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,3,22],"tags":[],"class_list":["post-6866","post","type-post","status-publish","format-standard","hentry","category-linux","category-movies","category-software"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MyMedia under screen - Blackmoor Vituperative<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MyMedia under screen - Blackmoor Vituperative\" \/>\n<meta property=\"og:description\" content=\"I use a Python application called MyMedia to stream videos from my Ubuntu media server to my Roku boxes. I installed Ubuntu 20 yesterday. The painfully slow navigation problem (caused by the slow but inevitable deprecation of python 2) re-appeared, and I tried to re-create the fix. Initially, I just succeeded in preventing MyMedia from [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/\" \/>\n<meta property=\"og:site_name\" content=\"Blackmoor Vituperative\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bblackmoor\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/bblackmoor\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-05T16:47:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-07-20T16:16:04+00:00\" \/>\n<meta name=\"author\" content=\"bblackmoor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/bblackmoor_\" \/>\n<meta name=\"twitter:site\" content=\"@bblackmoor_\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"bblackmoor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/mymedia-under-screen\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/mymedia-under-screen\\\/\"},\"author\":{\"name\":\"bblackmoor\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#\\\/schema\\\/person\\\/bb04cdbf863652f366c64e81805d6c4f\"},\"headline\":\"MyMedia under screen\",\"datePublished\":\"2020-06-05T16:47:11+00:00\",\"dateModified\":\"2020-07-20T16:16:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/mymedia-under-screen\\\/\"},\"wordCount\":264,\"publisher\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#\\\/schema\\\/person\\\/bb04cdbf863652f366c64e81805d6c4f\"},\"articleSection\":[\"Linux\",\"Movies\",\"Software\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/mymedia-under-screen\\\/\",\"url\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/mymedia-under-screen\\\/\",\"name\":\"MyMedia under screen - Blackmoor Vituperative\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#website\"},\"datePublished\":\"2020-06-05T16:47:11+00:00\",\"dateModified\":\"2020-07-20T16:16:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/mymedia-under-screen\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/mymedia-under-screen\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/mymedia-under-screen\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MyMedia under screen\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/\",\"name\":\"Blackmoor Vituperative\",\"description\":\"But in the end it&#039;s only a passing thing, this shadow; even darkness must pass.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#\\\/schema\\\/person\\\/bb04cdbf863652f366c64e81805d6c4f\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/#\\\/schema\\\/person\\\/bb04cdbf863652f366c64e81805d6c4f\",\"name\":\"bblackmoor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg_sigil_lg.png\",\"url\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg_sigil_lg.png\",\"contentUrl\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg_sigil_lg.png\",\"width\":900,\"height\":900,\"caption\":\"bblackmoor\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/bg_sigil_lg.png\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/bblackmoor\",\"https:\\\/\\\/www.instagram.com\\\/bsblackmoor\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/bblackmoor_\"],\"url\":\"https:\\\/\\\/www.blackgate.net\\\/blog\\\/author\\\/bblackmoor\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MyMedia under screen - Blackmoor Vituperative","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/","og_locale":"en_US","og_type":"article","og_title":"MyMedia under screen - Blackmoor Vituperative","og_description":"I use a Python application called MyMedia to stream videos from my Ubuntu media server to my Roku boxes. I installed Ubuntu 20 yesterday. The painfully slow navigation problem (caused by the slow but inevitable deprecation of python 2) re-appeared, and I tried to re-create the fix. Initially, I just succeeded in preventing MyMedia from [&hellip;]","og_url":"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/","og_site_name":"Blackmoor Vituperative","article_publisher":"https:\/\/www.facebook.com\/bblackmoor","article_author":"https:\/\/www.facebook.com\/bblackmoor","article_published_time":"2020-06-05T16:47:11+00:00","article_modified_time":"2020-07-20T16:16:04+00:00","author":"bblackmoor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/bblackmoor_","twitter_site":"@bblackmoor_","twitter_misc":{"Written by":"bblackmoor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/#article","isPartOf":{"@id":"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/"},"author":{"name":"bblackmoor","@id":"https:\/\/www.blackgate.net\/blog\/#\/schema\/person\/bb04cdbf863652f366c64e81805d6c4f"},"headline":"MyMedia under screen","datePublished":"2020-06-05T16:47:11+00:00","dateModified":"2020-07-20T16:16:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/"},"wordCount":264,"publisher":{"@id":"https:\/\/www.blackgate.net\/blog\/#\/schema\/person\/bb04cdbf863652f366c64e81805d6c4f"},"articleSection":["Linux","Movies","Software"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/","url":"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/","name":"MyMedia under screen - Blackmoor Vituperative","isPartOf":{"@id":"https:\/\/www.blackgate.net\/blog\/#website"},"datePublished":"2020-06-05T16:47:11+00:00","dateModified":"2020-07-20T16:16:04+00:00","breadcrumb":{"@id":"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.blackgate.net\/blog\/mymedia-under-screen\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.blackgate.net\/blog\/"},{"@type":"ListItem","position":2,"name":"MyMedia under screen"}]},{"@type":"WebSite","@id":"https:\/\/www.blackgate.net\/blog\/#website","url":"https:\/\/www.blackgate.net\/blog\/","name":"Blackmoor Vituperative","description":"But in the end it&#039;s only a passing thing, this shadow; even darkness must pass.","publisher":{"@id":"https:\/\/www.blackgate.net\/blog\/#\/schema\/person\/bb04cdbf863652f366c64e81805d6c4f"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.blackgate.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.blackgate.net\/blog\/#\/schema\/person\/bb04cdbf863652f366c64e81805d6c4f","name":"bblackmoor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.blackgate.net\/blog\/wp-content\/uploads\/2022\/06\/bg_sigil_lg.png","url":"https:\/\/www.blackgate.net\/blog\/wp-content\/uploads\/2022\/06\/bg_sigil_lg.png","contentUrl":"https:\/\/www.blackgate.net\/blog\/wp-content\/uploads\/2022\/06\/bg_sigil_lg.png","width":900,"height":900,"caption":"bblackmoor"},"logo":{"@id":"https:\/\/www.blackgate.net\/blog\/wp-content\/uploads\/2022\/06\/bg_sigil_lg.png"},"sameAs":["https:\/\/www.facebook.com\/bblackmoor","https:\/\/www.instagram.com\/bsblackmoor\/","https:\/\/x.com\/https:\/\/twitter.com\/bblackmoor_"],"url":"https:\/\/www.blackgate.net\/blog\/author\/bblackmoor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/posts\/6866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/comments?post=6866"}],"version-history":[{"count":2,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/posts\/6866\/revisions"}],"predecessor-version":[{"id":6959,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/posts\/6866\/revisions\/6959"}],"wp:attachment":[{"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/media?parent=6866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/categories?post=6866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blackgate.net\/blog\/wp-json\/wp\/v2\/tags?post=6866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}