2

I have been trying to create a sine wave with avconv. I have read online that avconv is very similar to ffmpeg and much of the syntax of one should be almost identical to be used in the other. Searching around online tells me that generating a sine wave can be done in ffmpeg like so:

ffmpeg -f lavfi -i "sine=frequency=1000:duration=5" test.wav

I have tried the same code in avconv, however it doesn't work and I get:

Unknown input format: 'lavfi'

I was wondering if there was a way to create a sine wave in avconv and if someone could clarify how lavfi commands can be used in avconv.

Thanks!

  • avconv does not have the sine filter (and a million other filters). Why not use ffmpeg? – llogan Sep 17 at 17:43
  • @llogan I suppose the reason why I'm using avconv is because avconv is in the raspbian apt repository whereas ffmpeg - I assumed that the functionality of avconv and ffmpeg are the same – Yharooer Sep 18 at 23:08
2

avconv and ffmpeg do not have the same functionality: avconv is missing many features (-f lavfi) and filters (sine and aevalsrc). Because avconv lacks these I don't see a way to generate a sine with it.

Your Raspbian must be old because, according to repology, both Raspbian Stable and Oldstable use FFmpeg and not Libav (avconv).

Solutions:

  • One obvious but possibly impractical solution is to upgrade your Raspbian and use ffmpeg from the repo.

  • Compile ffmpeg.

  • Find a static build. johnvansickle.com offers ffmpeg for arm64, armhf, and armel. Maybe one of those will work on whatever Raspberry device you have.

  • Use sox or some other tool.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.