-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Running the same command gives inconsistent results - Windows WSL2 Ubuntu 20.04 #222
Comments
Mmh strange. Looks like a windows issue, I recently came across the jellyfin docker instructions where it is recommended to use a bind mount instead of a volume to overcome filesystem issues, but I think this is not possible on windows?! docker run -it --rm -u $(id -u):$(id -g) \
--mount type=bind,source=$FOLDER,target=/mnt
sandreas/m4b-tool:latest merge "./$(echo $NAME)_splitted/" --output-file="./$NAME.m4b" --jobs=$(nproc --all) And could you verify the issue by using an older docker image? docker pull sandreas/m4b-tool:2022-11-05 |
I'm still running into this. I've tried quite a few different methods as mentioned above, but at this point if I need to combine my mp4's into a m4b, how would I do that outside of m4b-tool? """ |
Which docker image are you using? In newer images / recent versions of |
The latest docker image was from around 2 months ago it looks so, so I do have and am using version I'm getting this error still:
|
Mhh, that is strange. Well, I'll investigate this again, may take a while. I already was going to provide another file iterator using system tools like |
No problem - I completely agree, it's core functionality that app developers should easily be able to access without you having to do a this much work on your side. For working around the files not always being picked up I have been using this. #!/bin/bash
audiobooks_path="/mnt/a/audiobooksm4b/"
# Loop over each audiobook folder
for audiobook_folder in "${audiobooks_path}"/*/
do
# Print out the name of the audiobook folder
echo "Merging files in ${audiobook_folder}..."
# Get the audiobook name
audiobook_name="$(basename "${audiobook_folder}")"
# Get the list of mp4 files in the audiobook folder
mp4_files=$(ls -1v "${audiobook_folder}"*.mp4)
# Replace audiobooks_path with "./" in each mp4 file path
mp4_files=$(echo "$mp4_files" | sed "s|${audiobook_folder}|./|g")
# Wrap each mp4 file path in quotes
mp4_files=$(echo "$mp4_files" | awk '{printf "\"%s\" ", $0}')
# Run the m4b-tool Docker container to merge the MP4 files
docker_cmd="docker run -it --rm -u $(id -u):$(id -g) -v \"${audiobook_folder}\":/mnt sandreas/m4b-tool:latest merge ${mp4_files} --output-file \"./${audiobook_name}.m4b\" --jobs $(nproc --all)"
echo "$docker_cmd"
eval "$docker_cmd"
done Though, I still found I had to check the outputs of the chapters to make sure they matched, as sometimes m4b-tool would make the m4b skipping mp4 files but still creating the m4b. So i'm working around that with this: https://github.com/kanjieater/AudiobookTextSync/blob/master/merge.py |
I'm not sure if this is an issue with WSL2 as mentioned in #204 or something else.
#204 (comment)
I can run the same command with the docker and get inconsistent results. I'm not sure what this error indicates
I'm simply running a merge command with jobs matching my core count.
docker run -it --rm -u $(id -u):$(id -g) -v "$FOLDER":/mnt sandreas/m4b-tool:latest merge "./$(echo $NAME)_splitted/" --output-file="./$NAME.m4b" --jobs=$(nproc --all)
The text was updated successfully, but these errors were encountered: