2015/09/15

맥의 터미널에서 명령줄로 M4A 포맷을 MP3 포맷으로 변환하는 방법(FFMPEG)

http://kiros33.blog.me/220482879274


Revision History
2015/09/16 10:34:34 - 최초 작성 
  
Reference Page
맥 패키지 관리자 - Homebrew 간단한 소개

맥의 터미널에서 명령줄로 M4A 포맷을 MP3 포맷으로 변환하는 방법(FFMPEG)

우선 FFMPEG가 필요합니다.

이미 맥에 brew가 설치되어 있으므로 'brew install ffmpeg' 명령으로 바로 설치했습니다.

$ brew install ffmpeg
==> Installing dependencies for ffmpeg: x264, lame, libvo-aacenc, xvid
==> Installing ffmpeg dependency: x264
==> Downloading https://homebrew.bintray.com/bottles/x264-r2533.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring x264-r2533.yosemite.bottle.tar.gz
�  /usr/local/Cellar/x264/r2533: 9 files, 3.4M
==> Installing ffmpeg dependency: lame
==> Downloading https://homebrew.bintray.com/bottles/lame-3.99.5.yosemite.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring lame-3.99.5.yosemite.bottle.1.tar.gz
�  /usr/local/Cellar/lame/3.99.5: 25 files, 2.1M
==> Installing ffmpeg dependency: libvo-aacenc
==> Downloading https://homebrew.bintray.com/bottles/libvo-aacenc-0.1.3.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring libvo-aacenc-0.1.3.yosemite.bottle.tar.gz
�  /usr/local/Cellar/libvo-aacenc/0.1.3: 15 files, 336K
==> Installing ffmpeg dependency: xvid
==> Downloading https://homebrew.bintray.com/bottles/xvid-1.3.3.yosemite.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring xvid-1.3.3.yosemite.bottle.2.tar.gz
�  /usr/local/Cellar/xvid/1.3.3: 9 files, 1.3M
==> Installing ffmpeg
==> Downloading https://homebrew.bintray.com/bottles/ffmpeg-2.6.2.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring ffmpeg-2.6.2.yosemite.bottle.tar.gz
==> Caveats
FFmpeg has been built without libfaac for licensing reasons;
libvo-aacenc is used by default.
To install with libfaac, you can:
  brew reinstall ffmpeg --with-faac

You can also use the experimental FFmpeg encoder, libfdk-aac, or
libvo_aacenc to encode AAC audio:
  ffmpeg -i input.wav -c:a aac -strict experimental output.m4a
Or:
  brew reinstall ffmpeg --with-fdk-aac
  ffmpeg -i input.wav -c:a libfdk_aac output.m4a
==> Summary
�  /usr/local/Cellar/ffmpeg/2.6.2: 204 files, 42M


그리고 변환하면 됩니다.

$ ffmpeg -i file.m4a -acodec libmp3lame -ab 128k file.mp3
ffmpeg version 2.6.2 Copyright (c) 2000-2015 the FFmpeg developers
  built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-vda
  libavutil      54. 20.100 / 54. 20.100
  libavcodec     56. 26.100 / 56. 26.100
  libavformat    56. 25.101 / 56. 25.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 11.102 /  5. 11.102
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file.m4a':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6mp41
    creation_time   : 2014-02-12 13:45:13
  Duration: 00:04:00.58, start: 0.000000, bitrate: 95 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 93 kb/s (default)
    Metadata:
      creation_time   : 2014-02-12 13:45:13
      handler_name    : SoundHandler
Output #0, mp3, to 'file.mp3':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6mp41
    TSSE            : Lavf56.25.101
    Stream #0:0(und): Audio: mp3 (libmp3lame), 44100 Hz, mono, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2014-02-12 13:45:13
      handler_name    : SoundHandler
      encoder         : Lavc56.26.100 libmp3lame
Stream mapping:
  Stream #0:0 -> #0:0 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
size=    3760kB time=00:04:00.58 bitrate= 128.0kbits/s    
video:0kB audio:3760kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.014416% 


변경 전과 후 파일 정보입니다.
 


검색: Macintosh, 매킨토시, Mac, 맥, OS X, Convert M4A to MP3 using FFMPEG, Terminal, 터미널, Command line, CLI, 명령줄, 명령 줄, Command-line, Brew, 

댓글 없음:

댓글 쓰기