서버/리눅스 서버

MiniDLNA 1.3.0 컴파일 하기 (DSD 지원)

ㅋㅋ잠자 2021. 11. 4. 22:36
반응형

안녕하세요? 도정진입니다.

MiniDLNA 1.3.0 컴파일 및 설치 해보도록 하겠습니다.

 

1.3.0 버전 부터는 DSD 기본 지원한다고 합니다.

표지 고화질 지원을 위해 패치 하나가 추가적으로 들어갈 예정입니다.

1. 환경

CoreELEC ARM32 ubuntu18 docker 환경에서 컴파일 진행하였습니다.

2. 일단 minidlna 를 한번 설치합니다.

root@CoreELEC:~# apt install minidlna
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  fontconfig fontconfig-config fonts-dejavu-core libaacs0 libavcodec57 libavformat57 libavutil55 libbdplus0
  libbluray2 libcairo2 libchromaprint1 libcroco3 libdatrie1 libdrm-amdgpu1 libdrm-common libdrm-nouveau2
  libdrm-radeon1 libdrm2 libelf1 libexif12 libflac8 libfontconfig1 libfreetype6 libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgme0 libgraphite2-3 libgsm1 libharfbuzz0b libid3tag0 libjbig0
  libjpeg-turbo8 libjpeg8 libllvm10 libmp3lame0 libmpg123-0 libogg0 libopenjp2-7 libopenmpt0 libopus0
  libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpixman-1-0 libpng16-16 librsvg2-2 librsvg2-common
  libshine3 libsnappy1v5 libsoxr0 libspeex1 libssh-gcrypt-4 libswresample2 libthai-data libthai0 libtheora0
  libtiff5 libtwolame0 libva-drm2 libva-x11-2 libva2 libvdpau1 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx5
  libwavpack1 libwebp6 libwebpmux3 libx11-xcb1 libx264-152 libx265-146 libxcb-dri2-0 libxcb-dri3-0 libxcb-present0
  libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxfixes3 libxrender1 libxshmfence1 libxvidcore4
  libzvbi-common libzvbi0 mesa-va-drivers mesa-vdpau-drivers va-driver-all vdpau-driver-all
Suggested packages:
  libbluray-bdj opus-tools librsvg2-bin speex libvdpau-va-gl1
The following NEW packages will be installed:
  fontconfig fontconfig-config fonts-dejavu-core libaacs0 libavcodec57 libavformat57 libavutil55 libbdplus0
  libbluray2 libcairo2 libchromaprint1 libcroco3 libdatrie1 libdrm-amdgpu1 libdrm-common libdrm-nouveau2
  libdrm-radeon1 libdrm2 libelf1 libexif12 libflac8 libfontconfig1 libfreetype6 libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgme0 libgraphite2-3 libgsm1 libharfbuzz0b libid3tag0 libjbig0
  libjpeg-turbo8 libjpeg8 libllvm10 libmp3lame0 libmpg123-0 libogg0 libopenjp2-7 libopenmpt0 libopus0
  libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpixman-1-0 libpng16-16 librsvg2-2 librsvg2-common
  libshine3 libsnappy1v5 libsoxr0 libspeex1 libssh-gcrypt-4 libswresample2 libthai-data libthai0 libtheora0
  libtiff5 libtwolame0 libva-drm2 libva-x11-2 libva2 libvdpau1 libvorbis0a libvorbisenc2 libvorbisfile3 libvpx5
  libwavpack1 libwebp6 libwebpmux3 libx11-xcb1 libx264-152 libx265-146 libxcb-dri2-0 libxcb-dri3-0 libxcb-present0
  libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxfixes3 libxrender1 libxshmfence1 libxvidcore4
  libzvbi-common libzvbi0 mesa-va-drivers mesa-vdpau-drivers minidlna va-driver-all vdpau-driver-all
0 upgraded, 91 newly installed, 0 to remove and 2 not upgraded.
Need to get 31.7 MB of archives.
After this operation, 141 MB of additional disk space will be used.
Do you want to continue? [Y/n]

3. 소스 받고 컴파일 하기

# 소스를 받습니다.
root@CoreELEC:~# wget https://jaist.dl.sourceforge.net/project/minidlna/minidlna/1.3.0/minidlna-1.3.0.tar.gz
--2021-11-04 22:11:11--  https://jaist.dl.sourceforge.net/project/minidlna/minidlna/1.3.0/minidlna-1.3.0.tar.gz
Resolving jaist.dl.sourceforge.net (jaist.dl.sourceforge.net)... 150.65.7.130, 2001:df0:2ed:feed::feed
Connecting to jaist.dl.sourceforge.net (jaist.dl.sourceforge.net)|150.65.7.130|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 509576 (498K) [application/x-gzip]
Saving to: ‘minidlna-1.3.0.tar.gz’

minidlna-1.3.0.tar.gz        100%[==============================================>] 497.63K   412KB/s    in 1.2s

2021-11-04 22:11:13 (412 KB/s) - ‘minidlna-1.3.0.tar.gz’ saved [509576/509576]

# 압축을 풉니다.
root@CoreELEC:~# tar xf minidlna-1.3.0.tar.gz

# 이동합니다.
root@CoreELEC:~# cd minidlna-1.3.0
# 의존성 패키지를 설치합니다.
root@CoreELEC:~/minidlna-1.3.0# apt install build-essential gcc libavutil-dev libavcodec-dev libavformat-dev libjpeg-dev libsqlite3-dev libexif-dev libid3tag0-dev libogg-dev libvorbis-dev libflac-dev gettext
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
build-essential set to manually installed.
gcc is already the newest version (4:7.4.0-1ubuntu2.3).
gcc set to manually installed.
libavutil-dev is already the newest version (7:3.4.8-0ubuntu0.2).
The following additional packages will be installed:
  javascript-common libexif-doc libjpeg-turbo8-dev libjpeg8-dev libjs-jquery libswresample-dev pkg-config
  zlib1g-dev
Suggested packages:
  apache2 | lighttpd | httpd sqlite3-doc
The following NEW packages will be installed:
  javascript-common libavcodec-dev libavformat-dev libexif-dev libexif-doc libflac-dev libid3tag0-dev libjpeg-dev
  libjpeg-turbo8-dev libjpeg8-dev libjs-jquery libogg-dev libsqlite3-dev libswresample-dev libvorbis-dev
  pkg-config zlib1g-dev
0 upgraded, 17 newly installed, 0 to remove and 2 not upgraded.
Need to get 8,132 kB of archives.
After this operation, 23.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]

# 앨범아트 패치를 받습니다.
root@CoreELEC:~/minidlna-1.3.0# wget https://gist.github.com/grigorye/d30bbed518226e44a18eec75f6f6159e/raw/78a5e3261cc6c88bbf901cd1adac26ec6b2f978b/minidlna-1.2.1-cover-resize.patch
--2021-11-04 22:17:25--  https://gist.github.com/grigorye/d30bbed518226e44a18eec75f6f6159e/raw/78a5e3261cc6c88bbf901cd1adac26ec6b2f978b/minidlna-1.2.1-cover-resize.patch
Resolving gist.github.com (gist.github.com)... 52.78.231.108
Connecting to gist.github.com (gist.github.com)|52.78.231.108|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://gist.githubusercontent.com/grigorye/d30bbed518226e44a18eec75f6f6159e/raw/78a5e3261cc6c88bbf901cd1adac26ec6b2f978b/minidlna-1.2.1-cover-resize.patch [following]
--2021-11-04 22:17:25--  https://gist.githubusercontent.com/grigorye/d30bbed518226e44a18eec75f6f6159e/raw/78a5e3261cc6c88bbf901cd1adac26ec6b2f978b/minidlna-1.2.1-cover-resize.patch
Resolving gist.githubusercontent.com (gist.githubusercontent.com)... 185.199.109.133, 185.199.111.133, 185.199.108.133, ...
Connecting to gist.githubusercontent.com (gist.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4187 (4.1K) [text/plain]
Saving to: ‘minidlna-1.2.1-cover-resize.patch’

minidlna-1.2.1-cover-resize. 100%[==============================================>]   4.09K  --.-KB/s    in 0.001s

2021-11-04 22:17:25 (3.98 MB/s) - ‘minidlna-1.2.1-cover-resize.patch’ saved [4187/4187]

# 패치를 해줍니다.
root@CoreELEC:~/minidlna-1.3.0# patch -p1 < minidlna-1.2.1-cover-resize.patch
patching file albumart.c
patching file minidlna.c
Hunk #1 succeeded at 589 (offset 51 lines).
Hunk #2 succeeded at 814 with fuzz 2 (offset 61 lines).
patching file minidlnatypes.h
patching file options.c
Hunk #1 succeeded at 65 with fuzz 1.
patching file options.h
Hunk #1 succeeded at 58 with fuzz 1.
# 컴파일을 진행합니다.
root@CoreELEC:~/minidlna-1.3.0# ./configure --prefix=/usr
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk

# 컴파일을 진행합니다.
root@CoreELEC:~/minidlna-1.3.0# make
make  all-recursive
make[1]: Entering directory '/root/minidlna-1.3.0'
Making all in po
make[2]: Entering directory '/root/minidlna-1.3.0/po'
test ! -f ./minidlna.pot || \
  test -z "da.gmo de.gmo es.gmo fr.gmo it.gmo ja.gmo ko.gmo nb.gmo nl.gmo pl.gmo ru.gmo sl.gmo sv.gmo" || make da.gmo de.gmo es.gmo fr.gmo it.gmo ja.gmo ko.gmo nb.gmo nl.gmo pl.gmo ru.gmo sl.gmo sv.gmo
make[3]: Entering directory '/root/minidlna-1.3.0/po'
rm -f da.gmo && /usr/bin/msgfmt -c --statistics --verbose -o da.gmo da.po
da.po: 23 translated messages.
rm -f de.gmo && /usr/bin/msgfmt -c --statistics --verbose -o de.gmo de.po
de.po: 23 translated messages.
rm -f es.gmo && /usr/bin/msgfmt -c --statistics --verbose -o es.gmo es.po
es.po: 23 translated messages.
rm -f fr.gmo && /usr/bin/msgfmt -c --statistics --verbose -o fr.gmo fr.po
fr.po: 23 translated messages.

# 설치합니다.
root@CoreELEC:~/minidlna-1.3.0# make install
Making install in po
make[1]: Entering directory '/root/minidlna-1.3.0/po'
installing da.gmo as /usr/share/locale/da/LC_MESSAGES/minidlna.mo
installing de.gmo as /usr/share/locale/de/LC_MESSAGES/minidlna.mo
installing es.gmo as /usr/share/locale/es/LC_MESSAGES/minidlna.mo
installing fr.gmo as /usr/share/locale/fr/LC_MESSAGES/minidlna.mo
installing it.gmo as /usr/share/locale/it/LC_MESSAGES/minidlna.mo
installing ja.gmo as /usr/share/locale/ja/LC_MESSAGES/minidlna.mo
installing ko.gmo as /usr/share/locale/ko/LC_MESSAGES/minidlna.mo
installing nb.gmo as /usr/share/locale/nb/LC_MESSAGES/minidlna.mo
installing nl.gmo as /usr/share/locale/nl/LC_MESSAGES/minidlna.mo
installing pl.gmo as /usr/share/locale/pl/LC_MESSAGES/minidlna.mo
installing ru.gmo as /usr/share/locale/ru/LC_MESSAGES/minidlna.mo
installing sl.gmo as /usr/share/locale/sl/LC_MESSAGES/minidlna.mo
installing sv.gmo as /usr/share/locale/sv/LC_MESSAGES/minidlna.mo
if test "minidlna" = "gettext-tools"; then \
  /bin/mkdir -p /usr/share/gettext/po; \
  for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot   Makevars.template; do \
    /usr/bin/install -c -m 644 ./$file \
                    /usr/share/gettext/po/$file; \
  done; \
  for file in Makevars; do \
    rm -f /usr/share/gettext/po/$file; \
  done; \
else \
  : ; \
fi
make[1]: Leaving directory '/root/minidlna-1.3.0/po'
make[1]: Entering directory '/root/minidlna-1.3.0'
make[2]: Entering directory '/root/minidlna-1.3.0'
 /bin/mkdir -p '/usr/sbin'
  /usr/bin/install -c minidlnad '/usr/sbin'
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/root/minidlna-1.3.0'
make[1]: Leaving directory '/root/minidlna-1.3.0'

4. 버전 확인 및 실행

# 서비스를 정지합니다.
root@CoreELEC:~/minidlna-1.3.0# systemctl stop minidlna

# 버전을 확인합니다.
root@CoreELEC:~/minidlna-1.3.0# minidlnad -V
Version 1.3.0

# 다시 실행합니다.
root@CoreELEC:~/minidlna-1.3.0# systemctl start minidlna
root@CoreELEC:~/minidlna-1.3.0# systemctl status minidlna
● minidlna.service - LSB: minidlna server
   Loaded: loaded (/etc/init.d/minidlna; generated)
   Active: active (running) since Thu 2021-11-04 22:26:42 KST; 4s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 18502 ExecStart=/etc/init.d/minidlna start (code=exited, status=0/SUCCESS)
    Tasks: 2 (limit: 592)
   CGroup: /system.slice/docker-a6b34490aebd5c33c639c623bb86e3f93de47541ad9813fab8f30b7abc029abe.scope/system.slice/
minidlna.service
           └─18512 /usr/sbin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/minidlna.pid -r

Nov 04 22:26:42 CoreELEC systemd[1]: Starting LSB: minidlna server...
Nov 04 22:26:42 CoreELEC systemd[1]: Started LSB: minidlna server.

샘플 음악을 넣고 설정합니다.

# 설정합니다.
root@CoreELEC:/storage/music# vi /etc/minidlna.conf

#   * "A" for audio    (eg. media_dir=A,/var/lib/minidlna/music)
#   * "P" for pictures (eg. media_dir=P,/var/lib/minidlna/pictures)
#   * "V" for video    (eg. media_dir=V,/var/lib/minidlna/videos)
#   * "PV" for pictures and video (eg. media_dir=PV,/var/lib/minidlna/digital_camera)
media_dir=/storage/music
resize_covers=no

# set this to yes to allow symlinks that point outside user-defined media_dirs.
wide_links=no

# 재시작합니다.
root@CoreELEC:/storage/music# systemctl restart minidlna
root@CoreELEC:/storage/music# systemctl status minidlna
● minidlna.service - LSB: minidlna server
   Loaded: loaded (/etc/init.d/minidlna; generated)
   Active: active (running) since Thu 2021-11-04 22:29:03 KST; 3s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 18549 ExecStop=/etc/init.d/minidlna stop (code=exited, status=0/SUCCESS)
  Process: 18556 ExecStart=/etc/init.d/minidlna start (code=exited, status=0/SUCCESS)
    Tasks: 2 (limit: 592)
   CGroup: /system.slice/docker-a6b34490aebd5c33c639c623bb86e3f93de47541ad9813fab8f30b7abc029abe.scope/system.slice/
minidlna.service
           └─18566 /usr/sbin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/minidlna.pid -r

Nov 04 22:29:03 CoreELEC systemd[1]: Starting LSB: minidlna server...
Nov 04 22:29:03 CoreELEC systemd[1]: Started LSB: minidlna server.

# 음악은 하기와 같습니다.
root@CoreELEC:/storage/music/Kenny G - I'm in the Mood of Love 2006 (2015 Remaster ISO)# ls
"01 - Kenny G - You're Beautiful.dsf"
'02 - Kenny G - The Way We Were.dsf'
'03 - Kenny G - Yesterday.dsf'
"04 - Kenny G - I'm In The Mood For Love.dsf"
'05 - Kenny G - If.dsf'
'06 - Kenny G - The Way You Look Tonight.dsf'
"07 - Kenny G - If I Ain't Got You.dsf"
'08 - Kenny G - Love Theme from Romeo & Juliet.dsf'
'09 - Kenny G - It Had To Be You.dsf'
'10 - Kenny G - The Shadow Of Your Smile.dsf'
'11 - Kenny G - Fly Me To The Moon You Make Me Feel So Young.dsf'
'12 - Kenny G - As Time Goes By.dsf'
'13 - Kenny G - You Raise Me Up.dsf'
'14 - Kenny G - The Moon Represents My Heart.dsf'

BubbleUPNP 로 재생을 시켜 봅니다.

일단 크롬캐스트가 연결이 되지 않아서 제 폰으로 스트리밍을 해보았습니다.

 

미디어 리스트에 MiniDLNA 를 선택합니다.

휴대폰에서 DSD 재생이 지원되지 않아서 직접 FFMPEG가 돌고 있습니다.

이게 MiniDLNA 에서 도는것인지는 확인해봐야겠습니다.

--> 휴대폰에서 변환하여 재생이 되네요.

 

앨범아트 128x128 로 제한되는 문제 해결 및 DSD 정상 지원됩니다.

 

 

감사합니다. 간단하게 마치겠습니다.

반응형