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

Docker continaer on Raspberry Pi has a bad ffmpeg binary #27

Open
apastuszak opened this issue Jul 3, 2019 · 27 comments
Open

Docker continaer on Raspberry Pi has a bad ffmpeg binary #27

apastuszak opened this issue Jul 3, 2019 · 27 comments

Comments

@apastuszak
Copy link

I used docker compose to build a koozic docker image and container and got it fire up and I could log in. But koozic will not play any music.

When I went into the console for the container and tried to run ffmpeg, I get the following error.

root@a59536472f3d:/# ffmpeg bash: /usr/local/bin/ffmpeg: cannot execute binary file: Exec format error

This seems to be indicative of an x86/x64 binary in an arm container.

Is it possible to completely disable any kind of transcoding and just have koozic play the file as-is?

@DocMarty84
Copy link
Owner

DocMarty84 commented Jul 3, 2019 via email

@apastuszak
Copy link
Author

Ok, changed the Audio API to Web Audio API and turned on No Transcoding. Music still won't play.

@DocMarty84
Copy link
Owner

DocMarty84 commented Jul 3, 2019 via email

@apastuszak
Copy link
Author

I did that and stopped and started the container. Is there some kind of logging I can enable?

@DocMarty84
Copy link
Owner

DocMarty84 commented Jul 3, 2019 via email

@apastuszak
Copy link
Author

apastuszak commented Jul 4, 2019

There is nothing useful in the standard output. Here is what I am seeing now:

If I add anything to the playlist I have set not to transcode, it seems to play fine. If I just browse my library and click on a track to play, the HTML5 player "loads" the file, but it never plays.

And nothing will play using any iOS subsonic client I tried. Is there any way to tell koozic to never transcode any files that are played, regardless of how they're played, system-wide?

@DocMarty84
Copy link
Owner

DocMarty84 commented Jul 5, 2019 via email

@apastuszak
Copy link
Author

I would prefer if it never transcoded. I have a mix of MP3 and M4A files and I would prefer they be sent "as-is." But you're not writing this for me, you're writing it for you.

And don't apologize for anything. You wrote something and gave it away for free. In my book, you win always.

@DocMarty84
Copy link
Owner

Thanks for the support 😉

Indeed I wrote it for me, but it's better if it can be useful to others. I'll have a look to make the "No Transcoding" a possible default option. I just need to think of a clear way to make it available for end users, since I want to keep the interface as simple as possible.

I'll work on it at the beginning of August and keep you posted.

@apastuszak
Copy link
Author

apastuszak commented Jul 6, 2019 via email

@peguerosdc
Copy link

Hi! A "no transcoding" option would be great as I am facing this exact same issue on my ARM device. If you end up implementing this option, please do keep us posted :)
By the way, I still can't play tracks directly even after changing the "Configuration > Transcoders" option as you suggested, but I do when playing from a playlist after setting "No Transcoding" as the Audio Mode. Just FYI.

@DocMarty84
Copy link
Owner

@peguerosdc Are you also using Docker?

@peguerosdc
Copy link

@DocMarty64 yes

@apastuszak
Copy link
Author

apastuszak commented Jul 17, 2019 via email

@DocMarty84
Copy link
Owner

Yes, that's what I'm planning to do.

@DocMarty84
Copy link
Owner

Hello,

At the moment, the ffmpeg binary is shipped with KooZic. This is for historical reasons, but now it doesn't make sense anymore: we could use the binary provided in the repositories. However, something confuses me: if one uses Docker on a RPi with Ubuntu 18.04 as a guest system, would ffmpeg provided by apt work on such a configuration?

DocMarty84 added a commit that referenced this issue Aug 1, 2019
Use the ffmpeg binary from the apt repository when building the Docker
image.

We also add some minor information on the docker-compose file and the
README.

Related to #27
@DocMarty84
Copy link
Owner

DocMarty84 commented Aug 1, 2019

It is implemented in DocMarty84/oomusic@21e40e6 ('Disable Transcoding')

Capture du 2019-08-01 15-50-36

When the option is activated, transcoding is completely deactivated for both web application of Subsonic API.

Please note that in the final release (target: v2.2.0), this option will displayed only debug mode since it is an advanced configuration. To display it, you'll have to add ?debug in the url: http://<my_host>/web?debug (see the url in the screenshot)

@apastuszak
Copy link
Author

apastuszak commented Aug 1, 2019 via email

@DocMarty84
Copy link
Owner

Please note it is not released yet. I expect to release a new beta with this feature by the end of the week.

@apastuszak
Copy link
Author

apastuszak commented Aug 1, 2019 via email

@DocMarty84
Copy link
Owner

v2.2.0-beta.4 has been released: https://github.com/DocMarty84/koozic/releases/tag/v2.2.0-beta.4

As mentioned earlier, the option appears only in debug mode:

Capture du 2019-08-01 22-43-10

@apastuszak
Copy link
Author

Trying to build this on Raspbian and I am getting this after I run docker-compose build

+ apt-get install -y --no-install-recommends -qq adduser build-essential ffmpeg libtag1-dev lsb-base mediainfo python3-babel python3-chardet python3-dateutil python3-decorator python3-dev python3-docutils python3-feedparser python3-gevent python3-html2text python3-jinja2 python3-libsass python3-lxml python3-mako python3-mock python3-passlib python3-pil python3-pip python3-psutil python3-psycopg2 python3-pydot python3-pyldap python3-pyparsing python3-pypdf2 python3-qrcode python3-reportlab python3-requests python3-setuptools python3-suds python3-tz python3-vatnumber python3-vobject python3-werkzeug python3-wheel python3-xlsxwriter python3-yaml wget E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.3_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/o/openssl/openssl_1.1.1-1ubuntu2.1~18.04.3_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/glib2.0/libglib2.0-0_2.56.4-0ubuntu0.18.04.3_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/t/tzdata/tzdata_2019a-0ubuntu0.18.04_all.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libd/libdrm/libdrm-common_2.4.95-1~18.04.1_all.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libd/libdrm/libdrm2_2.4.95-1~18.04.1_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux/linux-libc-dev_4.15.0-54.58_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/w/wavpack/libwavpack1_5.1.0-2ubuntu1.3_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/universe/z/zeromq3/libzmq5_4.2.5-1ubuntu0.1_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/m/mesa/libglapi-mesa_18.2.8-0ubuntu0~18.04.2_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libd/libdrm/libdrm-amdgpu1_2.4.95-1~18.04.1_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libd/libdrm/libdrm-etnaviv1_2.4.95-1~18.04.1_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libd/libdrm/libdrm-freedreno1_2.4.95-1~18.04.1_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libd/libdrm/libdrm-nouveau2_2.4.95-1~18.04.1_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/libd/libdrm/libdrm-radeon1_2.4.95-1~18.04.1_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/m/mesa/libgl1-mesa-dri_18.2.8-0ubuntu0~18.04.2_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/m/mesa/libglx-mesa0_18.2.8-0ubuntu0~18.04.2_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/o/openldap/libldap-common_2.4.45+dfsg-1ubuntu1.2_all.deb 404 Not Found [IP: 91.189.88.150 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/o/openldap/libldap-2.4-2_2.4.45+dfsg-1ubuntu1.2_armhf.deb 404 Not Found [IP: 91.189.88.150 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? ERROR: Service 'app' failed to build: The command '/bin/sh -c set -x; apt-get install -y --no-install-recommends -qq adduser build-essential ffmpeg libtag1-dev lsb-base mediainfo python3-babel python3-chardet python3-dateutil python3-decorator python3-dev python3-docutils python3-feedparser python3-gevent python3-html2text python3-jinja2 python3-libsass python3-lxml python3-mako python3-mock python3-passlib python3-pil python3-pip python3-psutil python3-psycopg2 python3-pydot python3-pyldap python3-pyparsing python3-pypdf2 python3-qrcode python3-reportlab python3-requests python3-setuptools python3-suds python3-tz python3-vatnumber python3-vobject python3-werkzeug python3-wheel python3-xlsxwriter python3-yaml wget && apt-get clean -qq' returned a non-zero code: 100

@apastuszak
Copy link
Author

Fixed the issue by removing ffmpeg from line 22 of the Dockerfile

@DocMarty84
Copy link
Owner

DocMarty84 commented Aug 3, 2019

This is because apt-get update was not run beforehand, and Docker used the image already built up to this step:

ARG DEBIAN_FRONTEND=noninteractive

I'm pretty sure you wouldn't have had the issue if the Docker image cache was cleared. By removing the ffmpeg line, Docker re-used a previously built image.

It should be solved in b029a30

By the way, how does the no-transcoding feature works?

Note: by installing FFMpeg through apt, the right ffmpeg binary should be used. In the package description, the armhf version seems available, so transcoding should work on the RPi (but probably slow as hell).

@apastuszak
Copy link
Author

apastuszak commented Aug 3, 2019 via email

@apastuszak
Copy link
Author

Subsonic is not working. I tried both AVsub and PlaySub on iOS. AVSub tells me an unknown error occrued and PlaySub pulls down the artist list and then says the server is offline.

@DocMarty84
Copy link
Owner

DocMarty84 commented Aug 3, 2019

A log is needed then.

  • Stop the container: docker-compose stop
  • Modify the entrypoint.sh file to record the logs on a file (logfile and log-level):
# Start koozic
su - koozic -c "/usr/local/koozic/odoo-bin \
                --workers=4 \
                --limit-time-cpu=1800 \
                --limit-time-real=3600 \
                -d koozic-v2 \
                --db-filter=koozic-v2 \
                --db_host=db \
                --db_port=5432 \
                --db_user=koozic \
                --db_password=koozic \
                --without-demo=all \
                --no-database-list \
		--logfile /home/koozic/.local/koozic.log \
                --log-level=info"
  • Rebuild and start: docker-compose up --build
  • Retrieve the container ID: docker ps -a, e.g. abc123 (name: koozic_app:latest)
  • Connect to it: docker exec -ti abc123 /bin/bash
  • Get the log: tail -f /home/koozic/.local/koozic.log

Thanks!

@DocMarty84 DocMarty84 reopened this Aug 15, 2019
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