MaartenBaert / ssr

SimpleScreenRecorder, a screen recorder for Linux
http://www.maartenbaert.be/simplescreenrecorder/
GNU General Public License v3.0
2.5k stars 288 forks source link

SSR fails to start after ffmpeg upgrade (libavformat.so.60 not found) #1034

Closed cnekmp closed 4 days ago

cnekmp commented 1 week ago

After Archlinux upgrade of package ffmpeg, SSR fails to start due to several libraries are missing:

$ simplescreenrecorder
simplescreenrecorder: error while loading shared libraries: libavformat.so.60: cannot open shared object file: No such file or directory

$ ffmpeg -version
ffmpeg version n7.0.1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.1.1 (GCC) 20240522
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-mbedtls --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil      59.  8.100 / 59.  8.100
libavcodec     61.  3.100 / 61.  3.100
libavformat    61.  1.100 / 61.  1.100
libavdevice    61.  1.100 / 61.  1.100
libavfilter    10.  1.100 / 10.  1.100
libswscale      8.  1.100 /  8.  1.100
libswresample   5.  1.100 /  5.  1.100
libpostproc    58.  1.100 / 58.  1.100
Kishore96in commented 1 week ago

This just means you have to recompile the package. https://wiki.archlinux.org/title/Arch_User_Repository#Updating_packages

Kishore96in commented 1 week ago

Also see https://github.com/MaartenBaert/ssr/pull/1031

cnekmp commented 1 week ago

Ok, I've tried to compile it via AUR simplescreenrecorder-git so I get an error also:

[ 11%] Building CXX object src/CMakeFiles/simplescreenrecorder.dir/AV/Input/ALSAInput.cpp.o
[ 12%] Building CXX object src/CMakeFiles/simplescreenrecorder.dir/AV/Input/GLInjectInput.cpp.o
[ 13%] Building CXX object src/CMakeFiles/simplescreenrecorder.dir/AV/Input/JACKInput.cpp.o
[ 14%] Building CXX object src/CMakeFiles/simplescreenrecorder.dir/AV/Input/PulseAudioInput.cpp.o
[ 15%] Building CXX object src/CMakeFiles/simplescreenrecorder.dir/AV/Input/SSRVideoStreamReader.cpp.o
[ 17%] Building CXX object src/CMakeFiles/simplescreenrecorder.dir/AV/Input/SSRVideoStreamWatcher.cpp.o
[ 18%] Building CXX object src/CMakeFiles/simplescreenrecorder.dir/AV/Input/V4L2Input.cpp.o
[ 19%] Building CXX object src/CMakeFiles/simplescreenrecorder.dir/AV/Input/X11Input.cpp.o
[ 20%] Building CXX object src/CMakeFiles/simplescreenrecorder.dir/AV/Output/AudioEncoder.cpp.o
/home/farid/.cache/paru/clone/simplescreenrecorder-git/src/ssr/src/AV/Output/AudioEncoder.cpp: In member function ‘unsigned int AudioEncoder::GetChannels()’:
/home/farid/.cache/paru/clone/simplescreenrecorder-git/src/ssr/src/AV/Output/AudioEncoder.cpp:72:35: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channels’
   72 |         return GetCodecContext()->channels;
      |                                   ^~~~~~~~
/home/farid/.cache/paru/clone/simplescreenrecorder-git/src/ssr/src/AV/Output/AudioEncoder.cpp: In static member function ‘static void AudioEncoder::PrepareStream(AVStream*, AVCodecContext*, AVCodec*, AVDictionary**, const std::vector<std::pair<QString, QString> >&, unsigned int, unsigned int, unsigned int)’:
/home/farid/.cache/paru/clone/simplescreenrecorder-git/src/ssr/src/AV/Output/AudioEncoder.cpp:110:24: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channels’
  110 |         codec_context->channels = channels;
      |                        ^~~~~~~~
/home/farid/.cache/paru/clone/simplescreenrecorder-git/src/ssr/src/AV/Output/AudioEncoder.cpp:111:24: error: ‘AVCodecContext’ {aka ‘struct AVCodecContext’} has no member named ‘channel_layout’; did you mean ‘ch_layout’?
  111 |         codec_context->channel_layout = (channels == 1)? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
      |                        ^~~~~~~~~~~~~~
      |                        ch_layout
make[2]: *** [src/CMakeFiles/simplescreenrecorder.dir/build.make:215: src/CMakeFiles/simplescreenrecorder.dir/AV/Output/AudioEncoder.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:163: src/CMakeFiles/simplescreenrecorder.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'simplescreenrecorder-git-0.4.2.r11.g7f26bc7-1':
error: packages failed to build: simplescreenrecorder-git-0.4.2.r11.g7f26bc7-1
rado84-github commented 1 week ago

This just means you have to recompile the package. https://wiki.archlinux.org/title/Arch_User_Repository#Updating_packages

Unable to build simplescreenrecorder - makepkg exited with code: 4 error code 4: Error in user-supplied function in PKGBUILD.

simplescreenrecorder-bin compiled successfully but it still won't run with the same libav error.

erikdubois commented 1 week ago

current simplescreenrecorder(-git) PKGBUILDS can not be built on Arch. Can you have a look at it? Here is the complete build on pastebin - chroot https://pastebin.com/iLJcWybX

And here is the pastebin when you makepkg the app

https://pastebin.com/00p6Mrgc

Just tell us what you need more

Error message: simplescreenrecorder: error while loading shared libraries: libavformat.so.60: cannot open shared object file: No such file or directory

image

Kishore96in commented 1 week ago

The missing library thing just means you need to rebuild ( https://wiki.archlinux.org/title/Arch_User_Repository#Updating_packages ).

If you have problems building with ffmpeg 7, have you tried the patch from https://github.com/MaartenBaert/ssr/pull/1031 ?,

rado84-github commented 1 week ago

It's not just one missing library, it's a library hell that is missing. There are at least 5 missing libraries but I got stuck at the 5th - I can't find its package anywhere. And IDK how to apply that patch from 1031, so that leaves me with a lot of work to search and recover every single missing library. It's easier to simply use another program.

So far I downloaded these packages dav1d-1.2.0-1 libvpx-1.13.0-2 ffmpeg-2_6.0-9 libjxl-0.8.2-2 rav1e-0.5.1-2 and everything from their /ursr/lib I put in my /usr/lib. But I got stuck at finding libSvtAv1Enc.so.1.

Not worth the trouble, the developer of SSR hasn't been active on GitHub for 3 months (if I read his activity data correctly) and KDE's Spectacle is said to be able to record the screen.

jrichard326 commented 1 week ago

vokoscreen works fine and it is in the repositories

nebulosa2007 commented 1 week ago

If you have problems building with ffmpeg 7, have you tried the patch from #1031 ?,

This patch doesn't work also: build log

I was using this PKGBUILD

PAN-CHRZAN commented 1 week ago

The missing library thing just means you need to rebuild ( https://wiki.archlinux.org/title/Arch_User_Repository#Updating_packages ).

If you have problems building with ffmpeg 7, have you tried the patch from #1031 ?,

Thanks, it compiled properly now with the patched files. @MaartenBaert if you are alive can you merge this fix #1031 ?

erikdubois commented 5 days ago

it is fixed

see https://github.com/MaartenBaert/ssr/pull/1036#issuecomment-2191018808 proof of fix https://youtu.be/KWe2-yFEUeM video created with SSR

cnekmp commented 5 days ago

it is fixed

see #1036 (comment) proof of fix https://youtu.be/KWe2-yFEUeM video created with SSR

I can confirm that the provided solution works. Should I close this issue or wait for global fix?

acmpo6ou commented 4 days ago

I can see a new version (0.4.4-3) on AUR with the fix now, so this could indeed be closed I think.

cnekmp commented 4 days ago

Closing. Thanks a lot to everyone.

Brottweiler commented 4 days ago

While the AUR package has a patch, the problem still exists in the software. The issue isn't fixed, but I suppose the pull request is sufficient.