OpenWrt 및 교재 Q&A

안드로이드 녹음파일을 openwrt에서 재생하는것 관련

페이지 정보

작성자 신광호 작성일18-01-24 14:38 조회1,825회 댓글2건

본문

먼저 안드로이드에서 녹음으로 생성되는 파일 형식은 3gp amr, mp4 가 있습니다.
약5초정도의 이 녹음된 파일을 공유기에서 재생시켜보고싶은데요..

어떠한  패키지를 설치하면 가능할까요..

안드로이드에서 자체적으로 파일변환하는방법은 일단 복잡해서 시간관계상 보류하고,
공유기에서 반대로 파일 변환은 5초가량의 음성데이터를 전송하는데 오히려 파일변환시간이 20초가 넘어가버려서 효율성이 없고.. 있는 그대로 저 3gp amr,mp4등의 파일 형식을 재생시켜주는 라이브러리나 그런 패키지가 있는지가 궁금하네요...ㅠ

//---------
추가질문
현재 안드로이드내에서 amr파일에다가 패킷헤더를 붙여서 wav형식으로 헤더를 수정하여 wav파일로 만들었는데요, wav파일을 재생할수 있는 openwrt에서 제공하는 패키지는 없을까요?

검색결과 aplay라는 명령어를 이용하여 wav파일을 재생하는걸 보았는데 도무지 aplay를 수행하기위해서 어떤 패키지를 설치하여야하는지 모르겠습니다. 도움 부탁드리겠습니다..ㅠㅠ

// 관리자 2018-01-24: 12-01-03 19:32 에 작성된 글입니다

댓글목록

박우재님의 댓글

박우재 작성일

안녕하세요.

제가 오디오 코덱은 한번도 경험이 없는데요. 재생을 시켜주는 것도 결국 디코딩을 한번 거쳐야 재생이 되는거 아닌가요? USB Audio로 넘긴다면 코덱이 USB 디바이스에 있으면 될것 같기도 하군요. 하지만 아니라면 모든 가능성을 직접 테스트 해보셔야 할것 같습니다.

Aplay는 Alsa 패키지에 들어 있을것 같습니다. Alsa-utils 를 한번 설치해 보시기 바랍니다.

Wav는 Aplay나 다른 대부분의 패키지에서 플레이를 제공할것 같습니다.

현재 Openwrt 10.03 rc5 에서 제공하는 사운드 플레이 관련 패키지 리스트 입니다. 제공되는 파일형식은 직접 패키지에 의존성이 걸려 있는 라이브러리를 통해 간접적으로 확인할 수 있습니다.


Package: madplay
Version: 0.15.2b-3
Depends: libid3tag, libmad
Provides:
Status: unknown ok not-installed
Section: sound
Architecture: ar71xx
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: 0b135e255bd26af4fce516f5aa31b80f
Size: 29270
Filename: madplay_0.15.2b-3_ar71xx.ipk
Source: feeds/packages/sound/madplay
Description: MAD is an MPEG audio decoder. It currently only supports the MPEG 1
 standard, but fully implements all three audio layers (Layer I, Layer II,
 and Layer III, the latter often colloquially known as MP3.). There is also
 full support for ID3 tags.


Package: moc
Version: 2.4.4-1
Depends: libcurl, libmad, libvorbis, alsa-utils, libid3tag, libflac, libsamplerate, libncursesw, libffmpeg
Provides:
Status: unknown ok not-installed
Section: sound
Architecture: ar71xx
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: 7a82222530cc3e717b6d9af3daa13acd
Size: 110224
Filename: moc_2.4.4-1_ar71xx.ipk
Source: feeds/packages/sound/mocp
Description: MOC (music on console) is a console audio player for LINUX/UNIX designed to be powerful and easy to use.



Package: mpc
Version: 0.20-1
Depends: libmpdclient
Provides:
Status: unknown ok not-installed
Section: sound
Architecture: ar71xx
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: 9cbb51628eafee6a2dc1c707ba36efff
Size: 16873
Filename: mpc_0.20-1_ar71xx.ipk
Source: feeds/packages/sound/mpc
Description: MPD is a music player supporting flac, mp3 and ogg files.
 It is typically controlled over a network using one of it's many
 clients including mpc(console), gmpc(gnome), phpmp(php) etc.
 this is MPC


Package: kissdx
Version: 0.14.0.b1a-9
Depends: libjpeg, libdvdread
Provides:
Status: unknown ok not-installed
Section: multimedia
Architecture: ar71xx
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: b3c6593e9ea3e4e2d800737e12eb1c91
Size: 67520
Filename: kissdx_0.14.0.b1a-9_ar71xx.ipk
Source: feeds/packages/multimedia/kissdx
Description: kissdx is a PC-Link clone for KiSS media players, based for
 the most part on kissd (which it now replaces), with added
 features for media playback, management, flexibility and more.

Package: cmus
Version: 2.4.0-1
Depends: libpthread, librt, libncurses, alsa-lib, libmad, libvorbisidec, libflac
Provides:
Status: unknown ok not-installed
Section: sound
Architecture: ar71xx
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: 5b81b4299faa217839d0db7dcaa19786
Size: 131890
Filename: cmus_2.4.0-1_ar71xx.ipk
Source: feeds/packages/sound/cmus
Description: C* Music Player is a modular and very configurable ncurses-based
 audio player. It has some interesting features like configurable
 colorscheme, mp3 and ogg streaming, it can be controlled with an
 UNIX socket, filters, album/artists sorting and a vi-like
 configuration interface.

Package: empcd
Version: 2008.02.16-1
Provides:
Status: unknown ok not-installed
Section: sound
Architecture: ar71xx
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: 5bf9930dfa3f470ff47a0564e0562d8e
Size: 19948
Filename: empcd_2008.02.16-1_ar71xx.ipk
Source: feeds/packages/sound/empcd
Description: This is EMPCd which can use /dev/input/event0 or other event devices
 to control MPD (Music Player Daemon), directly using libmpdclient
 and other programs, currently using system(2).


Package: mpd-full
Version: 0.16.5-2
Depends: glib2, libcurl, libpthread, libflac, libmad, libvorbisidec, alsa-lib, libaudiofile, libfaad2, libffmpeg, libid3tag, libmms, libogg, libshout, libsndfile, libvorbis
Provides: mpd
Status: unknown ok not-installed
Section: sound
Architecture: ar71xx
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: b7e0a98975e43ca33520faa6e701f35f
Size: 124055
Filename: mpd-full_0.16.5-2_ar71xx.ipk
Source: feeds/packages/sound/mpd
Description: Music Player Daemon (MPD) is a flexible, powerful, server-side
 application for playing music. It is typically controlled over a
 network using one of it's many clients including mpc (console),
 gmpc (gnome), phpmp (php), etc...
 .
 This package contains a full-blown Music Player Daemon.


Package: sox
Version: 14.0.1-3
Depends: lame-lib, libmad, libid3tag, libvorbis, libvorbisidec, libgsm
Provides:
Status: unknown ok not-installed
Section: sound
Architecture: ar71xx
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: 9b03f2d621897e904a8bd2a968a1f114
Size: 188688
Filename: sox_14.0.1-3_ar71xx.ipk
Source: feeds/packages/sound/sox
Description: SoX is a command line utility that can convert various formats
 of computer audio files in to other formats. It can also apply
 various effects to these sound files during the conversion.
 As an added bonus, SoX can play and record audio files on
 several unix-style platforms.

Package: ffserver
Version: 0.8.7-1
Depends: libpthread, libffmpeg
Provides:
Status: unknown ok not-installed
Section: multimedia
Architecture: ar71xx
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: 1ef6fb34ecc1b3444451872745816610
Size: 38845
Filename: ffserver_0.8.7-1_ar71xx.ipk
Source: feeds/packages/multimedia/ffmpeg
Description: FFmpeg is a a software package that can record, convert and stream digital
 audio and video in numerous formats.
 .
 This package contains the FFmpeg streaming server.

Package: faad2
Version: 2.7-1
Depends: libfaad2
Provides:
Status: unknown ok not-installed
Section: sound
Architecture: ar71xx
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: e3b7e612e9bc0a222d70720023fe3ca6
Size: 22480
Filename: faad2_2.7-1_ar71xx.ipk
Source: feeds/packages/libs/faad2
Description: FAAD2 is the fastest ISO AAC audio decoder available.
 FAAD2 correctly decodes all MPEG-4 and MPEG-2 MAIN,
 LOW, LTP, LD and ER object type AAC files.
 This package contains a binary to play AAC or MP4 files.


Package: darkice
Version: 1.0-4
Depends: lame, libpthread, libstdcpp
Provides:
Status: unknown ok not-installed
Section: multimedia
Architecture: ar71xx
Maintainer: Artur Wronowski <arteqw@gmail.com>
MD5Sum: cfdd6d1a300c90b3399e8c6847f7327c
Size: 70073
Filename: darkice_1.0-4_ar71xx.ipk
Source: feeds/packages/multimedia/darkice
Description: DarkIce is a live audio streamer. It records audio from an audio interface (e.g. sound card), encodes it and sends it to a streaming server.

// 관리자 2018-01-24: 12-01-04 20:19에 작성된 글입니다

신광호님의 댓글

신광호 작성일

현재 lame 을 통해서 3-4초 분량의 wav파일을 mp3로 인코딩하는 시간이 1분정도 걸려서 옵션을 통해 줄이는 방법을 연구중이였는데 faad2 패키지를 설치하여 aplay를 이용하니 wav파일이 단번에 재생되네요
 감사합니다.!

// 관리자 2018-01-24: 12-01-04 21:36 에 작성된 글입니다