{"id":4559,"date":"2015-05-02T09:36:17","date_gmt":"2015-05-02T01:36:17","guid":{"rendered":"http:\/\/vanraspi.dnamer.net\/wordpress\/?p=92"},"modified":"2015-05-02T09:36:17","modified_gmt":"2015-05-02T01:36:17","slug":"raspiberry-pi%e5%ae%89%e8%a3%85minidlna1-1-4%e5%b9%b6%e6%94%af%e6%8c%81rmvb","status":"publish","type":"post","link":"https:\/\/lttt.vanabel.cn\/?p=4559","title":{"rendered":"Raspiberry Pi\u5b89\u88c5minidlna1.1.4\u5e76\u652f\u6301rmvb"},"content":{"rendered":"<p>\u9996\u9009\u53c2\u8003<a id=\"fnref:htpcguide\" class=\"footnote\" title=\"See footnote\" href=\"#fn:htpcguide\">1<\/a>\u7f16\u8bd1\u5b89\u88c51.1.4.<br \/>\n1. \u5378\u8f7d\u63891.0.24<\/p>\n<pre class=\"lang:default decode:true \">sudo apt-get purge minidlna -y\nsudo apt-get remove minidlna\nsudo apt-get autoremove -y<\/pre>\n<p>2. \u6dfb\u52a0\u6e90\uff1a<code>echo \"deb-src http:\/\/archive.raspbian.org\/raspbian wheezy main contrib non-free\" | sudo tee -a \/etc\/apt\/sources.list<\/code>, \u5e76\u66f4\u65b0\u6e90\uff1a<code>sudo apt-get update<\/code><br \/>\n3. \u5b89\u88c5\u7f16\u8bd1\u73af\u5883\u4f9d\u8d56\u5305:<code>sudo apt-get build-dep minidlna -y<\/code>, \u4f60\u4e5f\u53ef\u4ee5\u624b\u52a8\u5b89\u88c5\uff1a<br \/>\n<code>sudo apt-get install libjpeg-dev libsqlite3-dev libexif-dev libid3tag0-dev libvorbis-dev libflac-dev -y<\/code><br \/>\n4. \u4e0b\u8f7dminidlna1.1.4\u6e90\u7801\uff1a<code>wget http:\/\/sourceforge.net\/projects\/minidlna\/files\/minidlna\/1.1.4\/minidlna-1.1.4.tar.gz<\/code>\u5e76\u89e3\u538b\uff1a<code>tar -xvf minidlna-1.1.4.tar.gz<\/code>, \u7136\u540e\u5207\u6362\u5230\u76ee\u5f55\uff1a<code>cd minidlna-1.1.4<\/code><br \/>\n<!--more--><\/p>\n<p>5. \u7f16\u8f91\u6e90\u7801\u4f7f\u5f97\u652f\u6301rmvb\uff0c \u4e3b\u8981\u4fee\u6539\u7684\u5730\u65b9\u6709<a id=\"fnref:coolex\" class=\"footnote\" title=\"See footnote\" href=\"#fn:coolex\">2<\/a><a id=\"fnref:csdn\" class=\"footnote\" title=\"See footnote\" href=\"#fn:csdn\">3<\/a><\/p>\n<pre class=\"lang:default decode:true \">diff -ur minidlna-1.1.4\/metadata.c minidlna-1.1.4-usr\/metadata.c\n--- minidlna-1.1.4\/metadata.c   2014-08-27 05:09:22.000000000 +0800\n+++ minidlna-1.1.4-usr\/metadata.c       2015-05-02 08:11:35.278306437 +0800\n@@ -841,6 +841,12 @@\n                        xasprintf(&amp;m.mime, \"video\/x-matroska\");\n                else if( strcmp(ctx-&gt;iformat-&gt;name, \"flv\") == 0 )\n                        xasprintf(&amp;m.mime, \"video\/x-flv\");\n+               \/\/add by user to support rmvb\n+               \/\/from http:\/\/blog.csdn.net\/Haven200\/article\/details\/43039261\n+               else if( strcmp(ctx-&gt;iformat-&gt;name, \"rm\") == 0 )\n+                       xasprintf(&amp;m.mime, \"video\/x-pn-realvideo\");\n+               else if( strcmp(ctx-&gt;iformat-&gt;name, \"rmvb\") == 0 )\n+                       xasprintf(&amp;m.mime, \"video\/x-pn-realvideo\");\n                if( m.mime )\n                        goto video_no_dlna;\ndiff -ur minidlna-1.1.4\/upnpglobalvars.h minidlna-1.1.4-usr\/upnpglobalvars.h\n--- minidlna-1.1.4\/upnpglobalvars.h     2014-08-27 05:09:22.000000000 +0800\n+++ minidlna-1.1.4-usr\/upnpglobalvars.h 2015-05-02 08:15:07.937072539 +0800\n@@ -169,7 +169,8 @@\n        \"http-get:*:audio\/mp4:*,\" \n        \"http-get:*:audio\/x-wav:*,\" \n        \"http-get:*:audio\/x-flac:*,\" \n-       \"http-get:*:application\/ogg:*\"\n+       \"http-get:*:application\/ogg:*,\"\n+  \"http-get:*:video\/x-pn-realvideo:*\"\n\n #define DLNA_FLAG_DLNA_V1_5      0x00100000\n #define DLNA_FLAG_HTTP_STALLING  0x00200000\n diff -ur minidlna-1.1.4\/utils.c minidlna-1.1.4-usr\/utils.c\n--- minidlna-1.1.4\/utils.c      2014-08-27 05:09:22.000000000 +0800\n+++ minidlna-1.1.4-usr\/utils.c  2015-05-02 08:03:17.031201433 +0800\n@@ -381,6 +381,7 @@\n                ends_with(file, \".m2t\") || ends_with(file, \".mkv\")   ||\n                ends_with(file, \".vob\") || ends_with(file, \".ts\")    ||\n                ends_with(file, \".flv\") || ends_with(file, \".xvid\")  ||\n+               ends_with(file, \".rm\")  || ends_with(file, \".rmvb\")  ||\n #ifdef TIVO_SUPPORT\n                ends_with(file, \".TiVo\") ||\n #endif<\/pre>\n<p>6. \u5b89\u88c5<code>sudo apt-get install autoconf automake autopoint<\/code>\u5e76\u6267\u884c<code>.\/autogen.sh<\/code>\uff0c \u7136\u540e\u914d\u7f6e\u7f16\u8bd1\u73af\u5883\uff1a<code>.\/configure \u2013disable-nls<\/code><\/p>\n<p>7. \u7f16\u8bd1\u5e76\u5b89\u88c5\uff1a<code>make && sudo make install<\/code><\/p>\n<p>8. \u590d\u5236minidlna\u914d\u7f6e\u6587\u4ef6\uff1a<code>sudo cp minidlna.conf \/etc\/<\/code>\u5e76\u7f16\u8f91<code>sudo vim \/etc\/minidlna.conf<\/code> \u4fee\u6539<\/p>\n<pre class=\"lang:default decode:true \" > media_dir=\/home\/pi\/downloads\/Torrent_complete\n# Names the DLNA server\nfriendly_name=RasPi Media Server\n# Tells the DLNA to update the library when there are changes\ninotify=yes<\/pre>\n<p>\u8fd9\u91cc\u6211\u4eec\u628a\u6240\u6709\u5a92\u4f53\u90fd\u653e\u5230\u4e86<code>media_dir<\/code>, \u8bf7\u5bf9\u5e94\u4fee\u6539. inotify\u8868\u793a\u662f\u5426\u5237\u65b0\u65b0\u6587\u4ef6<\/p>\n<p>9. \u5f00\u542f\u670d\u52a1\uff1a<code>sudo service minidlna start<\/code><\/p>\n<p>10. \u5f00\u673a\u81ea\u542f\u52a8\uff1a<\/p>\n<pre class=\"lang:default decode:true \" >sudo cp linux\/minidlna.init.d.script \/etc\/init.d\/minidlna\nsudo chmod 755 \/etc\/init.d\/minidlna\nsudo update-rc.d minidlna defaults<\/pre>\n<h4 id=\"\u53c2\u8003\u6587\u732e\">\u53c2\u8003\u6587\u732e<\/h4>\n<div class=\"footnotes\">\n<hr \/>\n<ol>\n<li id=\"fn:htpcguide\"><a href=\"http:\/\/www.htpcguides.com\/install-readymedia-minidlna-1-1-4-raspberry-pi\/\">Install ReadyMedia miniDLNA 1.1.4 Raspberry Pi<\/a> <a class=\"reversefootnote\" title=\"Return to article\" href=\"#fnref:htpcguide\">\u21a9<\/a><\/li>\n<li id=\"fn:coolex\"><a href=\"http:\/\/coolex.info\/blog\/414.html\">minidlna\u652f\u6301\u5171\u4eabrmvb\u6587\u4ef6<\/a> <a class=\"reversefootnote\" title=\"Return to article\" href=\"#fnref:coolex\">\u21a9<\/a><\/li>\n<li id=\"fn:csdn\"><a href=\"http:\/\/blog.csdn.net\/Haven200\/article\/details\/43039261\">MiniDLNA 1.1.4 \u6dfb\u52a0\u5bf9rmvb\u683c\u5f0f\u7684\u652f\u6301 <\/a> <a class=\"reversefootnote\" title=\"Return to article\" href=\"#fnref:csdn\">\u21a9<\/a><\/li>\n<\/ol>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u9996\u9009\u53c2\u80031\u7f16\u8bd1\u5b89\u88c51.1.4. 1. \u5378\u8f7d\u63891.0.24 sudo apt-ge &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/lttt.vanabel.cn\/?p=4559\"> <span class=\"screen-reader-text\">Raspiberry Pi\u5b89\u88c5minidlna1.1.4\u5e76\u652f\u6301rmvb<\/span> \u9605\u8bfb\u66f4\u591a &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[559,609,321],"class_list":["post-4559","post","type-post","status-publish","format-standard","hentry","category-10","tag-minidlna","tag-rmvb","tag-321"],"_links":{"self":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/4559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4559"}],"version-history":[{"count":0,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=\/wp\/v2\/posts\/4559\/revisions"}],"wp:attachment":[{"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lttt.vanabel.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}