scrcpy
scrcpy copied to clipboard
ERROR: Could not open codec .
Environment
- OS: openSUSE Tumbleweed in virtualbox
- scrcpy version: 1.25
- installation method: simple build
- device model: OnePlus KB2000
- Android version: 11
Describe the bug I successfully run ./install_release.sh
[20230205.134531:zhihao@dust~/Downloads/scrcpy]$ ./install_release.sh
[scrcpy] Downloading prebuilt server...
--2023-02-05 13:45:33-- https://github.com/Genymobile/scrcpy/releases/download/v1.25/scrcpy-server-v1.25
Connecting to 10.0.2.2:1080... connected.
Proxy request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/111583593/56d38689-d880-43f5-983d-76d677072f25?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230205%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230205T054534Z&X-Amz-Expires=300&X-Amz-Signature=cee004169f716a1b36a8b23388d5a66b8b3e92f4e390d3b91b47eaf03d3fa54d&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=111583593&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v1.25&response-content-type=application%2Foctet-stream [following]
--2023-02-05 13:45:34-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/111583593/56d38689-d880-43f5-983d-76d677072f25?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230205%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230205T054534Z&X-Amz-Expires=300&X-Amz-Signature=cee004169f716a1b36a8b23388d5a66b8b3e92f4e390d3b91b47eaf03d3fa54d&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=111583593&response-content-disposition=attachment%3B%20filename%3Dscrcpy-server-v1.25&response-content-type=application%2Foctet-stream
Connecting to 10.0.2.2:1080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 42151 (41K) [application/octet-stream]
Saving to: ‘scrcpy-server’
scrcpy-server 100%[============================================================>] 41.16K --.-KB/s in 0.08s
2023-02-05 13:45:35 (497 KB/s) - ‘scrcpy-server’ saved [42151/42151]
[scrcpy] Verifying prebuilt server...
scrcpy-server: OK
[scrcpy] Building client...
The Meson build system
Version: 1.0.0
Source dir: /home/zhihao/Downloads/scrcpy
Build dir: /home/zhihao/Downloads/scrcpy/build-auto
Build type: native build
Project name: scrcpy
Project version: 1.25
C compiler for the host machine: cc (gcc 12.2.1 "cc (SUSE Linux) 12.2.1 20221020 [revision 0aaef83351473e8f4eb774f8f999bbe87a4866d7]")
C linker for the host machine: cc ld.bfd 2.39.0.20220810-1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency libavformat found: YES 59.27.100
Run-time dependency libavcodec found: YES 59.37.100
Run-time dependency libavutil found: YES 57.28.100
Run-time dependency sdl2 found: YES 2.26.2
Run-time dependency libavdevice found: YES 59.7.100
Run-time dependency libusb-1.0 found: YES 1.0.26
Checking for function "strdup" : YES
Checking for function "asprintf" : YES
Checking for function "vasprintf" : YES
Header "sys/socket.h" has symbol "SOCK_CLOEXEC" : YES
Configuring config.h using configuration
Build targets in project: 3
scrcpy 1.25
User defined options
buildtype : release
strip : True
b_lto : true
prebuilt_server: scrcpy-server
Found ninja-1.11.1 at /usr/bin/ninja
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
/home/zhihao/Downloads/scrcpy/build-auto
[54/54] Linking target app/scrcpy
[scrcpy] Installing (sudo)...
[sudo] password for root:
[0/1] Installing files.
Installing app/scrcpy to /usr/local/bin
Stripping target 'app/scrcpy'.
Installing server/scrcpy-server to /usr/local/share/scrcpy
Installing /home/zhihao/Downloads/scrcpy/app/scrcpy.1 to /usr/local/share/man/man1
Installing /home/zhihao/Downloads/scrcpy/app/data/icon.png to /usr/local/share/icons/hicolor/256x256/apps
Installing /home/zhihao/Downloads/scrcpy/app/data/zsh-completion/_scrcpy to /usr/local/share/zsh/site-functions
Installing /home/zhihao/Downloads/scrcpy/app/data/bash-completion/scrcpy to /usr/local/share/bash-completion/completions
Installing /home/zhihao/Downloads/scrcpy/app/data/scrcpy.desktop to /usr/local/share/applications
Installing /home/zhihao/Downloads/scrcpy/app/data/scrcpy-console.desktop to /usr/local/share/applications
[20230205.134541:zhihao@dust~/Downloads/scrcpy]$
but scrcpy will show "ERROR: Could not open codec" like the issue https://github.com/Genymobile/scrcpy/issues/3223
[20230205.135915:zhihao@dust~]$ scrcpy
scrcpy 1.25 <https://github.com/Genymobile/scrcpy>
/usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 157.3 MB/s (42151 bytes in 0.000s)
[server] INFO: Device: OnePlus KB2000 (Android 11)
INFO: Renderer: opengl
INFO: OpenGL version: 4.5 (Compatibility Profile) Mesa 22.3.4
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2400
ERROR: Could not open codec
ERROR: Could not open packet sink 0
ERROR: Could not open demuxer sinks
WARN: Device disconnected
^C[20230205.135934:zhihao@dust~]$
checked ffmpeg is installed, I don't know what should I do now, do I need to reinstall ffmpeg?
[20230205.140222:zhihao@dust~]$ sudo rpm -qa | grep ffmpeg
[sudo] password for root:
ffmpeg-5-libavfilter-devel-5.1.2-9.1.x86_64
ffmpeg-5-libavdevice-devel-5.1.2-9.1.x86_64
ffmpeg-5-libpostproc-devel-5.1.2-9.1.x86_64
ffmpeg-5-libswscale-devel-5.1.2-9.1.x86_64
cmus-plugin-ffmpeg-2.10.0-1.4.x86_64
ffmpeg-5-libswresample-devel-5.1.2-9.1.x86_64
ffmpeg-5-libavcodec-devel-5.1.2-9.1.x86_64
ffmpeg-5-libavformat-devel-5.1.2-9.1.x86_64
ffmpegthumbs-22.12.1-1.1.x86_64
ffmpeg-5-libavutil-devel-5.1.2-9.1.x86_64
ffmpeg-5-5.1.2-9.1.x86_64
ffmpeg-5-debugsource-5.1.2-9.1.x86_64
[20230205.140326:zhihao@dust~]$