Closed Kriegbaum closed 10 months ago
Hi, It seems that these AVPixelFomat are specific for ffmpeg on rasperry pi (https://github.com/shantigilbert/Embylogic/blob/master/packages/multimedia/ffmpeg/patches/rpi4-hevc/ffmpeg-001-pfcd_hevc_optimisations.patch here apparently). Does it work if you change the pixel.rs file and add the values in the enum, a bit like this PR does https://github.com/zmwangx/rust-ffmpeg/pull/60/files#diff-f9150192df441c0071988ac35697c7739854b75cbbd46bc884a36394830b7874R102 ?
On a side-note, bliss' analysis is pretty heavy on the CPU, so depending on the number of songs you have in your library, you might want to analyze them on a tougher CPU, then transfer ~/.local/share/bliss-rs/songs.db
to your raspberry pi and use blissify without analyzing everything again. (though the song's paths must match)
I got it! Looks like there was an 'rpi' compile flag that needed to be set somewhere. I've done a little bit of rust coding but its been a while since I've touched the environments so I just removed the check haha.
Definitely not pretty but got me the binary I was looking for.
Analyzing 11799 songs, this might take some time…
We shall see how the RPI handles this
Surprisingly, MPD and Snapcast can run uninterrupted in the background while this churns away! Those services often lock and stutter when I'm doing heavy lifting with this little machine
Hi, I've taken a deeper look, and turns out there's actually a flag for compiling ffmpeg on raspberry pis, as you said :smile:
I've made some adjustments so you can actually use it while installing blissify - it should be as simple as running cargo install blissify --features=ffmpeg-next/rpi
.
Hope that works for you!
closing this - feel free to reopen if your issue hasn't been solved :)
I'm hitting the same problem while trying to compile on an rpi. Same error E0004.
Your workaround doesn't seem to be working either. Anything else I can try out?
pi@cookie:~/.cargo/bin $ cargo install blissify --features=ffmpeg-next/rpi
Updating crates.io index
Installing blissify v0.3.5
error: failed to compile blissify v0.3.5
, intermediate artifacts can be found at /tmp/cargo-installOS5GmL
Caused by: none of the selected packages contains these features: ffmpeg-next/rpi
Hi, thanks for reporting :)
I updated bliss / blissify, and you should now be able to do cargo install blissify --features=bliss-audio/rpi
. Hope that fixes it!
Hi, I am very much looking forward to using this however am running into problems compiling on my RPi4. Error data from build below:
error[E0425]: cannot find value AV_PIX_FMT_RPI
in this scope --> /home/pi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ffmpeg-next-6.0.0/src/util/format/pixel.rs:1213:271213 Pixel::RPI => AV_PIX_FMT_RPI, ^^^^^^^^^^^^^^ help: a unit variant with a similar name exists: AV_PIX_FMT_0RGB
::: /tmp/cargo-installPWnJQZ/release/build/ffmpeg-sys-next-720654b8f40ecd85/out/bindings.rs:5730:5 | 5730 | AV_PIX_FMT_0RGB = 120, | --------------- similarly named unit variant
AV_PIX_FMT_0RGB
defined here
Can anyone assist to resolve ?
Thanks in advance
Hi
$ cargo install --features=ffmpeg-next/rpi
error: none of the selected packages contains these features: ffmpeg-next/rpi
so that I could install blissify-rs
I had to add ffmpeg-next
with the command cargo add ffmpeg-next
.
After that everything worked as desired.
Best AlteSocke
Hi,
I've just updated some of blissify's dependencies - does cargo install blissify --features=bliss-audio/rpi
work out of the box?
I don't have a raspberry pi, so I can't test myself, but it should work 🤞
Hi @Polochon-street
sadly it fails on ffmpeg-next
Here the procedure on a fresh raspi 3 debian bullseye
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
apt install -y clang libavcodec-dev libavformat-dev libavutil-dev pkg-config
cargo install blissify --features=bliss-audio/rpi
failed because of missing `libavfilter`
apt install libavfilter-dev
cargo install blissify --features=bliss-audio/rpi
failed because of missing `libavdevice`
apt install libavdevice-dev
cargo install blissify --features=bliss-audio/rpi
failed because of missing `ffmpeg-next`
cargo error output
[...]
Compiling tempdir v0.3.7
Compiling ndarray-stats v0.5.1
error[E0425]: cannot find value `AV_PIX_FMT_RPI` in this scope
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ffmpeg-next-6.1.0/src/util/format/pixel.rs:1252:27
|
1252 | Pixel::RPI => AV_PIX_FMT_RPI,
| ^^^^^^^^^^^^^^ help: a unit variant with a similar name exists: `AV_PIX_FMT_0RGB`
|
::: /tmp/cargo-installm5PIL6/release/build/ffmpeg-sys-next-86a89553036e5246/out/bindings.rs:3:174597
|
3 | ...MT_CUDA = 119 , AV_PIX_FMT_0RGB = 120 , AV_PIX_FMT_RGB0 = 121 , AV_PIX_FMT_0BGR = 122 , AV_PIX_FMT_BGR0 = 1...
| --------------- similarly named unit variant `AV_PIX_FMT_0RGB` defined here
For more information about this error, try `rustc --explain E0425`.
error: could not compile `ffmpeg-next` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `blissify v0.3.7`, intermediate artifacts can be found at `/tmp/cargo-installm5PIL6`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
try a other way...
git clone https://github.com/Polochon-street/blissify-rs.git
cd blissify-rs
~/.cargo/bin/cargo build --features=bliss-audio/rpi
error: could not compile `ffmpeg-next` (lib) due to previous error
~/.cargo/bin/cargo add ffmpeg-next
~/.cargo/bin/cargo build --features=bliss-audio/rpi
same error:
[...]
Compiling rcue v0.1.3
Compiling humantime v2.1.0
error[E0425]: cannot find value `AV_PIX_FMT_RPI` in this scope
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ffmpeg-next-6.1.0/src/util/format/pixel.rs:1252:27
|
1252 | Pixel::RPI => AV_PIX_FMT_RPI,
| ^^^^^^^^^^^^^^ help: a unit variant with a similar name exists: `AV_PIX_FMT_0RGB`
|
::: /root/blissify-rs/target/debug/build/ffmpeg-sys-next-a3e9d3125c441cbb/out/bindings.rs:3:174597
|
3 | ...MT_CUDA = 119 , AV_PIX_FMT_0RGB = 120 , AV_PIX_FMT_RGB0 = 121 , AV_PIX_FMT_0BGR = 122 , AV_PIX_FMT_BGR0 = 1...
| --------------- similarly named unit variant `AV_PIX_FMT_0RGB` defined here
[...]
error: could not compile `ffmpeg-next` (lib) due to previous error
~/.cargo/bin/cargo clean
~/.cargo/bin/cargo build --features=bliss-audio/rpi --features=ffmpeg-next/rpi
same `ffmpeg-next` error
~.cargo/bin/cargo install blissify --features=bliss-audio/rpi --features=ffmpeg-next/rpi
again a `ffmpeg-next` error
error: failed to compile `blissify v0.3.7`, intermediate artifacts can be found at `/tmp/cargo-installSYrFS6`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Caused by:
none of the selected packages contains these features: ffmpeg-next/rpi
Best AlteSocke
Greetings!
There is a ticket open against rust-ffmpeg related to this:
115 - Handle unsupported pixel formats properly
https://github.com/zmwangx/rust-ffmpeg/pull/114
Cheers
Phil...
Hi,
Thanks for the heads-up. I managed to find a Raspberry Pi 4B and try it out, and it seems that doing cargo install blissify
(without the feature) works - I could do blissify init
and blissify playlist
just fine.
Could you try it out? Otherwise I'll see what I can do to reproduce.
Hi Polochon-streeet
I still experience failure using 'cargo install blissify'
Error log as follows:
error[E0004]: non-exhaustive patterns: sys::AVPixelFormat::AV_PIX_FMT_SAND128
,sys::AVPixelFormat::AV_PIX_FMT_SAND64_10
,sys::AVPixelFormat::AV_PIX_FMT_SAND64_16
and 2 more not covered --> /home/pevans68/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ffmpeg-next-6.1.0/src/util/format/pixel.rs:480:15480 match value { ^^^^^ patterns sys::AVPixelFormat::AV_PIX_FMT_SAND128
,sys::AVPixelFormat::AV_PIX_FMT_SAND64_10
,sys::AVPixelFormat::AV_PIX_FMT_SAND64_16
and 2 more not covered
note: sys::AVPixelFormat
defined here --> /tmp/cargo-installdmpFsK/release/build/ffmpeg-sys-next-224e96039c8ada5c/out/bindings.rs:5608:15608 pub enum AVPixelFormat { ^^^^^^^^^^^^^^^^^^^^^^ = note: the matched value is of type sys::AVPixelFormat
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms751 ~ AV_PIX_FMTY210LE => Pixel::Y210LE, 752 ~ => todo!(),
Regards
Phil...
@Polochon-street I tested it with a Raspberry 3b. @Phil-BKK I had the same error while I test on Rapberry 5!
Hi
Running RPiOS 11 Bullseye. double loaded with Moode & Plexamp
Phil...
There was some issue on the rust-ffmpeg side, but it should be fixed now - I managed to reproduce and fix on a rasperry pi. Could you try to build the version 0.3.8 of the crate (the latest)? I bumped rust-ffmpeg, bliss and blissify, so it should be all good.
It does depend how ffmpeg was compiled for your raspberry pi, if ffmpeg -version|grep rpi
yields a line with --enable-rpi
, then you need the --features=rpi
, otherwise you shouldn't use it (if you use it and ffmpeg hasn't been compiled with rpi support, it'll not build properly).
Hopefully it'll work now! 🤞
Hi Polochon-street
It has now built okay. A couple of observations:
checking ffmpeg version for rpi features netted no result, however build still failed
enabling '--features=rpi' allowed the compile progress untill almost complete, then failed on ' cannot find -lsqlite3'
installing sqlite via sudo apt-get install libsqlite3-dev
and compile completed fully
thanks for your assistannce and perserverence
regards
Phil...
Hi @Polochon-street
I can confirm that it works on Raspberry Pi 5 with command: carogo install blissify --features=rpi
It is also possible to read out and update the database.
Thank you very much!
Best
AlteSocke
Awesome! Thank you guys for your patience, I also completed the README with the proper dependencies. Cheers!
Hi On rpi 4 running volumio latest beta
cargo install --features=rpi blissify
error[E0004]: non-exhaustive patterns: `sys::AVPixelFormat::AV_PIX_FMT_RPI` not covered
--> /home/volumio/.cargo/registry/src/index.crates.io-1cd66030c949c28d/ffmpeg-next-.0.2/src/util/format/pixel.rs:481:15
481 match value { ^^^^^ pattern `sys::AVPixelFormat::AV_PIX_FMT_RPI` not covered
note: `sys::AVPixelFormat` defined here
--> /tmp/cargo-installFVYmjS/release/build/ffmpeg-sys-next-b525e8aeeb6cefc5/out/bindings.rs:5478:15478 | pub enum AVPixelFormat { 5600 | AV_PIX_FMT_RPI = 120, -------------- not covered
= note: the matched value is of type `sys::AVPixelFormat`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
838 ~ AV_PIX_FMT_RPI4_10 => Pixel::RPI4_10,
839 ~ sys::AVPixelFormat::AV_PIX_FMT_RPI => todo!(),
Compiling extended-isolation-forest v0.2.3
Compiling indicatif v0.17.8
For more information about this error, try `rustc --explain E0004`.error: could not compile `ffmpeg-next` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `blissify v0.4.1`, intermediate artifacts can be found at `/tmp/cargo-installFVYmjS`.
To reuse those artifacts with a future compilation, set the environment variable
Model : Raspberry Pi 4 Model B Rev 1.2 Linux volumio 6.1.69-v7l+ armv7l GNU/Linux
As follow-up on what chourmovs mentioned. Tried with: cargo install blissify --features=ffmpeg-next/rpi cargo install blissify --features=bliss-audio/rpi
The latter brought me the farst, however the it errored out on a certain error in a ffmpeg folder in error.rs. Mentioned i8 and it should be u8. Modified it but then errored out on the next error, can't recall the exact error. Finally gave up after 3 hours.
Hi,
Thank you for reporting :)
Could I get the output of ffmpeg -version
? Trying to figure out which version you guys are using
volumio@rpi4-argon:~$ ffmpeg -version ffmpeg version 4.1.11-0+deb10u1+rpt1 Copyright (c) 2000-2023 the FFmpeg developers built with gcc 8 (Raspbian 8.3.0-6+rpi1) configuration: --prefix=/usr --extra-version=0+deb10u1+rpt1 --toolchain=hardened --incdir=/usr/include/arm-linux-gnueabihf --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-neon --enable-rpi --enable-vout-drm --enable-v4l2-request --enable-libudev --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --libdir=/usr/lib/arm-linux-gnueabihf --cpu=arm1176jzf-s --arch=arm libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100
This is an old(er) ffmpeg version, is it possible for you to update it?
If not, the way to go would be to try and fix the output of cargo install --features=rpi blissify
.
What happens if you go to /home/volumio/.cargo/registry/src/index.crates.io-1cd66030c949c28d/ffmpeg-next-.0.2/src/util/format/pixel.rs
, and change add the suggested line sys::AVPixelFormat::AV_PIX_FMT_RPI => todo!(),
?
Wondering if it will compile then.
@Polochon-street more context for your info : https://community.volumio.com/t/smartqueue-plugin/67801
Can't update any seeded part of Volumio, as this will break OTA. It';s still a music player :-) Added:
Compiled successful with 1 warning:
Finished `release` profile [optimized] target(s) in 7m 23s
warning: the following packages contain code that will be rejected by a future version of Rust: mpd v0.0.12
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
Installing /home/volumio/.cargo/bin/blissify
Installed package `blissify v0.4.1` (executable `blissify`)
Same problems for the CM4. Added:
After skimming through the context link you provided, is a successful build (like those above) enough for you guys?
It looks like that version of ffmpeg is not an official version, but specific to volumio / the raspberry pi, so I don't think it could make it to the main rust-ffmpeg
repo (at least I couldn't find any traces of e.g. AV_PIX_FMT_RPI
in the official ffmpeg repo or on google)
Hi Polochon, Yes today I've in hand several versions successfully build on different host/arch by wheaten or I, certain after having manually altered /home/volumio/.cargo/registry/src/index.crates.io-1cd66030c949c28d/ffmpeg-next-.0.2/src/util/format/pixel.rs (for RPI)
I've also crosscompiled a RPI version from source from my non RPI ARMV7l host (tinkerboard running volumio) using
rustup target add armv7-unknown-linux-gnueabihf
cargo build --target=armv7-unknown-linux-gnueabihf --release
that work on RPI 4/5 apparently without --features=rpi blissify, any file alteration or whatever ...
based on this success, I now try to make a github workflow to build every arch, RPI and not RPI, but I don't succeed for the moment
Hi! I'm trying to get this up and running on a raspberry pi as the title suggests. I've gone through a lot of dependencies, and at this point I've hit two issues with compiling. One I could fix and one I could not.
Taking the compiler's suggestion of changing i8 to u8 cleared that one
now I've hit this:
Any idea where to look to fix this?