0

I am following this Audio Encode example from the ffmpeg docu: https://www.ffmpeg.org/doxygen/0.6/api-example_8c-source.html

But instead of a .mp2 file i want to decode a .wav file So I changed this lines in my program:

codec = avcodec_find_encoder(AV_CODEC_ID_WAVPACK)
if(!codec){
fprintf(stderr,"codec not found\n");
exit(1)
}

But I always enter the if -> it seems I cannot open the codec.

I have installed wavpack and libva with --enable-libwavpack.

Tlacenka
  • 520
  • 9
  • 15
IIIIIIIIIIIIIIIIIIIIII
  • 3,958
  • 5
  • 45
  • 70

1 Answers1

1

So your question is unclear, you're talking about .wav decoding and wavpack encoding, I assume you mean you want to use a .wav file and encode it to wavpack/.wv (as opposed to thinking that .wav is related to wavpack in any way; it isn't).

If that's the case, then the reason it's not working is because you're using libav without wavpack support. You may have installed wavpack, but libav didn't find it when compiling, so it has no support for it. You could consider using ffmpeg, which has a built-in wavpack encoder that does not depend on libwavpack, or figure out how to compile libav with libwavpack support (probably need to install developer packages if you're using pre-built binaries from your Linux distribution, or alternatively tell libav where these are located using --extra-cflags= and --extra-libs= when running configure).

Ronald S. Bultje
  • 10,828
  • 26
  • 47