Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H.264 error with wgpu example #169

Closed
snow2flying opened this issue Aug 31, 2023 · 13 comments
Closed

H.264 error with wgpu example #169

snow2flying opened this issue Aug 31, 2023 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@snow2flying
Copy link

got the following error when I run the wgpu_room example:

ERROR libwebrtc] (h264_decoder_impl.cc:312): FFmpeg H.264 decoder not found

and when I check my ffmpeg I got this:

ffmpeg -codecs | grep 264
ffmpeg version 5.1.3-1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_qsv h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_omx h264_qsv h264_v4l2m2m h264_vaapi )

@davidzhao
Copy link
Member

which version of the SDK did you get this error with?

@snow2flying
Copy link
Author

client-sdk-rust:
commit c746592 (HEAD -> main, tag: webrtc-a59e857, origin/main, origin/HEAD)
livekit server:
v1.4.5

@theomonnom
Copy link
Member

theomonnom commented Aug 31, 2023

Hey @snow2flying, can you send me your list of dependencies inside your project?
EDIT: FYI libwebrtc is using ffmpeg openh264

@snow2flying
Copy link
Author

yes I do have ffmpeg with h264 installed on my laptop.

my os:

lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm

this is how I installed ffmpeg:

apt install ffmpeg

this is how I check ffmpeg with h264:

 ffmpeg -codecs | grep 264

ffmpeg version 5.1.3-1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-libjxl --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m h264_qsv h264_cuvid ) (encoders: libx264 libx264rgb h264_nvenc h264_omx h264_qsv h264_v4l2m2m h264_vaapi )

this is my client-sdk-rust:

git log

commit c746592 (HEAD -> main, tag: webrtc-fcdef0d, tag: webrtc-a59e857, origin/main, origin/HEAD)
Author: Théo Monnom theo.monnom@outlook.com
Date: Tue Aug 29 10:51:14 2023 -0700

add e2ee deps to webrtc patches (#167)

this is how I run the example:

cd client-sdk-rust/examples/ && cargo run -p wgpu_room --release

@snow2flying
Copy link
Author

and my rust version:

stable-x86_64-unknown-linux-gnu (default)
rustc 1.72.0 (5680fa18f 2023-08-23)

@snow2flying
Copy link
Author

and also tonight I compiled and installed the latest ffmpeg from source code. The error is still the same.
This is my new ffmpeg:

ffmpeg -codecs | grep 264

ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
configuration: --enable-nonfree --enable-gpl --enable-openssl --enable-libdav1d --enable-libsvtav1 --enable-librav1e --enable-libx264 --enable-libx265 --enable-libvpx --enable-libxvid --enable-libvidstab --enable-libaom --enable-libzimg --enable-lv2 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libtheora --enable-libfdk-aac --enable-libwebp --enable-libsrt --disable-ffnvcodec --enable-amf --disable-debug --disable-shared --enable-pthreads --enable-static --enable-version3 --extra-cflags='-I/home/damo/install/ffmpeg/ffmpeg-build-script/workspace/include -I/home/damo/install/ffmpeg/ffmpeg-build-script/workspace/include/lilv-0' --extra-ldexeflags= --extra-ldflags=-L/home/damo/install/ffmpeg/ffmpeg-build-script/workspace/lib --extra-libs='-ldl -lpthread -lm -lz' --pkgconfigdir=/home/damo/install/ffmpeg/ffmpeg-build-script/workspace/lib/pkgconfig --pkg-config-flags=--static --prefix=/home/damo/install/ffmpeg/ffmpeg-build-script/workspace --extra-version=
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m ) (encoders: libx264 libx264rgb h264_amf h264_v4l2m2m )

@theomonnom
Copy link
Member

theomonnom commented Sep 1, 2023

Seems like you don't have --enable-libopenh264?
Also it is weird because this should be statically linked into the rust lib

@snow2flying
Copy link
Author

I compiled ffmpeg with libopenh264 enabled, but the error is still the same:

ffmpeg -codecs |grep openh264

ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
configuration: --enable-nonfree --enable-gpl --enable-openssl --enable-libdav1d --enable-libsvtav1 --enable-librav1e --enable-libx264 --enable-libx265 --enable-libvpx --enable-libxvid --enable-libvidstab --enable-libaom --enable-libzimg --enable-lv2 --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libtheora --enable-libfdk-aac --enable-libwebp --enable-libsrt --disable-ffnvcodec --enable-amf --disable-debug --disable-shared --enable-pthreads --enable-static --enable-version3 --enable-libopenh264 --extra-cflags='-I/home/damo/install/ffmpeg/ffmpeg-build-script/workspace/include -I/home/damo/install/ffmpeg/ffmpeg-build-script/workspace/include/lilv-0' --extra-ldexeflags= --extra-ldflags=-L/home/damo/install/ffmpeg/ffmpeg-build-script/workspace/lib --extra-libs='-ldl -lpthread -lm -lz' --pkgconfigdir=/home/damo/install/ffmpeg/ffmpeg-build-script/workspace/lib/pkgconfig --pkg-config-flags=--static --prefix=/home/damo/install/ffmpeg/ffmpeg-build-script/workspace --extra-version=
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_v4l2m2m libopenh264 ) (encoders: libx264 libx264rgb libopenh264 h264_amf h264_v4l2m2m )

this is the error:

[2023-09-01T12:28:47Z ERROR libwebrtc] (h264_decoder_impl.cc:312): FFmpeg H.264 decoder not found.
[2023-09-01T12:28:47Z ERROR libwebrtc] (decoder_database.cc:148): Failed to initialize decoder.

@theomonnom
Copy link
Member

mb a regression due to #130 ?

@snow2flying
Copy link
Author

what is your building os platform?
I tried Windows too. I could not get it built successfully.

@snow2flying
Copy link
Author

can you put compiling descriptions in the readme? that will be helpful

@davidzhao
Copy link
Member

we'll update the library so it works out of the box.

@theomonnom
Copy link
Member

Fixed by #241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants