Skip to content

cannot load plugin using ffmpeg lv2 #16

@adaviding

Description

@adaviding

I'm on Ubuntu 19.04, and I successfully built and installed your sdenoise.lv2 plugin from your master branch. I have also installed ffmpeg which can allegedly transform audio files using an installed lv2 filter.

Presumably the command to use your filter is ...

ffmpeg -i $INPUT -af lv2=plugin=https\\\\://github.com/lucianodato/speech-denoiser $OUTPUT

... but it gives me an Error initializing filter 'lv2' with args 'plugin=https://github.com/lucianodato/speech-denoiser' error:

ding@ding-linux-03:~/Desktop/denoise$ INPUT=/data/sample_car.wav
ding@ding-linux-03:~/Desktop/denoise$ OUTPUT=/data/sample_car.sdenoise.wav
ding@ding-linux-03:~/Desktop/denoise$ docker run \
> --mount type=bind,src=/home/ding/Desktop/denoise-data,dst=/data \
> denoise \
> "ffmpeg -i $INPUT -af lv2=plugin=https\\\\://github.com/lucianodato/speech-denoiser $OUTPUT"
ffmpeg version 4.1.3-0ubuntu1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Ubuntu 8.3.0-6ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from '/data/sample_car.wav':
  Metadata:
    encoder         : Lavf58.12.100
  Duration: 00:01:05.02, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
error: attempt to map invalid URI `https'
[lv2 @ 0x561771d961c0] Invalid plugin URI <https>
[AVFilterGraph @ 0x561771d4ebc0] Error initializing filter 'lv2' with args 'plugin=https://github.com/lucianodato/speech-denoiser'
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!

BTW, here is the Dockerfile that I used get this ffmpeg command ready.

FROM ubuntu:19.04

SHELL ["/bin/bash", "-c"]

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
 && apt-get install --yes apt-utils \
 && apt-get install --yes ffmpeg build-essential cmake git python3 python3-pip ninja-build \
                          dh-autoreconf pkg-config lv2-dev

RUN pip3 install meson

# --------------------------------
# lv2 speech-denoiser
# --------------------------------
RUN mkdir -p /github/lucianodato/speech-denoiser
WORKDIR /github/lucianodato/speech-denoiser
RUN chmod -R a+rwx . \
 && git clone https://github.com/lucianodato/speech-denoiser.git .

RUN chmod +x install.sh \
 && ./install.sh

# --------------------------------
# data folder
# --------------------------------
RUN mkdir /data \
 && chmod -R a+rwx /data

WORKDIR /data

ENTRYPOINT ["/bin/bash", "-c"]

And here are the actual docker commands that I used:

docker build --tag denoise:latest .
INPUT=/data/sample_car.wav
OUTPUT=/data/sample_car.sdenoise.wav
docker run \
	--mount type=bind,src=/home/ding/Desktop/denoise-data,dst=/data \
	denoise \
	"ffmpeg -i $INPUT -af lv2=plugin=https\\\\://github.com/lucianodato/speech-denoiser $OUTPUT"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions