Mac OS X 명령어 기반의 ogg -> mp3 변환기

superwtk의 이미지

제 블로그에 있는 글을 옮긴것입니다. Mac OS X 에서 작성한 스크립트이지만, 리눅스에서도 작동할 것이라고 믿습니다. bash 쉘을 사용했고 vorbis-tools 와 lame 은 오픈소스 프로젝트이므로-_-a

먼저, vorbis-toolslame 을 설치합니다.

sudo port install vorbis-tools lame

ogg 파일을 wav 로 변환한 다음 변환된 wav 파일을 다시 mp3 형식으로 변환하는 방식입니다.

oggdec test.ogg
lame -h --vbr-new test.ogg

고정 bitrate 를 사용하고 싶으면 -b 옵션을 사용하면 됩니다. 자세한건 lame --help 를 참조하십시오. 한꺼번에 여러 파일을 처리하기 위해 간단한 쉘 스크립트를 만들어줍니다.

#/bin/bash
 
for file in *.ogg; do
    oggdec $file
    file=$(basename $file .ogg)
    lame -h --vbr-new -V 2 "${file}.wav" "${file}.mp3"
    rm "${file}.wav"
done

가변 bitrate 의 품질을 지정하기 위해 -V 2 옵션을 사용합니다. 0이 가장 높은 품질, 9가 가장 낮은 품질입니다.

실행시의 모습입니다:

File attachments: 
첨부파일 크기
Image icon ogg_to_mp3.png50.13 KB
Forums: 
inniskun의 이미지

마침 검색했다가 발견해서 바로 활용 했습니다 :)

눈에 보이는 모든것은 보이지 않는 것들로 이루워져 있다.
Nobody reachs the Truth~*

눈에 보이는 모든것은 보이지 않는 것들로 이루워져 있다.
Nobody reachs the Truth~*

hiboss1의 이미지

맥을 사용하고 있는데.. 가끔식 ogg파일도 된 것이 있어서 어떻게 변환을 하지 생각을 했는데
좋은 정보 감사합니다.

제 블로그에 좀 올려도 될까요?

-------------------------------------------------------
초심으로 가자.
그 초심은 어디에?
-----------------------------------------------------

-------------------------------------------------------
초심으로 가자.
그 초심은 어디에?
hiboss1@gmail.com
-----------------------------------------------------

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.