[BUG] failing to compile with old ffmpeg version
YozoraWolf opened this issue · 7 comments
Hey! It's me again, just wanted to drop by and let you know of this recent bug I found while shamelessly trying to record a video (an then realizing I wasn't even recording in the first place lol)
Describe the bug
Replay won't start due to an error.
To Reproduce
**args:** -w screen -fm cfr -f 60 -a alsa_output.pci-0000_06_00.6.HiFi__hw_Generic__sink.monitor -ac aac -k h264 -c mp4 -r 60 -o /home/wolf/Videos
Lock file created successfully.
gpu-screen-recorder: error while loading shared libraries: libvpx.so.7: cannot open shared object file: No such file or directory
Desktop (please complete the following information):
- X11 or Wayland: X11
- Desktop environment/Window Manager: Gnome
- Distro: Mint 22
- GPU: Nvidia RTX 3080 Max-Q
- Version (latest flatpak version, aur or source): source
Additional context
wolf@wolf-mint:~$ /home/wolf/.gsr/gsr-start-replay.sh
Selected audio sinks: alsa_output.pci-0000_06_00.6.HiFi__hw_Generic__sink.monitor
Starting recording with the following arguments: -w screen -fm cfr -f 60 -a alsa_output.pci-0000_06_00.6.HiFi__hw_Generic__sink.monitor -ac aac -k h264 -c mp4 -r 60 -o /home/wolf/Videos
Lock file created successfully.
gpu-screen-recorder: error while loading shared libraries: libvpx.so.7: cannot open shared object file: No such file or directory
Here is the entire log.
I also tried reinstalling with the following error while building:
Found ninja-1.11.1 at /usr/bin/ninja
Cleaning... 0 files.
[26/28] Compiling C++ object gpu-screen-recorder.p/src_main.cpp.o
FAILED: gpu-screen-recorder.p/src_main.cpp.o
c++ -Igpu-screen-recorder.p -I. -I.. -I/usr/local/include -I/usr/include/libdrm -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -O3 -Wshadow -DNDEBUG -DGSR_PORTAL -D_REENTRANT -pthread -MD -MQ gpu-screen-recorder.p/src_main.cpp.o -MF gpu-screen-recorder.p/src_main.cpp.o.d -o gpu-screen-recorder.p/src_main.cpp.o -c ../src/main.cpp
../src/main.cpp: In function ‘bool add_hdr_metadata_to_video_stream(gsr_capture*, AVStream*)’:
../src/main.cpp:1323:110: error: cannot convert ‘AVContentLightMetadata*’ to ‘uint8_t*’ {aka ‘unsigned char*’}
1323 | const bool added_light_metadata = av_stream_add_side_data(video_stream, AV_PKT_DATA_CONTENT_LIGHT_LEVEL, light_metadata, light_metadata_size);
| ^~~~~~~~~~~~~~
| |
| AVContentLightMetadata*
In file included from ../src/main.cpp:37:
/usr/local/include/libavformat/avformat.h:1861:38: note: initializing argument 3 of ‘int av_stream_add_side_data(AVStream*, AVPacketSideDataType, uint8_t*, size_t)’
1861 | uint8_t *data, size_t size);
| ~~~~~~~~~^~~~
../src/main.cpp:1329:119: error: cannot convert ‘AVMasteringDisplayMetadata*’ to ‘uint8_t*’ {aka ‘unsigned char*’}
1329 | const bool added_display_metadata = av_stream_add_side_data(video_stream, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, mastering_display_metadata, sizeof(*mastering_display_metadata));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| AVMasteringDisplayMetadata*
/usr/local/include/libavformat/avformat.h:1861:38: note: initializing argument 3 of ‘int av_stream_add_side_data(AVStream*, AVPacketSideDataType, uint8_t*, size_t)’
1861 | uint8_t *data, size_t size);
| ~~~~~~~~~^~~~
../src/main.cpp:1323:16: warning: unused variable ‘added_light_metadata’ [-Wunused-variable]
1323 | const bool added_light_metadata = av_stream_add_side_data(video_stream, AV_PKT_DATA_CONTENT_LIGHT_LEVEL, light_metadata, light_metadata_size);
| ^~~~~~~~~~~~~~~~~~~~
../src/main.cpp:1329:16: warning: unused variable ‘added_display_metadata’ [-Wunused-variable]
1329 | const bool added_display_metadata = av_stream_add_side_data(video_stream, AV_PKT_DATA_MASTERING_DISPLAY_METADATA, mastering_display_metadata, sizeof(*mastering_display_metadata));
| ^~~~~~~~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
Help is as always super appreciated, thanks for your support! :)
- I played the video with the command
mpv --no-config video.mp4
(if applicable) - I use a laptop with an integrated GPU and a dedicated GPU
That error with shared library is probably because you are running gpu screen recorder compiled against old linux mint. When you update ffmpeg on the system you need to recompile gpu screen recorder. But that compile error needs to be fixed, its error when compiling with old ffmpeg version.
That error with failing to load shared library looks like a broken ffmpeg install. All applications that uses ffmpeg should also fail to load. But that compile error needs to be fixed, its error when compiling with old ffmpeg version.
Odd, thought I solved the broken ffmpeg install issue previously. Guess its time for me to get back to troubleshooting with it haha.
Alright, will let you know any updates.
I edited the comment. The issue is likely that you didn't recompile gpu screen recorder after updating ffmpeg, but you cant because of that compile error. I'll fix it
I edited the comment. The issue is likely that you didn't recompile gpu screen recorder after updating ffmpeg, but you cant because of that compile error. I'll fix it
Got it, will stay tuned and retry once you push the changes to repo!
Thanks!
Can you fetch the latest change from git and install again and try again? I pushed a change that should fix the compile error.
Can you fetch the latest change from git and install again and try again? I pushed a change that should fix the compile error.
After reinstalling ffmpeg.
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
configuration: --prefix=/home/wolf/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/wolf/ffmpeg_build/include --extra-ldflags=-L/home/wolf/ffmpeg_build/lib --extra-libs='-lpthread -lm' --ld=g++ --bindir=/home/wolf/bin --enable-gpl --enable-gnutls --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libsvtav1 --enable-libdav1d --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 58. 29.100 / 58. 29.100
libavcodec 60. 31.102 / 60. 31.102
libavformat 60. 16.100 / 60. 16.100
libavdevice 60. 3.100 / 60. 3.100
libavfilter 9. 12.100 / 9. 12.100
libswscale 7. 5.100 / 7. 5.100
libswresample 4. 12.100 / 4. 12.100
libpostproc 57. 3.100 / 57. 3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
But I got this error:
[27/28] Linking target gpu-screen-recorder
FAILED: gpu-screen-recorder
c++ -o gpu-screen-recorder gpu-screen-recorder.p/kms_client_kms_client.c.o gpu-screen-recorder.p/src_capture_capture.c.o gpu-screen-recorder.p/src_capture_nvfbc.c.o gpu-screen-recorder.p/src_capture_xcomposite.c.o gpu-screen-recorder.p/src_capture_kms.c.o gpu-screen-recorder.p/src_encoder_video_video.c.o gpu-screen-recorder.p/src_encoder_video_cuda.c.o gpu-screen-recorder.p/src_encoder_video_vaapi.c.o gpu-screen-recorder.p/src_encoder_video_software.c.o gpu-screen-recorder.p/src_egl.c.o gpu-screen-recorder.p/src_cuda.c.o gpu-screen-recorder.p/src_xnvctrl.c.o gpu-screen-recorder.p/src_overclock.c.o gpu-screen-recorder.p/src_window_texture.c.o gpu-screen-recorder.p/src_shader.c.o gpu-screen-recorder.p/src_color_conversion.c.o gpu-screen-recorder.p/src_utils.c.o gpu-screen-recorder.p/src_library_loader.c.o gpu-screen-recorder.p/src_cursor.c.o gpu-screen-recorder.p/src_sound.cpp.o gpu-screen-recorder.p/src_main.cpp.o gpu-screen-recorder.p/src_capture_portal.c.o gpu-screen-recorder.p/src_dbus.c.o gpu-screen-recorder.p/src_pipewire.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,-rpath,/usr/local/lib -Wl,-rpath-link,/usr/local/lib -pthread -Wl,--start-group /usr/local/lib/libavcodec.so /usr/local/lib/libavformat.so /usr/local/lib/libavutil.so /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXcomposite.so /usr/lib/x86_64-linux-gnu/libXrandr.so /usr/lib/x86_64-linux-gnu/libXfixes.so /usr/lib/x86_64-linux-gnu/libXdamage.so /usr/lib/x86_64-linux-gnu/libXi.so /usr/lib/x86_64-linux-gnu/libpulse.so /usr/local/lib/libswresample.so /usr/local/lib/libavfilter.so /usr/local/lib/libva.so /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/libcap.so /usr/lib/x86_64-linux-gnu/libdrm.so /usr/lib/x86_64-linux-gnu/libwayland-egl.so /usr/lib/x86_64-linux-gnu/libwayland-client.so /usr/lib/x86_64-linux-gnu/libdbus-1.so /usr/lib/x86_64-linux-gnu/libpipewire-0.3.so -Wl,--end-group
/usr/bin/ld: warning: libvpx.so.7, needed by /usr/local/lib/libavcodec.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libx264.so.163, needed by /usr/local/lib/libavcodec.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_decode'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_encoder_close'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_encoder_headers'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_get_cx_data'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_encoder_encode'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_vp8_dx'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_encoder_reconfig'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_vp9_cx'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_param_parse'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_error'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_encoder_maximum_delayed_frames'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_control_'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_err_to_string'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_set_frame_buffer_functions'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_vp9_dx'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_param_cleanup'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_param_apply_profile'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_get_caps'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_vp8_cx'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_param_apply_fastfirstpass'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_version'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_destroy'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_levels'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_build_config'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_encode'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_picture_init'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_param_default'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_enc_config_set'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_param_default_preset'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_get_frame'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_error_detail'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_img_wrap'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_version_str'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_dec_init_ver'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_encoder_open_163'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_enc_init_ver'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `x264_encoder_delayed_frames'
/usr/bin/ld: /usr/local/lib/libavcodec.so: undefined reference to `vpx_codec_enc_config_default'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
I may have some issues with my libs that I might have to get fixed.
Since the compile error has been fixed i'll close this. But anyways, why are you still compiling ffmpeg from source? doesn't linux mints ffmpeg libraries work?