Comments (5)
it would be useful to have a flag to "preserve-order"
You are absolutely right. But instead of another flag like --preserve-order
, here is my proposal. The file ordering is a bit complex, because m4b-tool
reads directories recursive by default. But if ONLY files are provided and no directory is included, i would preserve order by default, without the need of providing an extra flag.
What do you think? If you are happy with this, i take a look into this in the next days...
from m4b-tool.
Actually, I just thought of another wrinkle: Track numbers already embedded in the input files.
I'm not at the PC to test, but I don't think so OSes guarantee the order of expansion when wildcards are provided as an argument. Perhaps the flag is simplest - Alpha, Track Number, As-provided.
I haven't used it with folders. Would each folder produce a seperate output, or are they all merged? If they are separate, the sitting should be per output file...
from m4b-tool.
At the moment, all input arguments are recursively loaded if directory and added if file, then merged and then sorted alphabetically... so if you provide the following:
a.mp3
c.mp3
b.mp3
the merged result would be:
a.mp3
b.mp3
c.mp3
If you use folders, all files of the folder are loaded and sorted... e.g.:
m4b-tool my-folder2 my-folder --output-file="testing.m4b"
# although my-folder2 comes as first argument, it would result in:
my-folder/001.mp3
my-folder/002.mp3
my-folder/003.mp3
# ...
my-folder2/001.mp3
my-folder2/002.mp3
my-folder2/003.mp3
I never thought of a use case, where files are not named and sorted like they should be merged, but as i said: You are right... i think i will rework the file loading algorithm and think over a sane default behaviour instead of having extra flags for sorting... I'll provide a proposal in the next days.
As an idea: The arguments order should be left as is, regardless if it is a directory or a file - but directories should be loaded recursively and sorted, since as you say it is not guaranteed, that OS gives the correct order of files if a directory is provided.
from m4b-tool.
Ok, should be fixed. Sorting is only applied for single directories... if you provide more than one input argument (no matter if directory or file) the order is retained. Here is a nightly build for download, would be nice if you could give some feedback...
from m4b-tool.
Thanks for the prompt action!
Unfortunately I won't be able to test until Tues earliest - I'm not near the machine until then!
Will update when I do.
from m4b-tool.
Related Issues (20)
- 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
- MusicBrainz HTTP 404 HOT 1
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.