Viniuau
Posts: 2
Joined: Wed Mar 25, 2020 2:47 am

Re: GIANT UPDATE: Build FFmpeg and mpv – Automatically in 54 Minutes!

Sun May 24, 2020 5:16 am

Still no result. Tried running the script again, but now I get the follow error if I disable DRM v3d (which is giving me screen tearing when disabled)

Code: Select all

libEGL warning: DRI2: failed to authenticate
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
From a Raspberry Pi 4, and for whatever reason the performance is much worse than the software decoding that I had when I compiled from the source.
It seems to much to ask, I'll just go back to VLC for the time being, even if for some weird reason I can't take snapshots from the video.
FFmpeg needs to be compiled with mmal enabled, and then mpv should be compiled with whatever flags they have available for the RPI.
I'll keep testing and messing with it until I get a definitive solution.

rohlik
Posts: 8
Joined: Sun Apr 05, 2020 3:58 pm

Re: GIANT UPDATE: Build FFmpeg and mpv – Automatically in 54 Minutes!

Fri Aug 07, 2020 5:34 pm

Hello guys,
When you playing videos on your RPi via this builded MPV, do you see video playback on TeamViewer client? Because we cannot :?
What is the cause of the problem?

kreativmind
Posts: 1
Joined: Sat Aug 08, 2020 4:02 pm

Re: GIANT UPDATE: Build FFmpeg and mpv – Automatically in 54 Minutes!

Sat Aug 08, 2020 4:10 pm

Any upates to the script for pi4? Is Rpi_mike still around?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13985
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: GIANT UPDATE: Build FFmpeg and mpv – Automatically in 54 Minutes!

Sat Aug 08, 2020 8:21 pm

RPi_Mike last posted at 05 Sep 2019 21:32, but maybe he is still lurking here:

tommyfeelgod
Posts: 5
Joined: Fri Oct 18, 2019 3:27 pm

Re: GIANT UPDATE

Tue Sep 01, 2020 6:05 am

The New Way





Hallo an alle hier im Forum



fresh install raspian os



htop shows 15 % an



high quality

Let go


Code
sudo apt -y install autoconf automake build-essential cmake doxygen git graphviz imagemagick libasound2-dev libass-dev libfreetype6-dev libgmp-dev libmp3lame-dev libopus-dev librtmp-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev libsnappy-dev libsoxr-dev libssh-gcrypt-dev libssl-dev libtool libv4l-dev libva-dev libvorbis-dev libwebp-dev libx264-dev libxcb-shape0-dev libxcb-shm0-dev libxcb-xfixes0-dev libxcb1-dev libxml2-dev lzma-dev meson nasm pkg-config python3-dev python3-pip texinfo wget yasm zlib1g-dev
Code
sudo apt install -y build-essential cmake libgtk2.0-dev pkg-config python-numpy python-dev libtiff5-dev libjasper-dev libopencv-dev checkinstall pkg-config yasm libjasper-dev libswscale-dev libdc1394-22-dev libxine2 libgstreamer0.10-dev libv4l-dev libgstreamer-plugins-base0.10-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libmp3lame-dev libopencore-amrnb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libsdl2-dev libtool libvdpau-dev libvorbis-dev libxcb1-dev libvpx-dev libpulse-dev libsoxr-dev libopus-dev libwebp-dev libxvidcore-dev libzvbi-dev libxcb-shm0-dev libv4l-dev libxcb-xfixes0-dev libvpx-dev libmp3lame-dev pkg-config texinfo libpulse-dev libomxil-bellagio-dev libssh-gcrypt-dev libssl-dev wget zlib1g-dev nasm yasm libx264-dev libnuma-dev libnuma-dev libgles2-mesa-dev git devscripts equivs meson


Code
mkdir ~/ffmpeg_sources && \
cd ~/ffmpeg_sources && \
git -C fdk-aac pull 2> /dev/null || git clone --depth 1 https://github.com/mstorsjo/fdk-aac && \
cd fdk-aac && \
autoreconf -fiv && \
./configure --disable-shared && \
make && \
sudo make install
Code
sudo ldconfig


Code
sudo apt install glslang* spirv-tool libplacebo*
Code
sudo apt build-dep ffmpeg
Code
mkdir ~/bin
Code
cd ~/ffmpeg_sources && wget https://ffmpeg.org/releases/ffmpeg-4.3.1.tar.bz2 && tar xjvf ffmpeg-4.3.1.tar.bz2 && cd ffmpeg-4.3.1




Code
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --extra-libs="-lpthread -lm" --bindir="$HOME/bin" --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libv4l2 --enable-libxvid --enable-sdl2 --enable-libx264 --enable-pthreads --enable-openssl --enable-nonfree --disable-debug --enable-libsoxr --enable-version3 --enable-libvpx --disable-doc --disable-htmlpages --enable-libpulse --enable-libssh --disable-manpages --disable-podpages --enable-opengl --enable-libzvbi --enable-avfilter --enable-filters --enable-mmal --enable-omx --enable-omx-rpi --enable-decoder=h264_mmal --enable-decoder=mpeg2_mmal --enable-encoder=h264_omx --enable-runtime-cpudetect --enable-libwebp --disable-avresample --enable-swresample --enable-x86asm --enable-libjack --enable-shared --disable-static --enable-librubberband --disable-vdpau --disable-vaapi --enable-gmp --enable-hardcoded-tables --disable-stripping


Code
PATH="$HOME/bin:$PATH" make -j 4


Code
make install && cd ~/bin && sudo cp ff* /usr/local/bin/
Code
sudo apt build-dep mpv


Code
sudo apt purge libavcodec-dev libavdevice-dev libswresample-dev libpostproc-dev libswscale-dev libavformat-dev
Code
sudo apt-mark manual opencv* && sudo apt-mark manual lib* && sudo apt-mark manual *-dev
Code
echo export CPATH=~/ffmpeg_build/include >> .bashrc
Code
echo export LD_LIBRARY_PATH=~/ffmpeg_build/lib >> .bashrc
Code
echo export PKG_CONFIG_PATH=~/ffmpeg_build/lib/pkgconfig:/opt/vc/lib/pkgconfig >> .bashrc


close konsole or terminal and open a new one



Code
cd ~/ffmpeg_sources


Code
git clone https://github.com/mpv-player/mpv.git


Code
cd mpv


Code
./bootstrap.py


Code
./waf configure --prefix=/usr/local --enable-rpi --enable-rpi-mmal --disable-vaapi --enable-egl-drm --enable-egl-x11 --disable-wayland --disable-wayland-protocols --disable-wayland-scanner --disable-gl-wayland --disable-android --disable-vdpau --disable-vulkan


Code
./waf -j4


Code
sudo ./waf install


Code
mkdir ~/.config/mpv && nano ~/.config/mpv/mpv.conf
text einfügen fullscreen is disabled # entfernen für fullscreen





#fullscreen=yes

gpu-context=rpi

gpu-api=opengl

vo=rpi

hwdec=h264_mmal-mmal-copy

hwdec-codecs=all



Code
sudo nano /boot/config.txt
text einfügen



###########

gpu_mem=128

#dtoverlay=vc4-kms-v3d

#dtoverlay=vc4-fkms-v3d

###############

wenn v3d nicht diabled wird

sagt mpv already in use



speichern



Code
sudo reboot
mpv example.mp4



konsolen output



mpv /media/moon/filme/12.mp4

(+) Video --vid=1 (*) (h264 1288x720 23.976fps)

(+) Audio --aid=1 (*) (aac 2ch 44100Hz)

Using hardware decoding (mmal-copy).

AO: [pulse] 48000Hz stereo 2ch float

VO: [rpi] 1288x720 => 1288x720 yuv420p

AV: 00:01:05 / 02:09:24 (1%) A-V: 0.000 Dropped: 1 Cache: 706s/150MB



run cpu 15 %



enjoy



buy me a beer !

namxam
Posts: 1
Joined: Tue Sep 01, 2020 10:16 am

Re: GIANT UPDATE: Build FFmpeg and mpv – Automatically in 54 Minutes!

Wed Sep 02, 2020 9:58 am

Thnx for that guide. It compiles, but even when removing that line from /boot/config.txt it tells me that it is already in use. Any ideas what I might have missed?

tommyfeelgod
Posts: 5
Joined: Fri Oct 18, 2019 3:27 pm

Re: GIANT UPDATE: Build FFmpeg and mpv – Automatically in 54 Minutes!

Wed Sep 09, 2020 12:30 pm

i find another way to to this !!!

no system change !!!

no gls change

https://github.com/spookyfirehorse/rasp ... s-mpv-rpi-

there is away to fully usage of rpi output mpv
and also cvlc



mpv.conf

gpu output is to slow for some mp4 files

gpu-context=rpi
gpu-api=opengl
vo=rpi
hwdec=h264_mmal-mmal-copy
hwdec-codecs=all

greeting spooky

Return to “Graphics, sound and multimedia”