to counteract all the bs on the web (looking at you AI) about installing VLC player on the rpi zero W to play an audio stream from a url, it is a waste of time, it doesn’t work, and it adds so much garbage to the pi.
instead, i installed mpv, and used that to play the stream to a usb audio stick, (install ALSA for audio abilities, run lsusb to see the device and slot of the item, then select it in dietpi-config, scroll down, choose hw:0,0 Device USB Audio, aplay -l shows the soundcard, card 0 , device 0, speaker-test -D plughw:0,0 -c2 -t sine , that works! )
and I am amazed on how well it works on the tiny rpi zero W
since everyone is sold out of the rpi zero 2w’s i bought the zero for $25 to test it
amazing!
What is the issue you faced with VLC? The RPi package repository even provides an own build to make best use of hardware acceleration.
But aside of that, mpv is surely the lighter Linux CLI first solution, based on solid FFmpeg, which also is served by the RPi repo for best hardware acceleration.
EDIT: Ah, hardware acceleration does not play a role for audio, of course. But in any case the VLC packages from the RPi repo should work well on RPis.
I had installed vlc (and it took forever to download and then install, and it was so heavy, so much crap, when all i needed was a simple audio stream player), then tried cvlc (cmd line version) and it just did nothing.
my frustration with VLC is it is typically the “first” suggestion on all forums related to rpi audio player, and therefore the first in the AI search results also. so after the reward of mpv, i wanted to post here in hopes that it would help others.
Did you try to install it via apt? Seems like VLC and MPV are very equal in size with dependencies. Funnily, MPV is even slightly larger:
root@micha:~# apt install vlc
Installing:
vlc
Installing dependencies:
bubblewrap libflac14 libnfs14 libspeex1 libxcb-image0
fontconfig libfribidi0 libnorm1t64 libspeexdsp1 libxcb-keysyms1
glycin-loaders libgbm1 libogg0 libsrt1.5-gnutls libxcb-present0
glycin-thumbnailers libgdk-pixbuf-2.0-0 libopenjp2-7 libssh-4 libxcb-randr0
libaa1 libgdk-pixbuf2.0-common libopenmpt-modplug1 libswresample6 libxcb-render-util0
libaribb24-0t64 libgl1 libopenmpt0t64 libswscale9 libxcb-render0
libasound2-data libgl1-mesa-dri libopus0 libtag2 libxcb-shape0
libasound2t64 libgles2 libpango-1.0-0 libthai-data libxcb-shm0
libass9 libglib2.0-0t64 libpangocairo-1.0-0 libthai0 libxcb-sync1
libasyncns0 libglvnd0 libpangoft2-1.0-0 libtheora1 libxcb-util1
libavahi-client3 libglx-mesa0 libpcre2-16-0 libtheoradec2 libxcb-xfixes0
libavahi-common-data libglx0 libpgm-5.3-0t64 libtheoraenc2 libxcb-xinerama0
libavahi-common3 libglycin-2-0 libpixman-1-0 libtwolame0 libxcb-xinput0
libavc1394-0 libgme0 libprotobuf-lite32t64 libudfread3 libxcb-xkb1
libavcodec62 libgomp1 libpulse0 libunibreak7 libxcb-xv0
libavformat62 libgpm2 libqt5core5t64 libupnp17t64 libxext6
libavutil60 libgraphite2-3 libqt5dbus5t64 libva-drm2 libxfixes3
libbluray3 libgsm1 libqt5gui5t64 libva-wayland2 libxkbcommon-x11-0
libcairo-gobject2 libgudev-1.0-0 libqt5network5t64 libva-x11-2 libxkbcommon0
libcairo2 libharfbuzz0b libqt5svg5 libva2 libxrender1
libcbor0.10 libhwy1t64 libqt5widgets5t64 libvdpau1 libxshmfence1
libcddb2 libice6 libqt5x11extras5 libvlc-bin libxvidcore4
libchromaprint1 libidn12 librabbitmq4 libvlc5 libxxf86vm1
libcjson1 libinput-bin libraw1394-11 libvlccore9 libz3-4
libcodec2-1.2 libinput10 libresid-builder0c2a libvorbis0a libzmq5
libdatrie1 libixml11t64 librist4 libvorbisenc2 libzvbi-common
libdc1394-25 libjxl0.11 librsvg2-2 libvorbisfile3 libzvbi0t64
libdouble-conversion3 libkate1 libsamplerate0 libvpx12 mesa-libgallium
libdrm-amdgpu1 liblcms2-2 libsecret-1-0 libvulkan1 ocl-icd-libopencl1
libdrm-common liblirc-client0t64 libsecret-common libwacom-common shared-mime-info
libdrm2 libllvm21 libsensors-config libwacom9 vlc-bin
libdvbpsi10 libmatroska7 libsensors5 libwayland-client0 vlc-data
libdvdnav4 libmd4c0 libshine3 libwayland-egl1 vlc-plugin-base
libdvdread8t64 libmp3lame0 libshout3 libwebpmux3 vlc-plugin-qt
libebml5 libmpcdec6 libsidplay2 libx11-xcb1 vlc-plugin-video-output
libegl-mesa0 libmpg123-0t64 libsm6 libx264-165 x11-common
libegl1 libmtdev1t64 libsnappy1v5 libx265-216 xkb-data
libevdev2 libmtp-common libsndfile1 libxcb-dri3-0
libfaad2 libmtp9t64 libsoxr0 libxcb-glx0
libfido2-1 libmysofa1 libspatialaudio2 libxcb-icccm4
Summary:
Upgrading: 0, Installing: 198, Removing: 0, Not Upgrading: 0
Download size: 111 MB
Space needed: 457 MB / 58.2 GB available
root@micha:~# apt install mpv
Installing:
mpv
Installing dependencies:
bubblewrap libfribidi0 libpthreadpool0 libvpx12
fontconfig libgbm1 libpulse0 libvulkan1
glycin-loaders libgdk-pixbuf-2.0-0 librabbitmq4 libwayland-client0
glycin-thumbnailers libgdk-pixbuf2.0-common libraw1394-11 libwayland-cursor0
libasound2-data libglib2.0-0t64 libre2-11 libwayland-egl1
libasound2t64 libglvnd0 librist4 libwebpmux3
libass9 libglycin-2-0 librsvg2-2 libwebrtc-audio-processing-1-3
libasyncns0 libgme0 librubberband3 libx11-xcb1
libavc1394-0 libgomp1 libsamplerate0 libx264-165
libavcodec62 libgraphite2-3 libsensors-config libx265-216
libavdevice62 libgsm1 libsensors5 libxcb-dri3-0
libavfilter11 libharfbuzz0b libserd-0-0 libxcb-present0
libavformat62 libhwy1t64 libshine3 libxcb-randr0
libavutil60 libiec61883-0 libsixel1 libxcb-render0
libbluray3 libjack-jackd2-0 libsnappy1v5 libxcb-shape0
libbs2b0 libjxl0.11 libsndfile1 libxcb-shm0
libcairo-gobject2 liblcms2-2 libsndio7.0 libxcb-sync1
libcairo2 liblilv-0-0 libsord-0-0 libxcb-xfixes0
libcbor0.10 libllvm21 libsoxr0 libxext6
libcdio-cdda2t64 liblua5.2-0 libspa-0.2-modules libxfixes3
libcdio-paranoia2t64 libmp3lame0 libspeex1 libxkbcommon0
libcdio19t64 libmpg123-0t64 libsratom-0-0 libxnnpack0.20241108
libchromaprint1 libmujs3 libsrt1.5-gnutls libxpresent1
libcjson1 libmysofa1 libssh-4 libxrandr2
libcodec2-1.2 libnorm1t64 libswresample6 libxrender1
libcpuinfo0 libogg0 libswscale9 libxshmfence1
libdatrie1 libonnx1l libthai-data libxss1
libdc1394-25 libonnxruntime-providers libthai0 libxv1
libdisplay-info3 libonnxruntime1.23 libtheoradec2 libxvidcore4
libdnnl3.6 libopenal-data libtheoraenc2 libz3-4
libdrm-amdgpu1 libopenal1 libtwolame0 libzimg2
libdrm-common libopenjp2-7 libuchardet0 libzix-0-0
libdrm2 libopenmpt0t64 libudfread3 libzmq5
libdvdnav4 libopus0 libunibreak7 libzvbi-common
libdvdread8t64 libpango-1.0-0 libva-drm2 libzvbi0t64
libebur128-1 libpangocairo-1.0-0 libva-wayland2 mesa-libgallium
libegl-mesa0 libpangoft2-1.0-0 libva-x11-2 ocl-icd-libopencl1
libegl1 libpgm-5.3-0t64 libva2 shared-mime-info
libfftw3-double3 libpipewire-0.3-0t64 libvdpau1 x11-common
libfftw3-single3 libpixman-1-0 libvidstab1.2 xkb-data
libfido2-1 libplacebo360 libvorbis0a
libflac14 libprotobuf-lite32t64 libvorbisenc2
libflite1 libprotobuf32t64 libvorbisfile3
Summary:
Upgrading: 0, Installing: 170, Removing: 0, Not Upgrading: 0
Download size: 128 MB
Space needed: 492 MB / 58.2 GB available
I would prefer MPV as well on Linux, mostly because FFmpeg is anyway almost always installed anyway on any camera/video related Linux system.
But VLC is still a great player in general, like FFmpeg with specific RPi builds provided, definitely no “crap”, and not heavier than MPV if taken from the same package source. So I wouldn’t want your final conclusion stay like this. Maybe you just installed VLC from a different source which focuses more on complete desktop integration, and lacks the RPi specific tuning done by RPi Ltd for the package they provide?
my notes from July 17th show:
sudo apt install --no-install-recommends vlc-bin vlc-plugin-base -y
and then for mpv
sudo apt update && sudo apt install mpv -y
i did not capture the output of the install, so i don’t recall the size, i just remember that the install process of vlc took forever, i thought it was stuck, but the install process of mpv was very fast.
Maybe it was just a temporary network issue. Both are pulled from the same package repository.
But I guess, FFmpeg (or its libraries) were installed already when you installed mpv, so the remaining dependencies were not that much anymore, which is also the main reason I would prefer mpv for this use case.