-
-
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
m4b-tool doesn't convert on RPi #156
Comments
I updated to the latest docker build and while it still doesn't work I am getting a different error. INFO 1ms m4b-tool development, OS: Linux (Welcome to Alpine Linux 3.14 |
The docker isn't built for arm64, you'd have to ask @sandreas to make a build for that. Currently only amd64 and M1 are supported, as I recall. |
Thanks for the info djdembeck. I did however also try install it manually without docker and I still got the same issue. If that's the case, @sandreas could you make a docker build that supports arm64? |
I have to investigate this... very busy atm but I'll try. |
I'm also getting this error (as far as I can tell) |
I am also getting this exact message on a RPi device as well: could not convert /Chapter 01.mp3 to ./Chapter 01-finished.m4b It seems similar to this issue but I don't think I am using Musicbrainz: Would be grateful if anyone has any progress or a solution to share. Thanks! |
Well, there might be a problem with the
So, a solution might be to use an Line 1 in 06c897d
docker build . --build-arg FFMPEG_IMAGE=linuxserver/ffmpeg --build-arg FFMPEG_PATH=/usr/local/bin/ffmpeg -t m4b-tool If https://github.com/eugeneware/ffmpeg-static/releases/tag/b5.0 Probably the
Important Note: I did not test this yet, it is a possible solution and may require some work to fix |
Thank you for the response. I am pretty new to all these audio encoding tools, but I do remember that I had compiled my own version of ffmpeg, lib-fdkacc, and fdkacc using the following instructions from these links:
However, I was unaware that these came pre-compiled. Thanks for the link. I will try this out and report back if it resolves the problem. |
@krejko You may be very lucky, because @wader reported today, that his new |
Ok, I'll updated the |
I just cloned a new version of the repository and was trying to set up the docker container. However, I am encountering the following error. Appears to be related to static-ffmpeg incompatibility with arm. @sandreas @wader any ideas why this might be happening? Thanks in advance pi@pi:~/m4b-tool$ sudo docker build . -t m4b-tool Edit: I am seeing in this post that static-ffmpeg has only added arm64 and not armv7(?: not 100% sure on the naming of the 32bit arm arch). But I do know I am not running the 64 bit version of the PI operating system. Are there any plans for non-64 bit architectures to be added? |
@krejko docker build . --build-arg FFMPEG_IMAGE=linuxserver/ffmpeg --build-arg FFMPEG_PATH=/usr/local/bin/ffmpeg -t m4b-tool If so, I'll update the docs. |
Ah. I started to try then and got distracted. I will be traveling for the next week and a half but will try it when I have access to my pi when I get home. Sorry for the delay. |
No reason to say sorry :-) Your feedback helps a lot to improve the project. Thank you. |
I've just tested this out on an arm/v7 (QNAP), it works, thanks. Edit: Ah, I will not error, but it won't work either, because there's apparently no support for 32bit? Ok. |
Here is another one: https://hub.docker.com/r/collelog/ffmpeg. This should be the best alternative, because it is configured to use @wader Maybe it is wouth taking a look at https://github.com/collelog/ffmpeg? Looks pretty good to me and has nearly every arch that is available right now.
If this does not work, be sure to choose the correct platform (https://hub.docker.com/r/collelog/ffmpeg/tags):
|
I've tried out the Log
|
There is a new version of I'll try to update the If this does not work, probably I have to report this to @enzo1982, the maintainer of the new This may be a hint: https://stackoverflow.com/questions/4672152/call-of-overloaded-function-is-ambiguous |
I updated the
|
Thank you very much for your feedback. I also tried it on x64 and it worked. I think we can now close this issue :-) |
Sorry to reopen this, but just in case there's any confusion, I didn't mean to indicate that the original issue is resolved on a 32-bit ARM, only that I was able to compile successfully at that point. Now, upon testing the tool against some real mp3 files, I now get the same error as the original poster here #156 (comment)
|
If there is still a problem, the issue has to be reopened :-) No reason to say sorry. I'm unhappy that I do not have a "machine" to reproduce this. Could you provide the whole command you ran? (you can x out filenames and other personal data) |
Here you go Output Log
Maybe I could set you up with an SSH-able user on my NAS? If it makes sense to try, hit me up over email, it's in my bio. |
I have used the above docker build command and I believe that it has built successfully... I am able to run the version command without issue. pi@pi$ m4b-tool --version However, when I actually try to do a merge, I am still getting the following error: could not convert /mp3merge/book/Chapter 01.mp3 to /tmp/m4b-tool/02-finished.m4b Is it possible this still related to the architecture? I am having difficulty understanding from this error message what the problem may be. The command I am using to run the job is:
|
@sandreas hey! Intreresting, will have closer look later, on bike vaction at the moment. Looks like they do emulated builds with docker buildx? If fear build times will be to long for static-ffmpeg with github actions if we want to include rust-based things |
Maybe there still IS a problem. Unfortunately the error message of
@wader Would this be a problem? I think that having a build that works would be good, even if the build times are bad or the version is not totally up to date? What do you think? |
Main concern is that the standard github action runners have a max job execution time of 6h, and last time i tried do a emulated build on my intel macbook it took 23h. I'll see if i can do a test build for armv7 etc on a standard runner and see how it goes, maybe it has lots of more cpus? But yes would be great if it worked even if slow. |
@sandreas we ended up talking and trying some things in this PR wader/static-ffmpeg#204 the last comments might be interesting to you |
Great, thank you. I'll keep an eye on it. |
@wader I ended up using your @xtinct101, @krejko, @vakrolme, @rabelux, @djdembeck There is a new "official" (still experimental) docker multiarch image and SHOULD work on
docker pull sandreas/m4b-tool:latest In the near future, it will use tagging based on my new project I need your help: Try out the new docker image and give feedback, so that we can get to a production ready release as soon as possible. Feel free to reopen. |
@sandreas 👍 No problem Problem with multi-arch, docker buildx or other "userland" emulated builds are that they are very slow and resources intensive. But it might work fine in your case to strip away most things. BTW i've summerised the multi-arch issue and possible ways for a more modular here wader/static-ffmpeg#217 wader/static-ffmpeg#216 |
If you only need ffmpeg without any or few dependecies and it seems to build fine with emulation for all the archs you need i would suggest you go that path. Maybe also make sure that resulting binary is not super slow for some reason. Do you mostly transmux or also transcode? transmux is usually mostly shuffle bytes around so IO-bound anyway. |
Great thanks
Cool, nice resource, good to know someone very experienced onboard. |
no mostly mp3 to fdkaac |
Aha ok, then maybe worth testing performance BTW tone looks useful. I do some mangling of media files from time to time to use in various mp3 players etc. Have you seen https://github.com/wader/fq? might be interesting to debug media files, was the reason it was created :) |
I had that in mind, but for audio encoding / decoding it is far less important than for video (still I think it is something to investigate further)
Thanks :-) I plan to extend its functionality in the near future.
Uh, nice. That thing could help debug a known issue of tone, that prevents me from removing |
@sandreas Hey, not sure what the ffmpeg siutation is for m4b-tools atm, but there is an interesting fork of static-ffmpeg at https://github.com/ffbuilds that might interest you. I'm not the main person behind it but i'm trying to help out and I hope it can lead to nicer multi arch builds. |
@wader Thank you, looks interesting. Until now I had no issues going I recently found a pretty neat way to run commands that depend on the arch in alpine: |
Great to hear! i'm still a little skeptic to emulated builds for the things i use ffmpeg for, is important things end up using the correct optimizations etc. But think i will try figure some way to verify that the emulated build are correct, would be nice.
Neat 📸 |
I just got back to this 32-bit ARM issue recently.
I only see amd64 version on DockerHub. Am I looking at the wrong place somehow, @sandreas? What's the current way to get it running on a 32-bit ARM? I see tone has those ARM builds, but I specifically need the merge function which m4b-tool has, but tone only lists among "future plans". Thanks! |
@vakrolme There was a huge issue in building the whole tree of images ( Learned a lot, thanks for pointing this out (I totally missed it because I use x64 everywhere) and now it SHOULD work on other platforms... Unfortunately I cannot test it - because I just have x64 :-) |
@sandreas you can use docker to test arm images on x86 etc, should work fine. Running binaries emulated is usually fine, its mostly build systems that get confused by the leaky emulation |
Thank you. I know but currently I'm just too busy to dig too much into this. I had to trick gh-actions a bit and build every arch separately - then build a multiarch image by just copying the static binaries... This might be unhandy, complicated and slow, but it seems to work, see https://github.com/sandreas/dockerhub-builds/blob/main/ffmpeg/5.0.1-3/Dockerfile :-) |
This is what happened when I ran the new Docker image on an arm/v7:
UPD: There's a slight chance I left some prev failed installation somewhere on my system, and when I hit |
Ok, then it seems not to work as expected... I'll have a look, atm I'm a bit busy, but in the next days I should have some time to investigate this. |
Hello,
I've been using m4b-tool for some time on my debian VM and it works like a charm.
In an effort to move it from my VM and have it online 24/7, I installed it on my RPi 4.
I used the docker install, I validated the m4b using;$(id -u):$ (id -g) -v "$(pwd)":/mnt m4b-tool --version
docker run -it --rm -u
returns:
m4b-tool v.0.4.2
But when I try to use the merge command, I get this error everytime:
`== load input files ==
reading metadata and streaminfo for file /mnt/test/test.mp3
ffmpeg -hide_banner -i /mnt/test/test.mp3 -f ffmetadata -
/usr/local/bin/ffmpeg: line 1: syntax error: unexpected "("
/usr/local/bin/ffmpeg: line 1: syntax error: unexpected "("
ffmpeg -hide_banner -i /mnt/test/test.mp3 -f null -
/usr/local/bin/ffmpeg: line 1: syntax error: unexpected "("
/usr/local/bin/ffmpeg: line 1: syntax error: unexpected "("
cover not found or not specified
searching for description.txt in test
checking file test/description.txt, realpath:
file description.txt not found or too big
preparing conversion with 4 simultaneous jobs, please wait...
0 remaining / 1 total, preparing next task |
could not convert /mnt/test/test.mp3 to test-tmpfiles/1-test-finished.m4b
trace: #0 phar:///usr/local/bin/m4b-tool/src/library/M4bTool/Command/MergeCommand.php(479): M4bTool\Command\MergeCommand->convertInputFiles()
#1 phar:///usr/local/bin/m4b-tool/src/library/M4bTool/Command/MergeCommand.php(362): M4bTool\Command\MergeCommand->processInputFiles()
#2 phar:///usr/local/bin/m4b-tool/src/library/M4bTool/Command/MergeCommand.php(194): M4bTool\Command\MergeCommand->processFiles()
#3 phar:///usr/local/bin/m4b-tool/vendor/symfony/console/Command/Command.php(255): M4bTool\Command\MergeCommand->execute()
#4 phar:///usr/local/bin/m4b-tool/vendor/symfony/console/Application.php(908): Symfony\Component\Console\Command\Command->run()
#5 phar:///usr/local/bin/m4b-tool/vendor/symfony/console/Application.php(269): Symfony\Component\Console\Application->doRunCommand()
#6 phar:///usr/local/bin/m4b-tool/vendor/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun()
#7 phar:///usr/local/bin/m4b-tool/bin/m4b-tool.php(32): Symfony\Component\Console\Application->run()
#8 /usr/local/bin/m4b-tool(10): require('phar:///usr/loc...')
#9 {main}`
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: