Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For some reason the script create one m4b per mp3 file (not merging) #47

Open
grostim opened this issue Feb 4, 2024 · 3 comments
Open

Comments

@grostim
Copy link

grostim commented Feb 4, 2024

Hi,

I may not using your container as expected, and i have an issue with it:
I have copied a set of mp3 files (one per chapter) in /temp/recentlyadded/ (all together)

Less than one minute later, the script trigger and each mp3 file is copied in a separate folder in /temp/merge .
Then each mp3 file is converted to /temp/untagged to a separate m4b with a one line chapters.txt aside .

What is preventing my mp3 to be merged together ?

root@Unraid:/mnt/user/AudioBooksTemp/recentlyadded# ls
01_L_ORDRE_DU_PHENIX.mp3  06_L_ORDRE_DU_PHENIX.mp3  11_L_ORDRE_DU_PHENIX.mp3  16_L_ORDRE_DU_PHENIX.mp3  21_L_ORDRE_DU_PHENIX.mp3  26_L_ORDRE_DU_PHENIX.mp3  31_L_ORDRE_DU_PHENIX.mp3  36_L_ORDRE_DU_PHENIX.mp3
02_L_ORDRE_DU_PHENIX.mp3  07_L_ORDRE_DU_PHENIX.mp3  12_L_ORDRE_DU_PHENIX.mp3  17_L_ORDRE_DU_PHENIX.mp3  22_L_ORDRE_DU_PHENIX.mp3  27_L_ORDRE_DU_PHENIX.mp3  32_L_ORDRE_DU_PHENIX.mp3  37_L_ORDRE_DU_PHENIX.mp3
03_L_ORDRE_DU_PHENIX.mp3  08_L_ORDRE_DU_PHENIX.mp3  13_L_ORDRE_DU_PHENIX.mp3  18_L_ORDRE_DU_PHENIX.mp3  23_L_ORDRE_DU_PHENIX.mp3  28_L_ORDRE_DU_PHENIX.mp3  33_L_ORDRE_DU_PHENIX.mp3  38_L_ORDRE_DU_PHENIX.mp3
04_L_ORDRE_DU_PHENIX.mp3  09_L_ORDRE_DU_PHENIX.mp3  14_L_ORDRE_DU_PHENIX.mp3  19_L_ORDRE_DU_PHENIX.mp3  24_L_ORDRE_DU_PHENIX.mp3  29_L_ORDRE_DU_PHENIX.mp3  34_L_ORDRE_DU_PHENIX.mp3
05_L_ORDRE_DU_PHENIX.mp3  10_L_ORDRE_DU_PHENIX.mp3  15_L_ORDRE_DU_PHENIX.mp3  20_L_ORDRE_DU_PHENIX.mp3  25_L_ORDRE_DU_PHENIX.mp3  30_L_ORDRE_DU_PHENIX.mp3  35_L_ORDRE_DU_PHENIX.mp3
root@Unraid:/mnt/user/AudioBooksTemp/recentlyadded# docker logs auto-m4b
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
Feb  4 15:32:05 67643364b9dd syslog-ng[14]: syslog-ng starting up; version='3.35.1'
*** Booting runit daemon...
*** Runit started as PID 24
Feb  4 15:32:06 67643364b9dd cron[29]: (CRON) INFO (pidfile fd = 3)
Feb  4 15:32:06 67643364b9dd cron[29]: (CRON) INFO (Running @reboot jobs)
Adding user `autom4b' ...
Adding new group `autom4b' (99) ...
Adding new user `autom4b' (99) with group `autom4b' ...
Creating home directory `/home/autom4b' ...
Copying files from `/etc/skel' ...
New password: Password change has been aborted.
passwd: Authentication token manipulation error
passwd: password unchanged
Use of uninitialized value $answer in chop at /usr/sbin/adduser line 595.
Use of uninitialized value $answer in pattern match (m//) at /usr/sbin/adduser line 596.
Try again? [y/N] Changing the user information for autom4b
Enter the new value, or press ENTER for the default
Use of uninitialized value $answer in chop at /usr/sbin/adduser line 625.
Use of uninitialized value $answer in pattern match (m//) at /usr/sbin/adduser line 626.
	Full Name []: 	Room Number []: 	Work Phone []: 	Home Phone []: 	Other []: Is the information correct? [Y/n] Created missing autom4b user with UID 99
Using 2 CPU cores as defined.
Using 1m min sleep time.
Skipping making a backup
Making sure all books are in their own folder
Moving folders with 2 or more audiofiles to /temp/merge/
Nested subfolders are BAD moving to /temp/fix
Moving single file mp3's to /temp/merge/
Moving all the single m4b books to /temp/untagged/
01_L_ORDRE_DU_PHENIX/
02_L_ORDRE_DU_PHENIX/
03_L_ORDRE_DU_PHENIX/
04_L_ORDRE_DU_PHENIX/
05_L_ORDRE_DU_PHENIX/
06_L_ORDRE_DU_PHENIX/
07_L_ORDRE_DU_PHENIX/
08_L_ORDRE_DU_PHENIX/
09_L_ORDRE_DU_PHENIX/
10_L_ORDRE_DU_PHENIX/
11_L_ORDRE_DU_PHENIX/
12_L_ORDRE_DU_PHENIX/
13_L_ORDRE_DU_PHENIX/
14_L_ORDRE_DU_PHENIX/
15_L_ORDRE_DU_PHENIX/
16_L_ORDRE_DU_PHENIX/
17_L_ORDRE_DU_PHENIX/
18_L_ORDRE_DU_PHENIX/
19_L_ORDRE_DU_PHENIX/
20_L_ORDRE_DU_PHENIX/
21_L_ORDRE_DU_PHENIX/
22_L_ORDRE_DU_PHENIX/
23_L_ORDRE_DU_PHENIX/
24_L_ORDRE_DU_PHENIX/
25_L_ORDRE_DU_PHENIX/
26_L_ORDRE_DU_PHENIX/
27_L_ORDRE_DU_PHENIX/
28_L_ORDRE_DU_PHENIX/
29_L_ORDRE_DU_PHENIX/
30_L_ORDRE_DU_PHENIX/
31_L_ORDRE_DU_PHENIX/
32_L_ORDRE_DU_PHENIX/
33_L_ORDRE_DU_PHENIX/
34_L_ORDRE_DU_PHENIX/
35_L_ORDRE_DU_PHENIX/
36_L_ORDRE_DU_PHENIX/
37_L_ORDRE_DU_PHENIX/
38_L_ORDRE_DU_PHENIX/
Folder Detected
Sampling 01_L_ORDRE_DU_PHENIX/01_L_ORDRE_DU_PHENIX.mp3
Bitrate = 128099
The folder 01_L_ORDRE_DU_PHENIX will be merged to /temp/untagged/01_L_ORDRE_DU_PHENIX/01_L_ORDRE_DU_PHENIX.m4b
Starting Conversion
an error occured, that has not been caught:
Array
(
    [type] => 8192
    [message] => 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 to temporarily suppress the notice
    [file] => phar:///usr/local/bin/m4b-tool/src/library/M4bTool/Audio/Tag.php
    [line] => 158
)
Finished Converting
Putting the m4b into a folder
Deleting duplicate mp3 audiobook folder
Sampling 02_L_ORDRE_DU_PHENIX/02_L_ORDRE_DU_PHENIX.mp3
Bitrate = 128087
The folder 02_L_ORDRE_DU_PHENIX will be merged to /temp/untagged/02_L_ORDRE_DU_PHENIX/02_L_ORDRE_DU_PHENIX.m4b
Starting Conversion
@seanap
Copy link
Owner

seanap commented Feb 4, 2024

All books need to be in their own folder. Eg. /temp/recentlyadded/bookfolder/bookfile1.mp3...

In the recentlyadded folder you can throw single m4b's in there and it will treat each m4b as it's own book. If you have a multifile book (either multi-m4b or multi-mp3) they need to be in a folder so the script can determine all those files are a single book.

@grostim
Copy link
Author

grostim commented Feb 4, 2024

Thanks.

However, if i drop the mp3 files in a subfolder of recentlyadded, there are never processed.
I'll try again.

@bartschneider
Copy link

I have the same issue. Folder with mp3s in recentlyadded is just being ignored by the tool even though it is running fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants