RetroPie를 거의 미디어제어(KODI)로만 사용하다보니
파이에 연결된 모니터 말고 다른 기기에서도 보고싶은 욕구가 스믈스믈 올라오네요
컴퓨터로 보면 어짜피 samba도 설치되있겠다
아니면 네트워크로 공유되 있으니 접근해서 보면 되는데 (밖이라면 VPN)
스마트폰으로 보려니 동영상 플레이어가 지원을 해야 볼수 있는 문제가 있네요
VLC 플레이어만 해도 네트워크탭에는 URL을 넣도록 되어있네요
RTP/UDP 스트림이라니 용어도 참 생소하고.. 현기증이... 뭐 지금 하려는거랑은 내용이 다른듯 하지만
잘모르겠으니 패스
DLNA(Digital Living Network Alliance) 기술이라는데 잘모름 모든걸 알필요는 없다는 개인적인 생각
뭔진 모르겠지만 미디어서버로 쓸수 있는 패키지를 설치해봅니다
설치에 앞서... 외장하드 마운트등은 아래 참조
설치는 간단합니다
pi@rasp2-retropie:~ $ sudo apt-get install minidlna -y Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libavcodec56 libavformat56 libavresample2 libavutil54 libgsm1 libid3tag0 libmp3lame0 libopus0 liborc-0.4-0 libschroedinger-1.0-0 libtheora0 libvpx1 libx264-142 libxvidcore4 Suggested packages: opus-tools The following NEW packages will be installed: libavcodec56 libavformat56 libavresample2 libavutil54 libgsm1 libid3tag0 libmp3lame0 libopus0 liborc-0.4-0 libschroedinger-1.0-0 libtheora0 libvpx1 libx264-142 libxvidcore4 minidlna 0 upgraded, 15 newly installed, 0 to remove and 149 not upgraded. Need to get 7,744 kB/8,527 kB of archives. After this operation, 25.4 MB of additional disk space will be used. Get:1 http://archive.raspberrypi.org/debian/ jessie/main liborc-0.4-0 armhf 1:0.4.22-1rpi1rpi1g [123 kB] Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavutil54 armhf 6:11.11-1~deb8u1+rpi1 [162 kB] Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavresample2 armhf 6:11.11-1~deb8u1+rpi1 [99.1 kB] Get:4 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgsm1 armhf 1.0.13-4 [30.9 kB] Get:5 http://mirrordirector.raspbian.org/raspbian/ jessie/main libmp3lame0 armhf 3.99.5+repack1-7+deb8u1 [336 kB] Get:6 http://mirrordirector.raspbian.org/raspbian/ jessie/main libopus0 armhf 1.1-2 [134 kB] Get:7 http://mirrordirector.raspbian.org/raspbian/ jessie/main libschroedinger-1.0-0 armhf 1.0.11-2.1 [222 kB] Get:8 http://mirrordirector.raspbian.org/raspbian/ jessie/main libtheora0 armhf 1.1.1+dfsg.1-6 [147 kB] Get:9 http://mirrordirector.raspbian.org/raspbian/ jessie/main libx264-142 armhf 2:0.142.2431+gita5831aa-1+rpi2 [763 kB] Get:10 http://mirrordirector.raspbian.org/raspbian/ jessie/main libxvidcore4 armhf 2:1.3.3-1 [227 kB] Get:11 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavcodec56 armhf 6:11.11-1~deb8u1+rpi1 [4,494 kB] Get:12 http://mirrordirector.raspbian.org/raspbian/ jessie/main libavformat56 armhf 6:11.11-1~deb8u1+rpi1 [857 kB] Get:13 http://mirrordirector.raspbian.org/raspbian/ jessie/main libid3tag0 armhf 0.15.1b-11 [26.9 kB] Get:14 http://mirrordirector.raspbian.org/raspbian/ jessie/main minidlna armhf 1.1.2+dfsg-1.1+b1 [123 kB] Fetched 7,744 kB in 14s (541 kB/s) Selecting previously unselected package libavutil54:armhf. (Reading database ... 91598 files and directories currently installed.) Preparing to unpack .../libavutil54_6%3a11.11-1~deb8u1+rpi1_armhf.deb ... Unpacking libavutil54:armhf (6:11.11-1~deb8u1+rpi1) ... Selecting previously unselected package libavresample2:armhf. Preparing to unpack .../libavresample2_6%3a11.11-1~deb8u1+rpi1_armhf.deb ... Unpacking libavresample2:armhf (6:11.11-1~deb8u1+rpi1) ... Selecting previously unselected package libgsm1:armhf. Preparing to unpack .../libgsm1_1.0.13-4_armhf.deb ... Unpacking libgsm1:armhf (1.0.13-4) ... Selecting previously unselected package libmp3lame0:armhf. Preparing to unpack .../libmp3lame0_3.99.5+repack1-7+deb8u1_armhf.deb ... Unpacking libmp3lame0:armhf (3.99.5+repack1-7+deb8u1) ... Selecting previously unselected package libopus0:armhf. Preparing to unpack .../libopus0_1.1-2_armhf.deb ... Unpacking libopus0:armhf (1.1-2) ... Selecting previously unselected package liborc-0.4-0:armhf. Preparing to unpack .../liborc-0.4-0_1%3a0.4.22-1rpi1rpi1g_armhf.deb ... Unpacking liborc-0.4-0:armhf (1:0.4.22-1rpi1rpi1g) ... Selecting previously unselected package libschroedinger-1.0-0:armhf. Preparing to unpack .../libschroedinger-1.0-0_1.0.11-2.1_armhf.deb ... Unpacking libschroedinger-1.0-0:armhf (1.0.11-2.1) ... Selecting previously unselected package libtheora0:armhf. Preparing to unpack .../libtheora0_1.1.1+dfsg.1-6_armhf.deb ... Unpacking libtheora0:armhf (1.1.1+dfsg.1-6) ... Selecting previously unselected package libvpx1:armhf. Preparing to unpack .../libvpx1_1.3.0-3+rvt_armhf.deb ... Unpacking libvpx1:armhf (1.3.0-3+rvt) ... Selecting previously unselected package libx264-142:armhf. Preparing to unpack .../libx264-142_2%3a0.142.2431+gita5831aa-1+rpi2_armhf.deb ... Unpacking libx264-142:armhf (2:0.142.2431+gita5831aa-1+rpi2) ... Selecting previously unselected package libxvidcore4:armhf. Preparing to unpack .../libxvidcore4_2%3a1.3.3-1_armhf.deb ... Unpacking libxvidcore4:armhf (2:1.3.3-1) ... Selecting previously unselected package libavcodec56:armhf. Preparing to unpack .../libavcodec56_6%3a11.11-1~deb8u1+rpi1_armhf.deb ... Unpacking libavcodec56:armhf (6:11.11-1~deb8u1+rpi1) ... Selecting previously unselected package libavformat56:armhf. Preparing to unpack .../libavformat56_6%3a11.11-1~deb8u1+rpi1_armhf.deb ... Unpacking libavformat56:armhf (6:11.11-1~deb8u1+rpi1) ... Selecting previously unselected package libid3tag0. Preparing to unpack .../libid3tag0_0.15.1b-11_armhf.deb ... Unpacking libid3tag0 (0.15.1b-11) ... Selecting previously unselected package minidlna. Preparing to unpack .../minidlna_1.1.2+dfsg-1.1+b1_armhf.deb ... Unpacking minidlna (1.1.2+dfsg-1.1+b1) ... Processing triggers for man-db (2.7.0.2-5) ... Processing triggers for systemd (215-17+deb8u6) ... Setting up libavutil54:armhf (6:11.11-1~deb8u1+rpi1) ... Setting up libavresample2:armhf (6:11.11-1~deb8u1+rpi1) ... Setting up libgsm1:armhf (1.0.13-4) ... Setting up libmp3lame0:armhf (3.99.5+repack1-7+deb8u1) ... Setting up libopus0:armhf (1.1-2) ... Setting up liborc-0.4-0:armhf (1:0.4.22-1rpi1rpi1g) ... Setting up libschroedinger-1.0-0:armhf (1.0.11-2.1) ... Setting up libtheora0:armhf (1.1.1+dfsg.1-6) ... Setting up libvpx1:armhf (1.3.0-3+rvt) ... Setting up libx264-142:armhf (2:0.142.2431+gita5831aa-1+rpi2) ... Setting up libxvidcore4:armhf (2:1.3.3-1) ... Setting up libavcodec56:armhf (6:11.11-1~deb8u1+rpi1) ... Setting up libavformat56:armhf (6:11.11-1~deb8u1+rpi1) ... Setting up libid3tag0 (0.15.1b-11) ... Setting up minidlna (1.1.2+dfsg-1.1+b1) ... Processing triggers for libc-bin (2.19-18+deb8u7) ... Processing triggers for systemd (215-17+deb8u6) ... pi@rasp2-retropie:~ $ |
설치가 끝났으니 설정을 건들여 봅니다
일단 설정파일 백업과 수정
pi@rasp2-retropie:~ $ sudo cp /etc/minidlna.conf /etc/minidlna.conf_bk pi@rasp2-retropie:~ $ sudo vim /etc/minidlna.conf |
수정
12 13 # Path to the directory you want scanned for media files. 14 # 15 # This option can be specified more than once if you want multiple directori es 16 # scanned. 17 # 18 # If you want to restrict a media_dir to a specific content type, you can 19 # prepend the directory name with a letter representing the type (A, P or V) , 20 # followed by a comma, as so: 21 # * "A" for audio (eg. media_dir=A,/var/lib/minidlna/music) 22 # * "P" for pictures (eg. media_dir=P,/var/lib/minidlna/pictures) 23 # * "V" for video (eg. media_dir=V,/var/lib/minidlna/videos) 24 media_dir=/var/lib/minidlna 25 26 # Path to the directory that should hold the database and album art cache. 27 #db_dir=/var/cache/minidlna 28 29 # Path to the directory that should hold the log file. 30 #log_dir=/var/log 31 32 # Type and minimum level of importance of messages to be logged. 32,1 11% |
참고한 사이트를 보니 21~23줄의 예를 보고
음악, 사진, 비디오 디렉토리를 각각 설정해주네요
전 동영상만 있으니 V 설정만 해줬습니다
24번 라인에 외장하드의 비디오 경로를 넣어줬습니다
70 # This option is mandatory (or it must be specified on the command-line usin g 71 # "-p"). 72 port=8200 73 74 # URL presented to clients (e.g. http://example.com:80). 75 #presentation_url=/ 76 77 # Name that the DLNA server presents to clients. 78 # Defaults to "hostname: username". 79 #friendly_name= 80 81 # Serial number the server reports to clients. 82 # Defaults to 00000000. 83 serial=681019810597110 84 85 # Model name the server reports to clients. 86 #model_name=Windows Media Connect compatible (MiniDLNA) 87 88 # Model number the server reports to clients. 89 # Defaults to the version number of minidlna. 90 #model_number= -- INSERT -- 81,15 74% |
그리고 내리다가다보면 79번 라인쯤에 friendly_name= 부분이 주석처리되있는데
주석을 지우고 friendly_name=rasp2-retropie 로 변경했습니다
당연하게도 이름은 마음대로 하시길
참고로 port 는 8200으로 되있으니 변경하시려면 port 부분을 수정하면 됩니다
이제 테스트를 위해 minidlna서비스를 재가동해 줍니다
pi@rasp2-retropie:~ $ sudo service minidlna restart pi@rasp2-retropie:~ $ sudo service minidlna force-reload |
일단 폰에서 붙어야 되니 IP를 확인
pi@rasp2-retropie:~ $ ifconfig eth0 Link encap:Ethernet HWaddr b8:27:eb:a2:ea:e3 inet addr:192.168.0.23 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::e6fb:f83e:8c34:bcdf/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2780206 errors:0 dropped:403 overruns:0 frame:0 TX packets:2928173 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:337098739 (321.4 MiB) TX bytes:3524849460 (3.2 GiB)
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:5032 errors:0 dropped:0 overruns:0 frame:0 TX packets:5032 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:19571687 (18.6 MiB) TX bytes:19571687 (18.6 MiB)
wlan0 Link encap:Ethernet HWaddr 00:13:ef:e0:11:d0 inet addr:192.168.0.6 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::1646:4ba8:d578:4216/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:429499 errors:0 dropped:77 overruns:0 frame:0 TX packets:883 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:55002618 (52.4 MiB) TX bytes:105764 (103.2 KiB)
pi@rasp2-retropie:~ $ ps -ef | grep mini root 875 1 0 Feb01 ? 00:00:03 /usr/sbin/minissdpd -i 0.0.0.0 minidlna 16204 1 0 00:13 ? 00:00:00 /usr/bin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/minidlna.pid pi 16247 15280 0 00:18 pts/0 00:00:00 grep --color=auto mini pi@rasp2-retropie:~ $ |
프로세스도 잘떠있는것 같아 보이네요
이제 스마트폰의 미디어 플레이어에서 잘되나 테스트를 해봐야겠네요
사용한 플레이어는 OPlayer Lite 라는 앱으로 아이폰 앱입니다
|
|
|
|
|
|
앱설정을 해주니 잘나오네요
잘되는듯 하네요
근데 처음받아본 앱이라... 광고가 참 거슬리고.. 자막도 자동으로 들어가는게 아니라
맘에 안드네요
그리고... 가장 중요한 자막이 안나와서 멘붕이네요
그나마 nPlayer는 자막확장자가 smi일땐 안나오지만 srt로 눈속임을 해줬더니 나오네요...
모든 영상물의 자막을 smi에서 srt로 바꿔야 하는건가 하는 고뇌에 빠짐...
일단 downloads 디렉토리 하위에 있는 모든 smi 파일명을 읽어서 srt파일로 복사...
rename 명령어로 하면 편할듯 싶긴한데
smi와 srt가 같이 있어야 원본이 smi라는걸 알텐데 하는 잡스러운 생각이 한목하는 중
이 모든 고민을 털어주는건 역시 한국어 영상... 이라는 결론
그래도 이제 집에 어디에서든 파이에 붙어서 미디어 감상을 할 수 있게 되었네요
물론 외부에서 사용하려면 내부 IP가(192.168.0.XXX 로 시작하는...) 아닌 DDNS를 이용해야 하겠지만
사용자 인증따위 없어보이는데... 이걸 어찌해야 하나 고민이네요
참고
006. Raspberry Pi 라즈베리파이 RetroPie 업데이트 (0) | 2018.12.03 |
---|---|
005. Raspberry Pi 라즈베리 파이 LXDE(Lightweight X11 Desktop Environment) 설치 (1) | 2018.08.13 |
003. Raspberry Pi 라즈베리파이 RetroPie v4.1 - KODI install 설치 (0) | 2017.04.24 |
002. Raspberry Pi 라즈베리파이 RetroPie v3.8.1 레트로파이 KODI 설치 (0) | 2017.01.30 |
001. Raspberry Pi 라즈베리파이 RetroPie Game Rom 넣기 (0) | 2017.01.26 |
댓글 영역