Giter VIP home page Giter VIP logo

Comments (13)

sandreas avatar sandreas commented on May 29, 2024

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 of 62k.

from m4b-tool.

ordinarygulp avatar ordinarygulp commented on May 29, 2024

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.

sandreas avatar sandreas commented on May 29, 2024

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.

ordinarygulp avatar ordinarygulp commented on May 29, 2024

Here is the dump file:
m4b-tool_debug.log

from m4b-tool.

sandreas avatar sandreas commented on May 29, 2024

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.

sandreas avatar sandreas commented on May 29, 2024

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.

ordinarygulp avatar ordinarygulp commented on May 29, 2024

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.

sandreas avatar sandreas commented on May 29, 2024

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.

sandreas avatar sandreas commented on May 29, 2024

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.

sandreas avatar sandreas commented on May 29, 2024

@d2dyno Did the latest beta fix the issue for you?

from m4b-tool.

ordinarygulp avatar ordinarygulp commented on May 29, 2024

I am trying a few things:

  1. Re-run latest beta on previous Windows box.
  2. 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.

ordinarygulp avatar ordinarygulp commented on May 29, 2024

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.

sandreas avatar sandreas commented on May 29, 2024

Glad to hear it worked.

from m4b-tool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.