Log in

View Full Version : ffmpeg command help


VoodooFX
17th January 2024, 21:54
I want wav in and wav out, and... mp3 conversion in the middle as "filter". And all that working in one instance.


ffmpeg -i in.wav out.wav

microchip8
17th January 2024, 22:56
what do you mean with "in the middle"? You want to encode to wav but pack in an mp3 stream "in the middle"? I don't think this is possible

VoodooFX
17th January 2024, 23:27
In "the middle" I want to encode to mp3 and decode to wav.
Who knew that degrading audio with mp3 can be useful as some magic "filter"... :D

Actually I solved it with pipe, still interested if it can be done without pipe.

kolak
18th January 2024, 14:04
Don't think it's possible without piping.

VoodooFX
18th February 2024, 22:10
@Jiyasharma

Your example writes mp3 to wav, I meant "wav" as PCM wav.

qyot27
19th February 2024, 03:14
The facetious answer? Take the code for LAME's psychoacoustics model(s) and make it into a filter library that just does generic processing on PCM samples so it could be inserted into arbitrary audio pipelines.

Barring that, you'd have to study the exact steps those models perform and attempt to replicate it using the audio filters in libavfilter, SoX, etc. It almost certainly won't be 1:1, but you might be able to get close.