[Linux] Can't read mp3 - ffmpeg/libav conflict

Official support for: bitwig.com
Post Reply New Topic
RELATED
PRODUCTS

Post

Hello everybody,

It's impossible for me to read any MP3 file from the Bitwig browser, running Linux (Arch). Wav files work OK.
Whenever I wanted to preview or play an mp3, I could see that in the logs :

Code: Select all

Caused by: com.bitwig.base.io.ProcessException: Error executing command avconv -i /home/xxx/audio-file.mp3 -f wav /home/xxx/.BitwigStudio/cache/samples/EEAE968BE52739C2DB7F419E8FB5243F/playback-temp.wav: Cannot run program "avconv": error=2
So I said to myself : OK, at the moment I have ffmpeg installed for mp3 reading, and this software uses libav through avconv, fine. Libav is a fork of FFmpeg so they're in conflict, we only can install one of them at the same time. So I uninstalled ffmpeg, installed libav, then I could see that 'avconv' command is present and working fine.

I startup again my bitwig studio instance, and what do I see in the logs now ?

Code: Select all

com.bitwig.base.io.ProcessException: Error executing command ffprobe -show_format -show_streams /home/xxx/audio-file.mp3: Cannot run program "ffprobe": error=2
Dafuq ! Now it's trying to use a binary coming from ffmpeg package, which I had to uninstall !
Can anyone explain that and give a solution ? Because this is pretty frustrating, even if it's not a blocker since I can still use wav file and convertors (which makes no sense if you ask me)

Thanks in advance. Bitwig Studio is great so far, let me have reasons to switch to it definitely :)

Guillaume

Post

I can confirm this. I currently maintain the AUR package for Bitwig and I have not found but am working on a solution to this problem. The dependencies in the .deb show libav-tools, which should serve as a replacement for ffmpeg but instead Bitwig uses the older ff* commands instead of the av* commands.

I am currently compiling libav on this workstation to see if avprobe works with Bitwig. My best guess would be, that a symlink to avprobe would generate errors about metadata but importing MP3 files should work.

The Ubuntu wiki states that ffmpeg is deprecated since 12.04, so using avprobe instead of ffprobe should be fine there?!


Update: It seems installing avlib and creating a symlink fixed everything. Not a single error when importing MP3s. So to fix the import, simply run

Code: Select all

sudo ln -s /usr/bin/avprobe /usr/bin/ffprobe
For the future, the Bitwig guys might want to change ffprobe to avprobe or at least check if either one is available and then use the one installed on the system.

Post

Thanks, we got this hint also via email yesterday and will look into replacing it!

Post

Thanks for this detecting this problem. It's fixed now. The fix will be in the 1.0.6 build. Sorry about that!

Post

Hello MKzero,

I tried using a symlink also, but the other way round, to make Bitwig use ffmpeg instead with a symlink to ffprobe, but it failed miserably this way (and didn't try the other option).

I tested your method and it works perfectly ! Thank you.

So, to sum up, for Arch users :
− make sure to have no trace of /usr/bin/avconv symlink
− install and configure yaourt if you're not using it yet (libav is not available in pacman at the moment)
− "yaourt -S libav" to compile it and install it. If may ask for ffmpeg removal, proceed.
− "sudo ln -s /usr/bin/avprobe /usr/bin/ffprobe" and you're done.

@dom@bitwig : Thanks for your efforts making it available and nice on Linux, appreciating it :-)

Edit : just got the nickallen answer (thank to you too !), but I'll post my answer anyway, not sure when 1.0.6 will be available in yaourt (can't use .deb here), so it may help.

Post

MonsieurF wrote:Hello MKzero,
Edit : just got the nickallen answer (thank to you too !), but I'll post my answer anyway, not sure when 1.0.6 will be available in yaourt (can't use .deb here), so it may help.
I'm actually maintaining that AUR package and I try to keep up with the speed of the Bitwig releases(which is admittedly pretty hard :D ), but if the package is deprecated or has a problem you can just drop a comment in the AUR or create an issue on the Github-repository for it( https://github.com/mkzero/bitwig-studio-demo-aur ) and I'll try to fix it. :)

Post

Oh, that's really awesome, for the AUR package and that PKGBUILD on github! Starring it :-)
Thanks for your hard work to all of you !

Guillaume

Post

I've just stumbled on this problem. I am running funtoo and it uses ffmpeg rather than libav. I tried symlinking as suggested above but I am not able to get flacs working, after symlinking I can drag flacs in to a track but not play them (the is no waveform/just blank flat line). Is there anything else I can do to try to make this work? Installing libav isn't an option.

Edit: running from the terminal it looks like it has a problem finding avconv. Is there something I can symlink for this?

Edit again: I symlinked avconv with iconv but something isn't working, the terminal says that bitwig can't find the temp file because it doesn't exist.

These are the use flags I have for ffmpeg, maybe I am missing something here?

Code: Select all

[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for media-video/ffmpeg-2.2.9:
 U I
 - - 3dnow                 : Use the 3DNow! instruction set
 - - 3dnowext              : Enable manually-optimised routines using the AMD 3DNow!Ex SIMD
                             instruction set, present in modern AMD CPUs. (Check for
                             3dnowext in /proc/cpuinfo to know whether your CPU supports
                             it). 
 + + X                     : Add support for X11
 - - aac                   : Enable support for MPEG-4 AAC Audio
 - - aacplus               : AAC+ encoding via media-libs/libaacplus.
 + + alsa                  : Add support for media-libs/alsa-lib (Advanced Linux Sound
                             Architecture)
 - - amr                   : Enables Adaptive Multi-Rate Audio support
 - - amrenc                : Enables Adaptive Multi-Rate Audio encoding support with
                             media-libs/vo-amrwbenc.
 - - avx                   : Adds support for Advanced Vector Extensions instructions
                             (Intel Sandy Bridge, AMD Bulldozer and later chips)
 - - avx2                  : Adds support for Advanced Vector Extensions 2 instructions
                             (Intel Haswell and later chips)
 - - bindist               : Enforces license compatibility constraints via REQUIRED_USE.
 - - bluray                : Enable playback of Blu-ray filesystems
 + + bzip2                 : Use the bzlib compression library
 - - cdio                  : Enables audio CD grabbing with dev-libs/libcdio.
 - - celt                  : Adds Xiph CELT audio decoding support via media-libs/celt
 - - cpudetection          : Enables runtime CPU detection (useful for bindist,
                             compatibility on other CPUs)
 - - debug                 : Enable extra debug codepaths, like asserts and extra output.
                             If you want to get meaningful backtraces see
                             http://www.gentoo.org/proj/en/qa/backtraces.xml
 - - doc                   : Add extra documentation (API, Javadoc, etc). It is recommended
                             to enable per package instead of globally
 + + encode                : Add support for encoding of audio or video files
 - - examples              : Install examples, usually source code
 - - faac                  : Use external faac library for AAC encoding
 - - fdk                   : Use external fdk-aac library for AAC encoding
 + + fftools_aviocat       : cat's a URL to another one, useful for dumping streams.
 + + fftools_cws2fws       : converts cws files (Macromedia Flash, compressed) to fws ones
                             (Macromedia Flash, uncompressed).
 + + fftools_ffescape      : Escapes an input string, adopting the av_get_token() escaping
                             logic.
 + + fftools_ffeval        : A simple expression evalutor.
 + + fftools_ffhash        : Computes a file's digest using libavutil algorithms.
 + + fftools_fourcc2pixfmt : Shows the relationships between rawvideo pixel formats and
                             FourCC tags.
 + + fftools_graph2dot     : A tool to convert a libavfilter graph to a dot file.
 + + fftools_ismindex      : A tool for creating smooth streaming manifests.
 + + fftools_pktdumper     : Dumps packets as demuxed by libavformat.
 + + fftools_qt-faststart  : Rearranges a Quicktime file to facilitate network streaming.
 + + fftools_trasher       : Writes burts of random data into a file. Great for testing
                             error robustness/resilience/concealment.
 - - flite                 : Adds a text-to-speech filter based on app-accessibility/flite.
 - - fma3                  : Enables FMA3 optimizations: AMD processors starting with
                             Piledriver architecture and Intel Haswell based processors or
                             later.
 - - fma4                  : Enables FMA4 optimizations: AMD processors starting with
                             Bulldozer architecture.
 - - fontconfig            : Support for configuring and customizing font access via
                             media-libs/fontconfig
 - - frei0r                : Enable frei0r wrapping in libavfilter
 - - gme                   : Enables support for media-libs/game-music-emu for playing
                             various video game music formats.
 - - gnutls                : Add support for net-libs/gnutls (TLS 1.0 and SSL 3.0 support)
 - - gsm                   : Add support for the gsm lossy speech compression codec
 + + hardcoded-tables      : Use pre-calculated tables rather than calculating them on the
                             fly.
 + + iconv                 : Enable support for the iconv character set conversion library
 - - iec61883              : Support for FireWire DV/HDV input device using
                             media-libs/libiec61883.
 - - ieee1394              : Enable FireWire/iLink IEEE1394 support (dv, camera, ...)
 - - jack                  : Add support for the JACK Audio Connection Kit
 - - jpeg2k                : Support for JPEG 2000, a wavelet-based image compression
                             format
 + + ladspa                : Enable the ability to support ladspa plugins
 - - libass                : SRT/SSA/ASS (SubRip / SubStation Alpha) subtitle support
 - - libcaca               : Add support for colored ASCII-art graphics
 - - libsoxr               : Enables audio resampling through media-libs/soxr.
 - - libv4l                : Uses media-libs/libv4l for video4linux instead of direct
                             calls. Adds support for more devices via the userspace
                             library.
 + + mmx                   : Use the MMX instruction set
 - - mmxext                : Enables mmx2 support
 - - modplug               : Add libmodplug support for playing SoundTracker-style music
                             files
 + + mp3                   : Add support for reading mp3 files
 + + network               : Enables network streaming support
 - - openal                : Add support for the Open Audio Library
 + + opengl                : Add support for OpenGL (3D graphics)
 - - openssl               : Enables dev-libs/openssl support. Adds support for encrypted
                             network protocols (TLS/HTTPS).
 - - opus                  : Adds (decoding) support for the Opus codec via
                             media-libs/opus.
 - - oss                   : Add support for OSS (Open Sound System)
 - - pic                   : Force shared libraries to be built as PIC (this is slower)
 - - pulseaudio            : Add support for PulseAudio sound server
 - - quvi                  : Adds support for playing media from Internet services using
                             the quvi project.
 - - rtmp                  : Enable Real Time Messaging Protocol using librtmp
 - - schroedinger          : Enable Dirac video support (an advanced royalty-free video
                             compression format) via libschroedinger (high-speed
                             implementation in C of the Dirac codec).
 - - sdl                   : Add support for Simple Direct Layer (media library)
 - - speex                 : Add support for the speex audio codec (used for speech)
 + + sse                   : Use the SSE instruction set
 + + sse2                  : Use the SSE2 instruction set
 - - sse3                  : Use the SSE3 instruction set (pni in cpuinfo)
 - - sse4                  : Enables SSE4 optimizations: Intel Core microarchitecture and
                             AMD K10 or later.
 - - sse4_2                : Enables SSE4.2 optimizations: Nehalem-based Intel Core i7 or
                             later.
 - - ssh                   : Enable SSH/sftp support via net-libs/libssh.
 - - ssse3                 : Faster floating point optimization for SSSE3 capable chips
                             (Intel Core 2 and later chips)
 - - static-libs           : Build static versions of dynamic libraries as well
 - - test                  : Workaround to pull in packages needed to run with
                             FEATURES=test. Portage-2.1.2 handles this internally, so don't
                             set it in make.conf/package.use anymore
 - - theora                : Add support for the Theora Video Compression Codec
 + + threads               : Add threads support for various packages. Usually pthreads
 + + truetype              : Add support for FreeType and/or FreeType2 fonts
 - - twolame               : Enables MP2 encoding via media-sound/twolame as an alternative
                             to the internal encoder.
 - - v4l                   : Enable support for video4linux (using linux-headers or
                             userspace libv4l libraries)
 - - vaapi                 : Enables VAAPI (Video Acceleration API) for hardware decoding
 - - vdpau                 : Enable the Video Decode and Presentation API for Unix
                             acceleration interface
 + + vorbis                : Add support for the OggVorbis audio codec
 - - vpx                   : Enables vp8 codec support using libvpx: Decoding vp8 does not
                             require this to be enabled but libvpx can also be used for
                             decoding; encoding vp8 requires this useflag to be enabled
                             though.
 + + wavpack               : Add support for wavpack audio compression tools
 - - webp                  : Enables WebP encoding with media-libs/libwebp.
 - - x264                  : Enable h264 encoding using x264
 - - x265                  : Enables HEVC encoding with media-libs/x265.
 - - xvid                  : Add support for xvid.org's open-source mpeg-4 codec
 + + zlib                  : Add support for zlib (de)compression
 - - zvbi                  : Enables media-libs/zvbi based teletext decoder.
linux

Post

I don't think that libav is compatible (anymore) with ffmpeg, so only option is installing libav.
If there are no packages, then from source?

Post

I did end up compiling and installing libav in to /usr/local and it all seems to be working now so thanks for the suggestion!
linux

Post Reply

Return to “Bitwig”