Comments (13)
Well, i'm not sure you implied the usage of --audio-bitrate="62k"
, because it is not in the specs for every player.
-
What player did you use?
-
Does using m4b-tool with defaults produce unplayable files?
php m4b-tool.phar merge "data/my-audio-book" --output-file="data/my-audio-book.m4b"
-
Try using m4b-tool WITHOUT these params:
--convert-charset --audio-format="m4b" --audio-bitrate="62k" --audio-codec="aac"
-
Try to change the --audio-bitrate to
64k
instead of62k
.
from m4b-tool.
I intentionally used bitrate at 62k, because that was source bitrate.
I tried: Windows Media Player, Groove, and MPC-HC (Media Player Classic).
Doing just this command, results in unplayable file:
php m4b-tool.phar merge "X:\ToSort\Anthology - Star Wars-- Canto Bight (Read by Multiple Narrators)" --output-file="X:\ToSort\Anthology - Star Wars-- Canto Bight (Read by Multiple Narrators)\Canto Bight.m4b" --ffmpeg-threads=8 --artist="Sean Kenin, Saskia Maarleveld, Marc Thompson, Jonathan Davis" --albumartist="Saladin Ahmed, Rae Carson, Mira Grant, John Jackson Miller" -f -v --no-cache
from m4b-tool.
Ok, if you append the --debug flag, m4b-tool creates a dump file, in which the shell commands should be listed (every call of mp4tools and ffmpeg with params).
Could you provide this dump as file? I'll take a look at it.
from m4b-tool.
Here is the dump file:
m4b-tool_debug.log
from m4b-tool.
It seems to be an ffmpeg bug with some input files.
Message: Too many packets buffered for output stream 0:1.
See https://trac.ffmpeg.org/ticket/6375 for details.
The linked ticket describes a workaround, I'll try to implement this in the next version as well as an "--ffmpeg-params" argument for providing global extra ffmpeg parameters.
from m4b-tool.
Ok, I published a pre-release v.0.3-beta2:
https://github.com/sandreas/m4b-tool/releases/download/v.0.3-beta2/m4b-tool.phar
Running your command with --ffmpeg-param="-max_muxing_queue_size" --ffmpeg-param="1000"
appends -max_muxing_queue_size 1000
to every ffmpeg call, like it is described in the workaround. This might work, but it seems that ffmpeg does not handle arguments the same way on any position (order of arguments can be important, depending if it should affect input or output files), so it is very difficult to implement this in a generic way.
If this does not work, i could add another option for exactly this workaround but i would prefer waiting for ffmpeg to fix this issue.
You could also convert your sourcefiles to another format before feeding it into m4b-tool, so that this issue would not affect your files... but i understand if this is a step you want to avoid.
I really hope this does the job for you and the --ffmpeg-param options should help expierienced users to get the best out of m4b-tools ffmpeg wrapping now.
from m4b-tool.
The command you specified does not work on the latest beta:
In MergeCommand.php line 325:
could not convert X:\ToSort\Anthology - Star Wars-- Canto Bight (Read by Multiple Narrators)\01 - Introduction.m4b
to -tmpfiles\52-01 - Introduction-converting.m44
ffmpeg -hide_banner -codecs -max_muxing_queue_size 1000
== load input files ==
ffmpeg -vn -i "X:\ToSort\Anthology - Star Wars-- Canto Bight (Read by Multiple Narrators)\01 - Introduction.m4b" -map_metadata 0 -strict experimental -vf scale=trunc(iw/2)*2:trunc(ih/2)*2 -movflags +faststart -y -acodec aac -f mp4 "-tmpfiles\52-01 - Introduction-converting.m4b" -max_muxing_queue_size 1000
ffmpeg version N-90667-g8d381b57fd Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
libavutil 56. 13.100 / 56. 13.100
libavcodec 58. 17.100 / 58. 17.100
libavformat 58. 11.101 / 58. 11.101
libavdevice 58. 2.100 / 58. 2.100
libavfilter 7. 14.100 / 7. 14.100
libswscale 5. 0.102 / 5. 0.102
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Unrecognized option 'tmpfiles\52-01 - Introduction-converting.m4b'.
Error splitting the argument list: Option not found
from m4b-tool.
This seems to be a totally different error, since the filename is not even close to m4b (.m44). If this is not a typo, it is, because you tried to convert the files on a Shared drive (X:) - this is not supported in any case AFAIK. What you could to instead is to use so called UNC Paths (\\servername\sharename\audiobook-name) instead of mounting the drive as network share. If you are still experiencing those errors using a local file (C:...), i would ask you kindly to add a new issue for this problem.
But to come back to this issue with converting (Too many packets buffered for output stream 0:1):
I think there is not much i can do here, because i suspect ffmpeg not supporting this special kind of file you are trying to use.
Perhaps the next step would be to provide a statically linked version of ffmpeg and mp4tools for each OS in this repository, but therefore i have to check the licensing.
from m4b-tool.
So here we go... next beta with some general improvements and the workaround suggested in the ffmpeg issue...
Since i did not notice any side effects using -max_muxing_queue_size=9999 except for the fact that older ffmpeg versions are no longer supported, its integrated now by default.
If this does not fix the issue, I've run out of ideas...
from m4b-tool.
@d2dyno Did the latest beta fix the issue for you?
from m4b-tool.
I am trying a few things:
- Re-run latest beta on previous Windows box.
- Run m4b tool on Ubuntu box. If it works, script the shit out of it, so I can just input a folder and it will run in the background.
from m4b-tool.
This is now fixed on Windows. Playable files are created without any special settings.
Thanks for all the hard work! Let me know when donations open.
from m4b-tool.
Glad to hear it worked.
- You could take a look at https://github.com/sandreas/m4b-tool/blob/master/multi-convert, if you are looking for a shell script that supports batch conversion of multiple folders
- If using ubuntu, i strongly recommend you to get the ffmpeg --with-fdk-aac, which produces much better audio quality (e.g. https://launchpad.net/~spvkgn/+archive/ubuntu/ffmpeg-nonfree)
from m4b-tool.
Related Issues (20)
- Split by silence HOT 8
- Not using libfdk_aac by default HOT 3
- roadmap summary (improvement collection from older issues that are fixed)
- Audiobooks with multiple folders HOT 4
- Autodetect quality depending on source HOT 3
- Issue reindexing chapters for audiobooks with many chapters. HOT 3
- Too long chapters - not working? HOT 3
- Chapters not being marked with --no-conversion HOT 4
- Using --filename-template with --batch-pattern does not skip existing files HOT 1
- Corrupt files when merging many mp3 files HOT 5
- Difficult to intall HOT 3
- im running m4b-tool in a bash script on a macOS and its working really well, but --series-part is not working. Any idea why? HOT 5
- Cue sheets for reading metadata HOT 2
- Not adding metadata to the output file HOT 6
- How do you set tags as chapter names? HOT 2
- ffmpeg version 4.0.0 or higher is required HOT 9
- Implicit conversion from float to int loses precision (Parser/SilenceParser.php line 61) HOT 1
- Return type of M4bTool\Audio\Tag::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used HOT 6
- [FeatureRequest] Flag to copy all tags HOT 3
- Anyway to merge and use individual .mp3 filenames as chapter titles? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m4b-tool.