Can't find system FFMpeg when building 2.2.2 on Ubuntu 18

I’m attempting to build Audacity

What was your “configure” command?

Also, why are you building Audacity 2.2.2? (Audacity 2.2.2 is available in the Ubuntu repository https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=audacity&searchon=names )

Apologies, I hadn’t completed the post yet and couldn’t delete it before it was approved. Here’s more information:

I’m attempting to build Audacity 2.2.2 from source, following the instructions here in order to enable mod-script-pipe (which, as far as I can tell, isn’t available for any of the repository versions). I have ffmpeg 3.4.4 installed from the Ubuntu repository (libavcodec.so.57 is located in /usr/lib/x86_64-linux-gnu);

pkg-config --libs libavcodec

returns

-lavcodec



pkg-config --variable pc_path pkg-config

returns

/usr/local/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig

so it’s searching in the correct directory, as far as I can tell.

Here’s the configure command:

../configure --with-lib-preference="local system" --with-ffmpeg="system" --disable-dynamic-loading --with-mod-script-pipe

You are correct that mod-script-pipe is not enabled by default.
Why do you think that FFmpeg can’t be found?

Configure fails with the message

configure: error: You requested using the system libraries for FFMPEG but they are not available

Do you have libavformat-dev installed?
(it may be worth also referring to this post: https://forum.audacityteam.org/t/building-audacity-2-2-0-on-ubuntu-17-04-zesty/46271/1)

That appears to have been the issue, thanks. I had seen that post, but assumed that I had all of the build dependencies since I had the official repository version installed previously, forgetting that the -dev packages aren’t always installed for that.

You’re welcome :smiley:

Now that you’ve got the build working, I’d recommend that you build Audacity 2.3.1. It is officially still “alpha” software, but we are very close to releasing it. There’s a LOT of new stuff in it for scripting, so I’d highly recommend it for working with mod-script-pipe. The source code is available here: GitHub - audacity/audacity: Audio Editor
(use the “Clone or download” button and select “Download ZIP”.)

There’s not a huge amount of documentation for mod-script-pipe yet (we’re still working on that), and as it is early days for the new scripting commands, there could be some changes in future releases. If you have questions about scripting, just start a new topic.

Which scripting language are you intending to use?

I’ll definitely look into 2.3.1. I use Python a bit more often than Perl, so I’ll start with that. I’m not planning on doing anything that should be particularly complicated (yet).

That’s good. Python is now the recommended language for scripting with mod-script-pipe. I’d recommend using Python 3 (Python 2 is rapidly becoming obsolete).

When you get the Audacity 2.3.1 source code, take a look in “scripts/piped-work/” at the file “pipeclient.py”.
Also, here’s a short Python script that you may find useful for experimentation (you will need to remove the “.txt” from the file name):
pipecommand.py.txt (1.72 KB)