Simplescreenrecorder Looking for Older Libs

Hello, I successfully used Simplescreenrecorder the last time on June 16th.
It has a dependency on ffmpeg using some AV and another libs
I suspect an upgrade to a newer version of ffmpeg breaking SSR.
That incremented the versions of the following libraries:

$ ldd $(which simplescreenrecorder)| grep "not found"
	libavformat.so.60 => not found
	libavcodec.so.60 => not found
	libavutil.so.58 => not found
	libswscale.so.7 => not found

I tried to naïvely trick it with symbolic links from the newer versions, but obviously it checks the version, as it should.
My other attempt was to cleanbuild Simplescreenrecorder but this failed too:

[ 20%] Building CXX object src/CMakeFiles/simplescreenrecorder.dir/AV/Output/AudioEncoder.cpp.o
/home/mz/.cache/yay/simplescreenrecorder/src/ssr/src/AV/Output/AudioEncoder.cpp: In member function 'unsigned int AudioEncoder::GetChannels()':
/home/mz/.cache/yay/simplescreenrecorder/src/ssr/src/AV/Output/AudioEncoder.cpp:72:35: error: 'AVCodecContext' {aka 'struct AVCodecContext'} has no member named 'channels'
   72 |         return GetCodecContext()->channels;
      |                                   ^~~~~~~~
/home/mz/.cache/yay/simplescreenrecorder/src/ssr/src/AV/Output/AudioEncoder.cpp: In static member function 'static void AudioEncoder::PrepareStream(AVStream*, AVCodecContext*, const AVCodec*, AVDictionary**, const std::vector<std::pair<QString, QString> >&, unsigned int, unsigned int, unsigned int)':
/home/mz/.cache/yay/simplescreenrecorder/src/ssr/src/AV/Output/AudioEncoder.cpp:109:24: error: 'AVCodecContext' {aka 'struct AVCodecContext'} has no member named 'channels'
  109 |         codec_context->channels = channels;
      |                        ^~~~~~~~
/home/mz/.cache/yay/simplescreenrecorder/src/ssr/src/AV/Output/AudioEncoder.cpp:110:24: error: 'AVCodecContext' {aka 'struct AVCodecContext'} has no member named 'channel_layout'; did you mean 'ch_layout'?
  110 |         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...

I considered to downgrade ffmpeg but that would open up many cans of worms since there are so many dependencies.
I’m running out of ideas.
Any hints?
Thanks a lot, Michael.
EDIT PS: could extracting and placing the old libraries manually be a temporary solution?

https://aur.archlinux.org/packages/simplescreenrecorder

Other people have the same issue, you should look for another app like obs or vokoscreen, until this one gets updated

ok, I was afraid so.
Thanks for chiming in!

(I’m an arch user not EndeavourOS, but I hope the following will help.)

I fixed this problem for me in the following way: there is a Chinese repository called “archlinuxcn” which seems to be focused on Graphics and GPU related issues. (I first found it when trying to deal with a libva problem between NVIDIA and chrome). It has older versions of some things stored with names that contain the (old) version number. So I first searched with the command pacman -Fx avformat . (The “x” option causes the search string to be treated as a regular expression). The reply I got back contained this:

...
archlinuxcn/ffmpeg6.1 6.1.1-1 [installed]
    usr/include/ffmpeg6.1/libavformat/avformat.h
    usr/lib/ffmpeg6.1/libavformat.so
    usr/lib/ffmpeg6.1/pkgconfig/libavformat.pc
    usr/lib/libavformat.so.60
    usr/lib/libavformat.so.60.16.100
...

so i was able to get the libavformat.so.60 installed (in a pacman-aware/managed fashion) just by sudo pacman -S ffmeg6.1. So far so good, simplescreenrecorder “just works”. Of course, you might well need to add the following lines to /etc/pacman.conf (or its equivalent):

[archlinuxcn]
Server = https://repo.archlinuxcn.org/$arch

to add the repository to your pacman.

Just FYI, there are instructions on how to explicitly relink simplescreenrecorder to use preferentially some library file you name here.

1 Like

Thanks for the reply! IAC good to know!
I can report Simplescreenrecorder has been updated and now works with the current state of libraries!
Michael.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.