m4b-tool
오디오북 파일을 챕터로 병합, 분할 또는 조작하기 위한 ffmpeg
및 mp4v2
용 래퍼입니다. m4b-tool
m4b 파일을 처리하도록 설계되었지만 mp3, aac, ogg, alac 및 flac와 같은 거의 모든 오디오 형식을 지원해야 합니다.
내 프로젝트를 사용하고 있고 도움이 된다고 생각되면 기부하여 나를 지원해 주세요. 나는 그 돈을 다른 오픈 소스 프로젝트를 지원하거나 자선 목적으로 사용할 계획입니다. 감사합니다!
>= 25.00$
매월 >= 25.00$
을 기부하는 모든 후원자에게 특별히 감사드립니다.
이름 | 양 |
---|---|
누미닛 | 25.00$ |
Nix를 다운로드하고 Flakes가 활성화되어 있는지 확인하세요.
nix run github:sandreas/m4b-tool
또는 nix run github:sandreas/m4b-tool#m4b-tool-libfdk
nix build github:sandreas/m4b-tool
또는 nix build github:sandreas/m4b-tool#m4b-tool-libfdk
./result/bin/m4b-tool
에 있습니다.nix develop
composer2nix --executable --composition=composer.nix
실행하여 .nix 파일을 업데이트합니다. 실험을 시작했는데 이제 초기 알파 수준에 도달하여 시험해 볼 수 있습니다. 명령줄 도구는 완전 오픈 소스인 C#
으로 작성되었으며 tone
이라고 합니다. 이미 꽤 괜찮은 기능 세트가 있으므로 사용해 보고 싶다면 다음을 참조하세요.
https://github.com/sandreas/tone
이 발표는 m4b-tool
더 이상 사용되지 않거나 곧 지원될 것이라는 의미는 아닙니다. m4b-tool
의 개발은 계속될 것입니다(적어도 톤이 m4b-tool
과 유사한 기능 세트를 가질 때까지). 제한이 있을 수 있는 기능에 대한 대체 도구를 갖추는 것입니다.
즐거운 시간 보내시고 피드백을 빨리 받고 싶습니다.
불행하게도 저는 지금 꽤 바쁘기 때문에 m4b-tool 0.4.2
는 매우 오래되었습니다. 완전한 문서 없이 최신 버전을 출시할 계획이 없으므로 버그 수정이 가능한 최신 시험판 버전만 있습니다. 이미 꽤 안정적이므로 v0.4.2
에서 버그가 발생하는 경우 이미 수정된 최신 시험판을 사용해 보세요.
고마워요, 산드레아스
https://pilabor.com
merge
split
하거나 flac
인코딩된 앨범을 큐 시트를 통해 단일 트랙으로 분할chapters
추가 또는 조정 data/my-audio-book
디렉토리의 모든 오디오 파일을 data/merged.m4b
파일로 merge
(태그는 유지되고 data/my-audio-book/cover.jpg
및 data/my-audio-book/description.txt
는 포함됨). , 가능한 경우)
m4b-tool merge "data/my-audio-book/" --output-file="data/merged.m4b"
하나의 큰 m4b 파일을 챕터별로 data/my-audio-book_splitted/
에서 여러 mp3 파일로 split
(태그는 유지되고, m4b에 표지가 포함된 경우 data/my-audio-book_splitted/cover.jpg
생성됩니다).
m4b-tool split --audio-format mp3 --audio-bitrate 96k --audio-channels 1 --audio-samplerate 22050 "data/my-audio-book.m4b"
chapters
무음 감지를 통해 m4b의 기존 챕터를 조정할 수 있습니다.
m4b-tool chapters --adjust-by-silence -o "data/destination-with-adjusted-chapters.m4b" "data/source-with-misplaced-chapters.m4b"
m4b-tool
의 가장 많이 사용되는 하위 명령은 merge
인 것 같으므로 모범 사례에 대해 이야기해 보겠습니다.
불행히도 m4b-tool
많은 종속성이 있습니다. 단일 라이너뿐만 아니라 최고의 품질과 태그 지원을 얻으려면 추가 옵션을 사용하여 많은 종속성을 수동으로 컴파일해야 합니다. 그렇기 때문에 최고의 오디오 품질, 상단 태그 지원 및 쉬운 설치에 대한 모든 부가 기능이 포함되어 있으며 단점이 거의 없는 도커 이미지를 살펴보아야 합니다.
참고: Windows에서는 작동하기 어려울 수 있습니다.
오디오북을 병합할 때 준비해야 합니다. 단일 오디오북만 병합하더라도 다음 디렉토리 구조는 많은 도움이 됩니다.
input/<main genre>/<author>/<title>
아니면 시리즈라면
input/<main genre>/<author>/<series>/<series-part> - <title>
예:
input/Fantasy/J.K. Rowling/Quidditch Through the Ages/
input/Fantasy/J.K. Rowling/Harry Potter/1 - Harry Potter and the Philosopher's Stone/
참고: 오디오북 제목에
/
와 같은 잘못된 경로 문자가 포함된 경우 해당 문자를 대시(-
로 바꾸세요.
이제 오디오북의 표지와 설명이 거의 항상 필요하므로 기본 디렉터리에 다음 파일을 추가해야 합니다.
cover.jpg
(또는 cover.jpeg
또는 cover.png
)description.txt
(콘텐츠에 대해 UTF-8
텍스트 파일 인코딩을 사용해야 합니다)예:
input/Fantasy/J.K. Rowling/Quidditch Through the Ages/cover.jpg
input/Fantasy/J.K. Rowling/Quidditch Through the Ages/description.txt
참고:
m4b-tool
이러한 파일을 자동으로 찾아 포함하지만 해당 파일이 없으면 실패하지 않습니다.
챕터는 오디오북에 경유지를 추가하는 데 좋습니다. 이는 마지막 위치를 기억하고 전반적인 경험을 향상시키는 데 도움이 됩니다.
장을 수동으로 조정하려면 다음 내용( <chapter-start>
<chapter-title>
)이 포함된 chapters.txt
( cover.jpg
와 동일한 위치)를 추가할 수 있습니다.
00:00:00.000 Intro
00:04:19.153 This is
00:09:24.078 A way to add
00:14:34.500 Chapters manually
입력 파일에 태그가 지정된 경우 해당 태그는 title
별로 챕터 메타데이터를 생성하는 데 사용됩니다. 따라서 유효한 챕터 이름이 포함된 입력 파일을 트랙 title
으로 태그하면 유효한 챕터 이름이 포함된 멋지고 깔끔한 m4b
파일이 생성됩니다.
m4b-tool
v.0.4.0 이후의 또 다른 뛰어난 기능은 --max-chapter-length
매개변수입니다. 개별 입력 파일이 너무 커서 챕터의 지속 시간이 매우 길어지는 경우가 많습니다. 특정 지점으로 이동하려면 이전 또는 다음으로 몇 번 팁을 주는 대신 버튼을 오랫동안 되감거나 빨리 감은 채 버튼을 누르고 있어야 하기 때문에 이는 성가신 일이 될 수 있습니다. 하위 장을 자동으로 추가하려면 다음을 제공할 수 있습니다.
--max-chapter-length=300,900
이로 인해 m4b-tool
발생합니다.
하위 장은 원본과 같은 이름을 가지며 추가 색인을 얻습니다. 이는 실제 이름을 유지하면서도 너무 긴 기간의 챕터를 갖지 않는 좋은 방법입니다.
iPod을 소유하고 있는 경우 오디오북이 너무 길면 문제가 발생할 수 있습니다. iPod은 32비트 샘플링 속도만 지원하기 때문입니다. 오디오북이 22050Hz 샘플링 속도로 27시간보다 긴 경우 --adjust-for-ipod
제공하여 오디오북을 자동으로 다운샘플링할 수 있습니다. 그러면 품질이 낮아지지만 적어도 오래된 iPod에서는 작동합니다...
m4b-tool
--jobs
매개변수(예: --jobs=2
)와 병렬로 여러 변환 작업을 지원합니다. 일반적인 경우인 두 개 이상의 파일을 변환해야 하는 경우 --jobs=2
매개변수를 제공하여 병합 속도를 거의 두 배로 늘립니다(또는 쿼드 코어 시스템이 있는 경우 --jobs=4
로 4배로 변환). .). 시스템의 코어 수보다 높은 수를 제공하지 마십시오. 병합 속도가 느려질 수 있습니다.
참고: 모든 코어에서 변환을 실행하면 CPU 사용량이 거의 100%가 되어 시스템 성능이 저하될 수 있습니다.
--batch-pattern
기능 사용 m4b-tool v.0.4.0
에는 --batch-pattern
기능이 추가되었습니다. 여러 오디오북을 한 번에 일괄 변환하는 데 사용할 수 있지만 기존 디렉터리 구조에서 태그를 생성할 수 있기 때문에 단일 오디오북만 변환하는 데에도 사용할 수 있습니다.
힌트:
--batch-pattern
사용할 때output-file
매개변수는 디렉터리여야 합니다.
여러 --batch-pattern
매개변수도 지원되지만 첫 번째 일치 항목이 먼저 사용됩니다. 따라서 위에서 설명한 대로 디렉터리 구조를 생성했다면 input/Fantasy/Harry Potter/1 - Harry Potter and the Philosopher's Stone/
output/Fantasy/Harry Potter/1 - Harry Potter and the Philosopher's Stone.m4b
로 병합하는 최종 명령은 다음과 같습니다. 다음과 같이 보일 것입니다 :
m4b-tool merge -v --jobs=2 --output-file="output/" --max-chapter-length=300,900 --adjust-for-ipod --batch-pattern="input/%g/%a/%s/%p - %n/" --batch-pattern="input/%g/%a/%n/" "input/"
--batch-pattern
모드에서는 기본적으로 기존 파일을 건너뜁니다.
Docker 이미지를 사용하여 위 단계를 수행했거나 모든 종속성을 설치 및 컴파일한 경우 다음과 같은 결과를 얻어야 합니다.
libfdk_aac
인코더를 사용한 최고 품질의 오디오--batch-pattern
사용법에서 genre
, author
, title
, sorttitle
등에 대한 유효한 태그가 있습니다.cover.jpg
(또는 cover.jpeg
또는 cover.png
) 및 description.txt
파일이 기본 디렉토리에 있는 경우 cover
, description
및 longdesc
포함됩니다. m4b-tool
과 함께 docker를 사용하려면 먼저 다음을 수행해야 합니다.
pull
(권장)Dockerfile
build
. 공식 Docker 이미지는 DockerHub에서 사용할 수 있습니다. 다소 실험적이지만 잘 작동하는 것으로 입증되었습니다. latest
태그는 최첨단 기능 및 수정 사항을 적용하는 방법 으로 간주됩니다. 때때로 날짜가 지정된 태그가 게시됩니다(예: sandreas/m4b-tool:2022-09-25
). 이는 깨진 latest
이미지로 인해 전체 설정이 중단되지 않도록 하기 위해 상당히 안정적인 것으로 간주됩니다.
# pull the image
docker pull sandreas/m4b-tool:latest
# create an alias for m4b-tool running docker
alias m4b-tool='docker run -it --rm -u $(id -u):$(id -g) -v "$(pwd)":/mnt sandreas/m4b-tool:latest'
# testing the command
m4b-tool --version
참고: 위의 별칭을 사용하는 경우 절대 경로(예:
/tmp/data/audiobooks/harry potter 1
)나 심볼릭 링크를 사용할 수 없다는 점에 유의하세요. 해당 디렉토리로 변경하고 상대 경로를 사용해야 합니다(예:cd /tmp/data && m4b-tool merge "audiobooks/harry potter 1" --output-file harry.m4b
)
특정 m4b-tool
릴리스에 대한 Docker 컨테이너를 수동으로 빌드하려면 특정 버전을 이미지에 다운로드하기 위한 추가 매개변수를 제공해야 합니다(예: v.0.4.1
의 경우).
# clone m4b-tool repository
git clone https://github.com/sandreas/m4b-tool.git
# change directory
cd m4b-tool
# build docker image - this will take a while
docker build . -t m4b-tool
# create an alias for m4b-tool running docker
alias m4b-tool='docker run -it --rm -u $(id -u):$(id -g) -v "$(pwd)":/mnt m4b-tool'
# testing the command
m4b-tool --version
# use the specific pre-release from 2022-07-16
docker build . --build-arg M4B_TOOL_DOWNLOAD_LINK=https://github.com/sandreas/m4b-tool/files/9125095/m4b-tool.tar.gz -t m4b-tool
참고:
Dockerfile
에서 해당 변수를 편집할 수도 있습니다.
개발자나 전문가는 m4b-tool
의 완전한 사용자 정의 빌드를 실행하거나 코드 자체를 빌드하기를 원할 수 있습니다(예: 저장소를 포크하고 일부 패치를 적용한 경우). 이 경우 Dockerfile
을 기준으로 dist/m4b-tool.phar
에 사용자 지정 빌드를 저장한 다음 기본 빌드를 수행할 수 있습니다.
# dist/m4b-tool.phar is available
docker build . -t m4b-tool
그런 다음 사용자 정의 빌드를 Docker 이미지에 통합해야 합니다.
MacOS에서는 멋진 패키지 관리자인 brew
사용하여 m4b-tool
설치할 수 있습니다.
최상의 오디오 품질을 얻으려면 추가적인 노력이 필요합니다. 무료가 아닌 libfdk_aac
코덱을 사용하여 ffmpeg
다시 컴파일 해야 합니다. brew
추가 옵션 에 대한 가능성을 떨어뜨렸기 때문에 설치된 경우 기본 ffmpeg
패키지를 제거해야 합니다. 공식 ffmpeg-with-options
저장소는 없지만 시간을 절약하는 데 사용할 수 있는 꽤 괜찮은 tap
있습니다.
# FIRST INSTALL ONLY: if not already done, remove existing ffmpeg with default audio quality options
# check for ffmpeg with libfdk and uninstall if libfdk is not already available
[ -x "$(which ffmpeg)" ] && (ffmpeg -hide_banner -codecs 2>&1 | grep libfdk || brew uninstall ffmpeg)
# tap required repositories
brew tap sandreas/tap
brew tap homebrew-ffmpeg/ffmpeg
# check available ffmpeg options and which you would like to use
brew options homebrew-ffmpeg/ffmpeg/ffmpeg
# install ffmpeg with at least libfdk_aac for best audio quality
brew install homebrew-ffmpeg/ffmpeg/ffmpeg --with-fdk-aac
# install m4b-tool
brew install sandreas/tap/m4b-tool
# check installed m4b-tool version
m4b-tool --version
위의 방법이 효과가 없거나 프로덕션에서 사용하기 전에 m4b-tool
확인하려는 경우 빠르고 쉬운 방법을 시도해 볼 수 있습니다. 작동하지만 오디오 품질이 낮아지고 정렬 태그 지정이 지원되지 않습니다 .
# tap m4b-tool repository
brew tap sandreas/tap
# install dependencies
brew install ffmpeg fdk-aac-encoder mp4v2
# install m4b-tool with acceptable audio quality and no sort tagging
brew install --ignore-dependencies sandreas/tap/m4b-tool
# install all dependencies
sudo apt install ffmpeg mp4v2-utils fdkaac php-cli php-intl php-json php-mbstring php-xml
# install / upgrade m4b-tool
sudo wget https://github.com/sandreas/m4b-tool/releases/download/v.0.4.2/m4b-tool.phar -O /usr/local/bin/m4b-tool && sudo chmod +x /usr/local/bin/m4b-tool
# check installed m4b-tool version
m4b-tool --version
참고: 가능한 최상의 오디오 품질을 얻으려면 고품질 인코더
fdk-aac
(--enable-libfdk_aac
)를 사용하여ffmpeg
컴파일해야 합니다. https://trac.ffmpeg.org/wiki/CompilationGuide/를 참조하세요.ffmpeg
컴파일을 위한 단계별 가이드는 Ubuntu입니다.
m4b-tool
PHP
로 작성되었으며 고효율 코덱을 위해 ffmpeg
, mp4v2
및 선택적으로 fdkaac
사용하여 변환을 수행합니다. 따라서 %PATH%에 다음 도구가 필요합니다.
mbstring
확장이 활성화된 php
>= 7.1(https://php.net)ffmpeg
(https://www.ffmpeg.org)mp4v2
( mp4chaps
, mp4art
등 https://github.com/sandreas/m4b-tool/releases/download/v0.2/mp4v2-windows.zip)fdkaac
(선택 사항, 낮은 비트 전송률 <= 32k에 대해 높은 효율성이 필요한 경우에만, http://wlc.io/2015/06/20/fdk-aac/ - 주의: 공식이 아닙니다!)종속성을 확인하려면 명령줄을 통해 다음 명령을 실행하면 비슷한 출력이 표시됩니다.
$ php -v
Copyright (c) 1997-2018 The PHP Group [...]
$ ffmpeg -version
ffmpeg version 4.1.1 Copyright (c) 2000-2019 the FFmpeg developers [...]
$ mp4chaps --version
mp4chaps - MP4v2 2.0.0
$ fdkaac
fdkaac 1.0.0 [...]
모든 종속성이 설치되었다고 확신하는 경우 다음 단계는 m4b-tool
의 최신 릴리스를 다운로드하는 것입니다.
https://github.com/sandreas/m4b-tool/releases
운영 체제에 따라 m4b-tool.phar
의 이름을 m4b-tool
로 바꾸고 명령줄에서 직접 m4b-tool --version
실행할 수 있습니다. 확실하지 않은 경우 언제든지 php m4b-tool.phar --version
명령을 사용하여 설치가 성공했는지 확인할 수 있습니다. 이는 모든 시스템에서 작동합니다.
새로운 기능과 수정 사항이 모두 포함된 최신 소스 코드를 사용하려면 소스에서 빌드할 수도 있습니다. 현재 빌드는 불안정할 수 있으므로 테스트 목적으로 또는 아직 출시되지 않은 특정 기능이 필요한 경우에만 사용해야 합니다.
mp4v2
대부분의 오디오북은 알파벳순으로 출시되지 않습니다. 대표적인 예가 해리포터이다. 따라서 해리포터 오디오북을 모두 가지고 있다면 플레이어에 따라 다르지만 아마도 올바른 순서로 나열되어 있지 않을 것입니다... 알파벳 순서는 어떻게 되는지 살펴보겠습니다.
그리고 올바른 순서는 다음과 같습니다.
이에 대한 해결책이 있습니다. 사용자 정의 sortname
및/또는 sortalbum
사용하여 오디오북에 태그를 지정해야 합니다. 플레이어가 이러한 태그를 지원하는 경우 제목이 여전히 원래 제목인 경우에도 이제 순서가 정확합니다. 이를 달성하기 위해 mp4v2
(보다 정확한 mp4tags
)의 사용자 정의 버전을 구축하고 이러한 태그에 대한 옵션을 추가하고 의사 태그 --series
및 --series-part
추가해야 했습니다.
따라서 다음을 수행하면:
m4b-tool merge --name="Harry Potter and the Chamber of Secrets" --series="Harry Potter" --series-part="2" --output-file="output/Harry Potter and the Chamber of Secrets.m4b" "input/Harry Potter and the Chamber of Secrets"
결과는 다음과 같습니다.
Harry Potter and the Chamber of Secrets
Harry Potter 2 - Harry Potter and the Chamber of Secrets
mp4v2
설치Docker 이미지에는 사용자 정의 버전이 이미 설치되어 있습니다.
git clone https://github.com/sandreas/mp4v2
cd mp4v2
./configure
make && sudo make install
m4b-tool
에서는 모든 오디오 변환이 ffmpeg
로 수행되어 무료 인코더를 사용하여 오디오 품질이 상당히 저하됩니다. 그러나 최고의 품질을 얻으려면 약간의 추가 노력이 필요하므로 무료 인코더를 사용하는 경우 m4b-tool
다음 힌트가 표시될 수 있습니다.
ffmpeg 버전은 libfdk_aac 대신 인코더 aac를 사용하여 최고 품질의 aac를 생성할 수 없습니다.
대부분의 경우 aac
인코더와 libfdk_aac
인코더의 차이가 거의 눈에 띄지 않기 때문에 이는 실제로 문제가 되지 않습니다. 그러나 이 힌트를 극복하고 가능한 최고의 오디오 품질을 얻으려면 기본적으로 ffmpeg
에 통합되지 않은 무료 인코더를 사용해야 합니다(라이센스 이유). 사용 중인 운영 체제에 따라 무료 인코더를 설치하려면 약간의 추가 기술, 노력 및 시간이 필요할 수 있습니다(위의 운영 체제에 대한 참고 사항 참조). 약간 더 나은 품질을 얻기 위해 추가 노력을 기울일 가치가 있는지 결정해야 합니다. Docker 이미지를 사용하는 경우 기본적으로 최상의 품질을 얻어야 합니다.
매우 낮은 비트 전송률(<= 32k)을 사용하는 경우 고효율 프로필을 사용하여 오디오 품질을 더욱 향상시킬 수도 있습니다(예: 모노의 경우 --audio-profile=aac_he
). 불행하게도 ffmpeg
의 고효율 구현은 많은 플레이어(iTunes 포함)와 호환되지 않는 오디오 파일을 생성합니다. 최소한 가장 일반적인 플레이어와 호환되는 고효율 파일을 생성하려면 지금은 fdkaac
설치해야 합니다.
자세한 내용:
m4b-tool
에 문제가 있다고 생각하시나요? 먼저 아래의 알려진 문제를 살펴보세요. 그래도 도움이 되지 않으면 문제를 추가할 때 다음 정보를 제공해 주세요.
m4b-tool merge my-audio-book/ --output-file merged.m4b
the resulting file merged.m4b is only 5kb
예:
Title: m4b-tool does not embed covers
If i run m4b-tool with a folder containing a cover.png, it does not embed the cover and shows an error message.
OS: Ubuntu 16.04 LTS
Command: `m4b-tool merge my-audio-book/ ---output-file merged.m4b`
Error: Cannot embed cover, cover is not a valid image file
Attached files: cover.png
PHP 예외가 발생하는 경우 대부분의 경우 PHP 구성 문제입니다. PHP 구성에 익숙하지 않은 경우 다음 지침에 따라 몇 가지 알려진 문제를 해결할 수 있습니다.
[Exception]
charset windows-1252 is not supported - use one of these instead: utf-8
이는 주로 Windows에서 발생합니다. mbstring
-Extension이 문자 세트를 내부적으로 변환하는 데 사용되어 독일어 움라우트와 같은 특수 문자가 모든 플랫폼에서 지원되기 때문입니다. 이 문제를 해결하려면 mbstring-extension을 활성화해야 합니다:
명령줄에서 php --ini
실행합니다:
C:>php --ini
...
Loaded Configuration File: C:Program Filesphpphp.ini
텍스트 편집기에서 구성 파일(예: C:Program Filesphpphp.ini
)을 열고 extension=
을 검색하세요. Windows에는 다음과 같은 항목이 있어야 합니다.
;extension=php_mbstring.dll
제거 ;
확장 기능을 활성화하려면:
extension=php_mbstring.dll
이제 모든 것이 예상대로 작동할 것입니다.
다음 목록에는 모든 명령에서 사용할 수 있는 매개변수 참조와 함께 merge
, split
및 chapters
포함하여 가능한 모든 명령이 포함되어 있습니다.
m4b-tool
사용하면 오디오 파일 세트를 하나의 m4b 오디오북 파일로 병합할 수 있습니다.
m4b-tool merge "data/my-audio-book" --output-file="data/my-audio-book.m4b"
이렇게 하면 챕터 생성을 위해 모든 파일의 태그 제목을 사용하여 data/my-audio-book
폴더의 모든 오디오 파일이 my-audio-book.m4b
로 병합됩니다.
data/my-audio-book/cover.jpg
(또는 cover.jpeg
또는 cover.png
) 파일이 있는 경우 결과 m4b 파일의 표지로 사용됩니다.
참고: 태그가 지정되지 않은 오디오 파일을 사용하는 경우 musicbrainz ID를 제공하여 올바른 챕터 이름을 얻을 수 있습니다. 자세한 내용은 명령 챕터를 참조하세요.
모든 옵션은 m4b-tool merge --help
참조하세요.
Description:
Merges a set of files to one single file
Usage:
merge [options] [--] <input> [<more-input-files>...]
Arguments:
input Input file or folder
more-input-files Other Input files or folders
Options:
--logfile[=LOGFILE] file to log all output [default: ""]
--debug enable debug mode - sets verbosity to debug, logfile to m4b-tool.log and temporary encoded files are not deleted
-f, --force force overwrite of existing files
--no-cache clear cache completely before doing anything
--ffmpeg-threads[=FFMPEG-THREADS] specify -threads parameter for ffmpeg - you should also consider --jobs when merge is used [default: ""]
--platform-charset[=PLATFORM-CHARSET] Convert from this filesystem charset to utf-8, when tagging files (e.g. Windows-1252, mainly used on Windows Systems) [default: ""]
--ffmpeg-param[=FFMPEG-PARAM] Add argument to every ffmpeg call, append after all other ffmpeg parameters (e.g. --ffmpeg-param="-max_muxing_queue_size" --ffmpeg-param="1000" for ffmpeg [...] -max_muxing_queue_size 1000) (multiple values allowed)
-a, --silence-min-length[=SILENCE-MIN-LENGTH] silence minimum length in milliseconds [default: 1750]
-b, --silence-max-length[=SILENCE-MAX-LENGTH] silence maximum length in milliseconds [default: 0]
--max-chapter-length[=MAX-CHAPTER-LENGTH] maximum chapter length in seconds - its also possible to provide a desired chapter length in form of 300,900 where 300 is desired and 900 is max - if the max chapter length is exceeded, the chapter is placed on the first silence between desired and max chapter length [default: "0"]
--name[=NAME] custom name, otherwise the existing metadata will be used
--sortname[=SORTNAME] custom sortname, that is used only for sorting
--album[=ALBUM] custom album, otherwise the existing metadata for name will be used
--sortalbum[=SORTALBUM] custom sortalbum, that is used only for sorting
--artist[=ARTIST] custom artist, otherwise the existing metadata will be used
--sortartist[=SORTARTIST] custom sortartist, that is used only for sorting
--genre[=GENRE] custom genre, otherwise the existing metadata will be used
--writer[=WRITER] custom writer, otherwise the existing metadata will be used
--albumartist[=ALBUMARTIST] custom albumartist, otherwise the existing metadata will be used
--year[=YEAR] custom year, otherwise the existing metadata will be used
--description[=DESCRIPTION] custom short description, otherwise the existing metadata will be used
--longdesc[=LONGDESC] custom long description, otherwise the existing metadata will be used
--comment[=COMMENT] custom comment, otherwise the existing metadata will be used
--copyright[=COPYRIGHT] custom copyright, otherwise the existing metadata will be used
--encoded-by[=ENCODED-BY] custom encoded-by, otherwise the existing metadata will be used
--cover[=COVER] custom cover, otherwise the existing metadata will be used
--skip-cover skip extracting and embedding covers
--series[=SERIES] custom series, this pseudo tag will be used to auto create sort order (e.g. Harry Potter or The Kingkiller Chronicles)
--series-part[=SERIES-PART] custom series part, this pseudo tag will be used to auto create sort order (e.g. 1 or 2.5)
--audio-format[=AUDIO-FORMAT] output format, that ffmpeg will use to create files [default: "m4b"]
--audio-channels[=AUDIO-CHANNELS] audio channels, e.g. 1, 2 [default: ""]
--audio-bitrate[=AUDIO-BITRATE] audio bitrate, e.g. 64k, 128k, ... [default: ""]
--audio-samplerate[=AUDIO-SAMPLERATE] audio samplerate, e.g. 22050, 44100, ... [default: ""]
--audio-codec[=AUDIO-CODEC] audio codec, e.g. libmp3lame, aac, ... [default: ""]
--audio-profile[=AUDIO-PROFILE] audio profile, when using extra low bitrate - valid values: aac_he, aac_he_v2 [default: ""]
--adjust-for-ipod auto adjust bitrate and sampling rate for ipod, if track is too long (may result in low audio quality)
--fix-mime-type try to fix MIME-type (e.g. from video/mp4 to audio/mp4) - this is needed for some players to prevent an empty video window
-o, --output-file=OUTPUT-FILE output file
--include-extensions[=INCLUDE-EXTENSIONS] comma separated list of file extensions to include (others are skipped) [default: "aac,alac,flac,m4a,m4b,mp3,oga,ogg,wav,wma,mp4"]
-m, --musicbrainz-id=MUSICBRAINZ-ID musicbrainz id so load chapters from
--no-conversion skip conversion (destination file uses same encoding as source - all encoding specific options will be ignored)
--batch-pattern[=BATCH-PATTERN] multiple batch patterns that can be used to merge all audio books in a directory matching the given patterns (e.g. %a/%t for author/title) - parameter --output-file must be a directory (multiple values allowed)
--dry-run perform a dry run without converting all the files in batch mode (requires --batch-pattern)
--jobs[=JOBS] Specifies the number of jobs (commands) to run simultaneously [default: 1]
--use-filenames-as-chapters Use filenames for chapter titles instead of tag contents
--no-chapter-reindexing Do not perform any reindexing for index-only chapter names (by default m4b-tool will try to detect index-only chapters like Chapter 1, Chapter 2 and reindex it with its numbers only)
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--batch-pattern
에 대한 자리 표시자 참조 --batch-pattern
매개변수를 사용하는 경우 다음 자리 표시자가 지원됩니다.
title
/ name
: %n
sort_name
: %N
album
: %m
,sort_album
: %M
,artist
: %a
,sort_artist
: %A
,genre
: %g
,writer
: %w
,album_artist
: %t
,year
: %y
,description
: %d
,long_description
: %D
,comment
: %c
,copyright
: %C
,encoded_by
: %e
,group(ing)
: %G
,purchase_date
: %U
,series
: %s
,series_part
: %p
, m4b-tool
단일 m4b
챕터당 파일로 분할하거나 flac
인코딩된 앨범을 큐 시트를 통해 단일 트랙으로 분할하는 데 사용할 수 있습니다.
m4b-tool split --audio-format mp3 --audio-bitrate 96k --audio-channels 1 --audio-samplerate 22050 "data/my-audio-book.m4b"
이렇게 하면 data/my-audio-book.m4b into
분할되어 해당 파일이 data/my-audio-book_splitted/
에 기록됩니다.
여러 트랙이 포함된 flac
파일을 분할하려면 flac
의 정확한 파일 이름이 포함된 큐 시트가 필요합니다( my-album.flac
에는 my-album.cue
가 필요함).
# my-album.cue is automatically found and used for splitting
m4b-tool split --audio-format=mp3 --audio-bitrate=192k --audio-channels=2 --audio-samplerate=48000 "data/my-album.flac"
모든 옵션은 m4b-tool split --help
참조하세요.
Description:
Splits an m4b file into parts
Usage:
split [options] [--] <input>
Arguments:
input Input file or folder
Options:
--logfile[=LOGFILE] file to dump all output [default: ""]
--debug enable debug mode - sets verbosity to debug, logfile to m4b-tool.log and temporary files are not deleted
-f, --force force overwrite of existing files
--no-cache do not use cached values and clear cache completely
--ffmpeg-threads[=FFMPEG-THREADS] specify -threads parameter for ffmpeg [default: ""]
--platform-charset[=PLATFORM-CHARSET] Convert from this filesystem charset to utf-8, when tagging files (e.g. Windows-1252, mainly used on Windows Systems) [default: ""]
--ffmpeg-param[=FFMPEG-PARAM] Add argument to every ffmpeg call, append after all other ffmpeg parameters (e.g. --ffmpeg-param="-max_muxing_queue_size" --ffmpeg-param="1000" for ffmpeg [...] -max_muxing_queue_size 1000) (multiple values allowed)
-a, --silence-min-length[=SILENCE-MIN-LENGTH] silence minimum length in milliseconds [default: 1750]
-b, --silence-max-length[=SILENCE-MAX-LENGTH] silence maximum length in milliseconds [default: 0]
--max-chapter-length[=MAX-CHAPTER-LENGTH] maximum chapter length in seconds - its also possible to provide a desired chapter length in form of 300,900 where 300 is desired and 900 is max - if the max chapter length is exceeded, the chapter is placed on the first silence between desired and max chapter length [default: "0"]
--audio-format[=AUDIO-FORMAT] output format, that ffmpeg will use to create files [default: "m4b"]
--audio-channels[=AUDIO-CHANNELS] audio channels, e.g. 1, 2 [default: ""]
--audio-bitrate[=AUDIO-BITRATE] audio bitrate, e.g. 64k, 128k, ... [default: ""]
--audio-samplerate[=AUDIO-SAMPLERATE] audio samplerate, e.g. 22050, 44100, ... [default: ""]
--audio-codec[=AUDIO-CODEC] audio codec, e.g. libmp3lame, aac, ... [default: ""]
--audio-profile[=AUDIO-PROFILE] audio profile, when using extra low bitrate - valid values (mono, stereo): aac_he, aac_he_v2 [default: ""]
--adjust-for-ipod auto adjust bitrate and sampling rate for ipod, if track is to long (may lead to poor quality)
--name[=NAME] provide a custom audiobook name, otherwise the existing metadata will be used [default: ""]
--sortname[=SORTNAME] provide a custom audiobook name, that is used only for sorting purposes [default: ""]
--album[=ALBUM] provide a custom audiobook album, otherwise the existing metadata for name will be used [default: ""]
--sortalbum[=SORTALBUM] provide a custom audiobook album, that is used only for sorting purposes [default: ""]
--artist[=ARTIST]