-
Hey folks, I've enabled the
(This was with after installing I've tried building from source as well:
I can get ffmpeg to use the x264 build I have, but I can't seem to get this bindgen to work..
any suggestions or pointers? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I think I might have figured this out... Remove all packaged libs sudo apt remove libunistring-dev libaom-dev libdav1d-dev libx264-dev libwebp-dev libvorbis-dev libopus-dev libmp3lame-dev libdav1d-dev libavcodec-dev libavformat-dev libavutil-dev libavutil-dev libavformat-dev libavcodec-dev libavfilter-dev libswresample-dev libpostproc-dev libswscale-dev
sudo apt autoremove -y Delete any manually-compiled/installed libs sudo find /usr/ -iname '*libx264.*' -delete
sudo find /usr/ -iname '*libavcodec.*' -delete
sudo find /usr/ -iname '*libav*' -delete
sudo find /usr/ -iname '*libswresample.*' -delete
sudo find /usr/ -iname '*libswscale.*' -delete Now, install x264 source mkdir -p ~/ffmpeg-7
git clone --depth 1 https://code.videolan.org/videolan/x264.git && cd x264
./configure \
--prefix=/home/kayo/ffmpeg-7 \
--enable-shared \
--enable-pic && \
make -j $(nproc) && \
make install
cd .. Install FFMPEG-7.0 from source
Then build my project using this crate ( cd ../<project>/
cargo clean
LD_LIBRARY_PATH="/home/kayo/ffmpeg-7/lib" \
FFMPEG_DIR="/home/kayo/ffmpeg-7" \
LDFLAGS="-L/home/kayo/ffmpeg-7/lib -lavcodec -lavdevice -lavfilter -lavformat -lavresample -lavutil" \
cargo build -vv But I still seem to be running into the same error where the crate says there's no decoder found... I'm using the example code from the main repo.. LD_LIBRARY_PATH="/home/kayo/ffmpeg-7/lib" cargo run -- ../test-h264.mp4
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `target/debug/ezv-core ../test-h264.mp4`
FFMPEG version: 3868772
FFMPEG config: --prefix=/home/kayo/ffmpeg-7 --enable-shared --enable-static --enable-gpl --enable-nonfree --enable-libx264
Args {
inner: [
"target/debug/ezv-core",
"../test-h264.mp4",
],
}
No decoder found for ../test-h264.mp4
No encoder found for ../test-h264.mp4 It works if I use the same libs with the built ffmpeg binary: LD_LIBRARY_PATH="/home/kayo/ffmpeg-7/lib" ~/ffmpeg-7/bin/ffmpeg -i ../test-h264.mp4 2>&1 | grep 'avc\|aac\|configuration\|version'
ffmpeg version n7.0-7-gd38bf5e08e Copyright (c) 2000-2024 the FFmpeg developers
configuration: --prefix=/home/kayo/ffmpeg-7 --enable-shared --enable-static --enable-gpl --enable-nonfree --enable-libx264
libavcodec 61. 3.100 / 61. 3.100
minor_version : 512
compatible_brands: mp42iso2avc1mp41
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 480x360 [SAR 6:5 DAR 8:5], 272 kb/s, 29.98 fps, 30 tbr, 90k tbn (default)
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 65 kb/s (default) |
Beta Was this translation helpful? Give feedback.
-
Oh I should have looked at the FFMPEG docs first... this particular example/api wants the encoders name not the file :) LD_LIBRARY_PATH="/home/kayo/ffmpeg-7/lib" cargo run -- h264
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
Running `target/debug/ezv-core h264`
FFMPEG version: 3868772
FFMPEG config: --prefix=/home/kayo/ffmpeg-7 --enable-shared --enable-static --enable-gpl --enable-nonfree --enable-libx264
Args {
inner: [
"target/debug/ezv-core",
"h264",
],
}
type: decoder
id: H264
name: h264
description: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
medium: Video
capabilities: Capabilities(DR1 | DELAY | FRAME_THREADS | SLICE_THREADS)
profiles: [H264(Baseline), H264(ConstrainedBaseline), H264(Main), H264(Extended), H264(High), H264(High10), H264(High10Intra), H264(High422), H264(High422Intra), H264(High444), H264(High444Predictive), H264(High444Intra), H264(CAVLC444), Unknown, Unknown]
rates: any
formats: any
max_lowres: 0
No encoder found for h264 |
Beta Was this translation helpful? Give feedback.
Oh I should have looked at the FFMPEG docs first... this particular example/api wants the encoders name not the file :)