Windows (Cygwin)에서도 mpd + ncmpcpp를 사용하고 싶습니다.
Cygwin Ports
htp://cyguponpo rts. rg/에서 설치할 수 있습니다. 또한 h tp // w w. 무시 cpd. 오 rg / 도w 응아 d. HTML에서 Windows 용 (Cygwin 독립적) 빌드 된 mpd를 다운로드 할 수 있습니다.환경
Windows 8.1 64비트
Cygwin 1.7.35 64-bit
mpd 0.19.9
MPD
필요한 패키지 설치
cyg-fast로 패키지를 설치합니다. cyg-fast의 경우
ぃ tp // 코 m / d9 마가이 @ 기 b / ms / f867393b7c257135 에 70
참조하십시오.
$cyg-fast -m ftp://ftp.iij.ad.jp/pub/cygwin/ update
$cyg-fast install gcc-core gcc-g++ make libboost-devel doxygen cygrunsrv libsqlite3-devel autoconf automake pkg-config libglib2.0-devel zlib-devel libiconv flac flac-devel libogg libvorbis libvorbis-devel libao-devel libao4 libao libcurl-devel curl libopus-devel libsndfile libsndfile-devel
일단 이것만으로 빌드를 할 수 있습니다만, flac나 DSD 정도밖에 들을 수 없습니다. mp3나 aac에 대응시키고 싶기 때문에 기능을 추가해 갑니다. 사용 용도에 따라 추가합니다.
mpd의 설치를 간결하게 하기 위해서 패키지는 모두 -prefix=/usr
로 하고 있습니다./usr/local/
에 설치한 경우 mpd configure를 실행할 때 다음과 같이 환경 변수를 설정합니다.
libid3tagの場合
$ ID3TAG_CFLAGS=-I/usr/local/include ID3TAG_LIBS="-L/usr/local/lib -lid3tag" ./configure
libmpdclient
ncmpcpp에서도 사용하므로 넣어 둡시다.
$ mkdir -p /tmp/mpd
$ cd !$
$ wget http://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.9.tar.xz
$ tar Jxf libmpdclient-2.9.tar.xz
$ cd libmpdclient-2.9
$ ./configure --prefix=/usr
libid3tag
ID3 태그를 로드하는 데 사용
mkdir -p /tmp/mpd
cd !$
wget 'http://sourceforge.net/projects/mad/files/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz'
tar -xzvf libid3tag-*.tar.gz
cd libid3tag-*
./configure --prefix=/usr
make && make install
errorconfigure: error: cannot guess build type; you must specify one
64bit에서 ./configure를 실행할 때이 오류가 발생하면./configure --prefix=/usr --build=x86_64-unknow-cygwin
에서 실행해보십시오.
libmad
MAD (MPEG Audio Decoder), MP3 재생에 사용
mkdir -p /tmp/mpd
cd !$
wget 'http://sourceforge.net/projects/mad/files/libmad/0.15.1b/libmad-0.15.1b.tar.gz'
tar -xzvf libmad-0.15.1b.tar.gz
cd libmad-0.15.1b
./configure --prefix=/usr
errorgcc: error: unrecognized command line option '-fforce-mem'
make 때 어쩌면이 오류가 발생합니다. 이 gcc 옵션은 사용되지 않는 것 같습니다.vi
등으로 Makefile의 CFLAGS에서 -fforce-mem
make && make install
LAME
MP3 인코더입니다.
mkdir -p /tmp/mpd
cd !$
wget 'http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.5.tar.gz'
tar -xzvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --prefix=/usr
이쪽도 make시 에러가 나옵니다.
errorlametime.c:139:25: エラー: ‘_O_BINARY’ が宣言されていません (この関数内での最初の使用)
setmode(fileno(fp), _O_BINARY);
frontend에서 lametime.c를 수정하십시오. 138행 당
lametime.c#elif defined __CYGWIN__
//setmode(fileno(fp), _O_BINARY);
setmode(fileno(fp), O_BINARY); // _を消します
make && make install
mpg123
MP3 재생용. MAD 대신에 사용할 수 있습니다.
mkdir -p /tmp/mpd
cd !$
wget 'http://sourceforge.net/projects/mpg123/files/mpg123/1.22.0/mpg123-1.22.0.tar.bz2'
tar jxf mpg123-1.22.0.tar.bz2
cd mpg123-1.22.0
./configure --prefix=/usr
make && make install
FAAD2
aac(.m4a) 재생에 사용합니다.
mkdir -p /tmp/mpd
cd !$
wget 'http://sourceforge.net/projects/faac/files/faad2-src/faad2-2.7/faad2-2.7.tar.bz2'
tar jxf faad2-2.7.tar.bz2
cd faad2-2.7
./configure --prefix=/usr
make && make install
Audio File Library
AIFF 및 WAVE 재생용
$ cyg-fast install audiofile libaudiofile-devel
또는,
$ mkdir -p /tmp/mpd
$ cd !$
$ wget 'http://audiofile.68k.org/audiofile-0.3.6.tar.gz'
$ tar -xzvf audiofile-0.3.6.tar.gz
$ cd audiofile-0.3.6
$ ./configure --prefix=/usr
$ make && make install
FFMPEG
htp : / / fm㎺g. 제발. 코 m/부이 lds/에서 [Shared]와 [Dev]를 다운로드하고 압축을 풉니 다.
$ mkdir -p /usr/local/ffmpeg
여기에 Dev의 모든 내용과 공유 bin을 넣으십시오.
.
├── bin
├── doc
├── include
├── lib
├── licenses
└── README.txt
pkgconfig를 추가합니다.
$ vi /lib/pkgconfig/ffmpeg.pc
ffmpeg.pc# Package Information for pkg-config
prefix=/usr/local/ffmpeg
exec_prefix=${prefix}
libdir=
includedir=${prefix}/include
Name: ffmpeg
Description: Open Source Computer Vision Library
Version: 2.4.9
Libs: ${exec_prefix}/lib/libavcodec.dll.a ${exec_prefix}/lib/libavdevice.dll.a ${exec_prefix}/lib/libavfilter.dll.a ${exec_prefix}/lib/libavformat.dll.a ${exec_prefix}/lib/libavutil.dll.a ${exec_prefix}/lib/libpostproc.dll.a ${exec_prefix}/lib/libswresample.dll.a ${exec_prefix}/lib/libswscale.dll.a -lm -ldl -lrt
Cflags: -I${includedir}
확인
$ vi ffmpeg.c
ffmpeg.c#include <libavcodec/avcodec.h>
int main() {
av_register_all();
return 0;
}
$ gcc ffmpeg.c -o ffmpeg `pkg-config --cflags --libs ffmpeg`
$ ls ffmpeg.*
~/.bashrc 또는 ~/.zshrc
.bashrcexport PATH=$PATH:/usr/local/ffmpeg/bin
추가, 경로를 통해
$ source ~/.bashrc
$ ffmpeg -version
기타 패키지
fluidsynth, AdPlug, GME(Game Music Emu), ModPlug, WavPack 등이 있습니다.
mpd ./configure --help
에서 확인하십시오.
MPD 설치
$ mkdir -p /tmp/mpd
$ cd !$
$ wget http://www.musicpd.org/download/mpd/0.19/mpd-0.19.9.tar.xz
$ tar xvf mpd-0.19.9.tar.xz
$ cd mpd-0.19.9
$ ./configure
ffmpegをいれた場合
$ FFMPEG_CFLAGS=`pkg-config --cflags ffmpeg` FFMPEG_LIBS=`pkg-config --libs ffmpeg` ./configure
추가한 기능이 +로 되어 있는지 확인
########### MPD CONFIGURATION ############
Archive support:
(-bzip2) (-ISO9660) (-ZIP)
Client support:
(+IPv6) (+TCP) (+UNIX Domain Sockets)
Storage support:
(-NFS) (-SMB)
File format support:
(+AAC) (-AdPlug) (+DSD) (-C64 SID) (+FFMPEG) (+FLAC) (-FluidSynth) (-GME)
(+libsndfile) (-MikMod) (-MODPLUG) (+MAD) (+MPG123) (-Musepack)
(+Opus) (-OggTremor) (+OggVorbis) (+WAVE) (-WavPack) (-WildMidi)
Other features:
(-libsamplerate) (-libsoxr) (+libmpdclient) (-inotify) (+SQLite)
Metadata support:
(+ID3)
Playback support:
(-ALSA) (+FIFO) (+File Recorder) (+HTTP Daemon) (-JACK)
(+libao) (+OSS) (-OpenAL) (-OS X) (-Pipeline)
(-PulseAudio) (-ROAR) (-SHOUTcast) (-Solaris) (-WinMM)
Streaming encoder support:
(+FLAC) (+LAME) (-Shine) (+Ogg Vorbis) (+Opus) (-TwoLAME) (+WAVE)
Streaming support:
(-CDIO_PARANOIA) (+CURL) (-SMBCLIENT) (-Soundcloud)
(-MMS)
Event loop:
poll
make && make install
make 중간 오류가 발생하면
errorsrc/system/SocketUtil.cxx:79:29: エラー: ‘SO_PASSCRED’ was not declared in this scope
setsockopt(fd, SOL_SOCKET, SO_PASSCRED,
^
$ ./configure --disable-un
또는 코드를 수정합니다.
$ vi src/system/SocketUtil.cxx
SocketUtil.cxx//56行目あたり
#ifdef HAVE_STRUCT_UCRED
//setsockopt(fd, SOL_SOCKET, SO_PASSCRED,
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
(const char *) &reuse, sizeof(reuse));
#endif
MPD 설정
$ mkdir -p ~/.mpd
$ mkdir -p ~/.mpd/playlists
$ cp /usr/local/share/doc/mpd/mpdconf.example ~/.mpd/mpd.conf
$ vi ~/.mpd/mpd.conf
코멘트 아웃을 끊습니다.
mpd.confmusic_directory "~/music"
db_file "~/.mpd/database"
playlist_directory "~/.mpd/playlists"
log_file "~/.mpd/log"
audio_output {
type "oss"
name "My OSS Device"
format "44100:16:2"
device "/dev/dsp" # optional
mixer_type "software" # optional
mixer_control "PCM" # optional
}
filesystem_charset "UTF-8"
id3v1_encoding "UTF-8"
동작 확인
$ mpd --verbose --no-daemon --stdout
ncmpcpp
필요한 패키지 설치
$ cyg-fast install libfftw3-devel fftw3 ncurses ncursesw libncurses-devel libncursesw-devel libreadline-devel
ncmpcpp 설치
$ mkdir -p /tmp/ncmpcpp
$ cd !$
$ wget http://ncmpcpp.rybczak.net/stable/ncmpcpp-0.6.3.tar.bz2
$ tar xvf ncmpcpp-0.6.3.tar.bz2
$ cd ncmpcpp-0.6.3
$ BOOST_LIB_SUFFIX="" ./configure --enable-visualizer --enable-clock --enable-unicode --enable-outputs --with-curl --with-fftw
$ make
errorstatus.cpp:131:71: エラー: ‘setsockopt’ was not declared in this scope
setsockopt(Mpd.GetFD(), IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(flag));
^
$ vi src/status.cpp
status.cpp//追加
#include <sys/types.h>
#include <sys/socket.h>
$ vi src/Makefile
Makefile# -lreadline を追加
LDFLAGS = -lboost_filesystem -lboost_system -lboost_locale -lboost_program_options -lboost_regex -lboost_thread -lmpdclient -lpthread -lncursesw -lfftw3 -lm -lcurl -lreadline
make && make install
ncmpcpp 설정
$ mkdir -p ~/.ncmpcpp
$ cp /usr/local/share/doc/ncmpcpp/config ~/.ncmpcpp/
$ vi ~/.ncmpcpp/config
코멘트 아웃을 끊습니다.
~/.ncmpcpp/configmpd_host = localhost
mpd_port = 6600
$ mpd && ncmpcpp
ncmpcpp 테마 등
h tp : /// t 멋. t / 카테고 ry / mpd / n cmpc p /
이쪽을 참고로
Reference
이 문제에 관하여(Windows (Cygwin)에서도 mpd + ncmpcpp를 사용하고 싶습니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/fabiiw05/items/7687348a410897eca2bc
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
$cyg-fast -m ftp://ftp.iij.ad.jp/pub/cygwin/ update
$cyg-fast install gcc-core gcc-g++ make libboost-devel doxygen cygrunsrv libsqlite3-devel autoconf automake pkg-config libglib2.0-devel zlib-devel libiconv flac flac-devel libogg libvorbis libvorbis-devel libao-devel libao4 libao libcurl-devel curl libopus-devel libsndfile libsndfile-devel
libid3tagの場合
$ ID3TAG_CFLAGS=-I/usr/local/include ID3TAG_LIBS="-L/usr/local/lib -lid3tag" ./configure
$ mkdir -p /tmp/mpd
$ cd !$
$ wget http://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.9.tar.xz
$ tar Jxf libmpdclient-2.9.tar.xz
$ cd libmpdclient-2.9
$ ./configure --prefix=/usr
mkdir -p /tmp/mpd
cd !$
wget 'http://sourceforge.net/projects/mad/files/libid3tag/0.15.1b/libid3tag-0.15.1b.tar.gz'
tar -xzvf libid3tag-*.tar.gz
cd libid3tag-*
./configure --prefix=/usr
make && make install
configure: error: cannot guess build type; you must specify one
mkdir -p /tmp/mpd
cd !$
wget 'http://sourceforge.net/projects/mad/files/libmad/0.15.1b/libmad-0.15.1b.tar.gz'
tar -xzvf libmad-0.15.1b.tar.gz
cd libmad-0.15.1b
./configure --prefix=/usr
gcc: error: unrecognized command line option '-fforce-mem'
mkdir -p /tmp/mpd
cd !$
wget 'http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.5.tar.gz'
tar -xzvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --prefix=/usr
lametime.c:139:25: エラー: ‘_O_BINARY’ が宣言されていません (この関数内での最初の使用)
setmode(fileno(fp), _O_BINARY);
#elif defined __CYGWIN__
//setmode(fileno(fp), _O_BINARY);
setmode(fileno(fp), O_BINARY); // _を消します
mkdir -p /tmp/mpd
cd !$
wget 'http://sourceforge.net/projects/mpg123/files/mpg123/1.22.0/mpg123-1.22.0.tar.bz2'
tar jxf mpg123-1.22.0.tar.bz2
cd mpg123-1.22.0
./configure --prefix=/usr
make && make install
mkdir -p /tmp/mpd
cd !$
wget 'http://sourceforge.net/projects/faac/files/faad2-src/faad2-2.7/faad2-2.7.tar.bz2'
tar jxf faad2-2.7.tar.bz2
cd faad2-2.7
./configure --prefix=/usr
make && make install
$ cyg-fast install audiofile libaudiofile-devel
$ mkdir -p /tmp/mpd
$ cd !$
$ wget 'http://audiofile.68k.org/audiofile-0.3.6.tar.gz'
$ tar -xzvf audiofile-0.3.6.tar.gz
$ cd audiofile-0.3.6
$ ./configure --prefix=/usr
$ make && make install
$ mkdir -p /usr/local/ffmpeg
.
├── bin
├── doc
├── include
├── lib
├── licenses
└── README.txt
$ vi /lib/pkgconfig/ffmpeg.pc
# Package Information for pkg-config
prefix=/usr/local/ffmpeg
exec_prefix=${prefix}
libdir=
includedir=${prefix}/include
Name: ffmpeg
Description: Open Source Computer Vision Library
Version: 2.4.9
Libs: ${exec_prefix}/lib/libavcodec.dll.a ${exec_prefix}/lib/libavdevice.dll.a ${exec_prefix}/lib/libavfilter.dll.a ${exec_prefix}/lib/libavformat.dll.a ${exec_prefix}/lib/libavutil.dll.a ${exec_prefix}/lib/libpostproc.dll.a ${exec_prefix}/lib/libswresample.dll.a ${exec_prefix}/lib/libswscale.dll.a -lm -ldl -lrt
Cflags: -I${includedir}
$ vi ffmpeg.c
#include <libavcodec/avcodec.h>
int main() {
av_register_all();
return 0;
}
$ gcc ffmpeg.c -o ffmpeg `pkg-config --cflags --libs ffmpeg`
$ ls ffmpeg.*
export PATH=$PATH:/usr/local/ffmpeg/bin
$ source ~/.bashrc
$ ffmpeg -version
$ mkdir -p /tmp/mpd
$ cd !$
$ wget http://www.musicpd.org/download/mpd/0.19/mpd-0.19.9.tar.xz
$ tar xvf mpd-0.19.9.tar.xz
$ cd mpd-0.19.9
$ ./configure
ffmpegをいれた場合
$ FFMPEG_CFLAGS=`pkg-config --cflags ffmpeg` FFMPEG_LIBS=`pkg-config --libs ffmpeg` ./configure
########### MPD CONFIGURATION ############
Archive support:
(-bzip2) (-ISO9660) (-ZIP)
Client support:
(+IPv6) (+TCP) (+UNIX Domain Sockets)
Storage support:
(-NFS) (-SMB)
File format support:
(+AAC) (-AdPlug) (+DSD) (-C64 SID) (+FFMPEG) (+FLAC) (-FluidSynth) (-GME)
(+libsndfile) (-MikMod) (-MODPLUG) (+MAD) (+MPG123) (-Musepack)
(+Opus) (-OggTremor) (+OggVorbis) (+WAVE) (-WavPack) (-WildMidi)
Other features:
(-libsamplerate) (-libsoxr) (+libmpdclient) (-inotify) (+SQLite)
Metadata support:
(+ID3)
Playback support:
(-ALSA) (+FIFO) (+File Recorder) (+HTTP Daemon) (-JACK)
(+libao) (+OSS) (-OpenAL) (-OS X) (-Pipeline)
(-PulseAudio) (-ROAR) (-SHOUTcast) (-Solaris) (-WinMM)
Streaming encoder support:
(+FLAC) (+LAME) (-Shine) (+Ogg Vorbis) (+Opus) (-TwoLAME) (+WAVE)
Streaming support:
(-CDIO_PARANOIA) (+CURL) (-SMBCLIENT) (-Soundcloud)
(-MMS)
Event loop:
poll
make && make install
src/system/SocketUtil.cxx:79:29: エラー: ‘SO_PASSCRED’ was not declared in this scope
setsockopt(fd, SOL_SOCKET, SO_PASSCRED,
^
$ ./configure --disable-un
$ vi src/system/SocketUtil.cxx
//56行目あたり
#ifdef HAVE_STRUCT_UCRED
//setsockopt(fd, SOL_SOCKET, SO_PASSCRED,
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
(const char *) &reuse, sizeof(reuse));
#endif
$ mkdir -p ~/.mpd
$ mkdir -p ~/.mpd/playlists
$ cp /usr/local/share/doc/mpd/mpdconf.example ~/.mpd/mpd.conf
$ vi ~/.mpd/mpd.conf
music_directory "~/music"
db_file "~/.mpd/database"
playlist_directory "~/.mpd/playlists"
log_file "~/.mpd/log"
audio_output {
type "oss"
name "My OSS Device"
format "44100:16:2"
device "/dev/dsp" # optional
mixer_type "software" # optional
mixer_control "PCM" # optional
}
filesystem_charset "UTF-8"
id3v1_encoding "UTF-8"
$ mpd --verbose --no-daemon --stdout
필요한 패키지 설치
$ cyg-fast install libfftw3-devel fftw3 ncurses ncursesw libncurses-devel libncursesw-devel libreadline-devel
ncmpcpp 설치
$ mkdir -p /tmp/ncmpcpp
$ cd !$
$ wget http://ncmpcpp.rybczak.net/stable/ncmpcpp-0.6.3.tar.bz2
$ tar xvf ncmpcpp-0.6.3.tar.bz2
$ cd ncmpcpp-0.6.3
$ BOOST_LIB_SUFFIX="" ./configure --enable-visualizer --enable-clock --enable-unicode --enable-outputs --with-curl --with-fftw
$ make
error
status.cpp:131:71: エラー: ‘setsockopt’ was not declared in this scope
setsockopt(Mpd.GetFD(), IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(flag));
^
$ vi src/status.cpp
status.cpp
//追加
#include <sys/types.h>
#include <sys/socket.h>
$ vi src/Makefile
Makefile
# -lreadline を追加
LDFLAGS = -lboost_filesystem -lboost_system -lboost_locale -lboost_program_options -lboost_regex -lboost_thread -lmpdclient -lpthread -lncursesw -lfftw3 -lm -lcurl -lreadline
make && make install
ncmpcpp 설정
$ mkdir -p ~/.ncmpcpp
$ cp /usr/local/share/doc/ncmpcpp/config ~/.ncmpcpp/
$ vi ~/.ncmpcpp/config
코멘트 아웃을 끊습니다.
~/.ncmpcpp/config
mpd_host = localhost
mpd_port = 6600
$ mpd && ncmpcpp
ncmpcpp 테마 등
h tp : /// t 멋. t / 카테고 ry / mpd / n cmpc p /
이쪽을 참고로
Reference
이 문제에 관하여(Windows (Cygwin)에서도 mpd + ncmpcpp를 사용하고 싶습니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/fabiiw05/items/7687348a410897eca2bc텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)