ffmpeg Unrecognized option '--enable-libopus' - ffmpeg

I'm running ffmpeg from a windows 10 machine.
My goal is to trim silence from the beginning to the end of a track (this works just fine) and compress using opus.
I am new in the "audio elaboration" world so maybe I'm not understanding this properly...but the main issue here is that ffmpeg doesn't recognize --enable-libopus although it's clearly in the options (see attachment).
Can anyone help please?

--enable-libopus in the build configuration indicates that libopus is available.
To use it as an encoder, you have to use the codec option.
ffmpeg -i input -af silenceremove... -c:a libopus -b:a 96k out.opus

Related

How to use the hardware acceleration for ffmepg on m1-max?

Since there aren't m1 builds available from ffmpeg.org, I had to compile my own. Obviously, I'd like to get the best possible performance.
Does ffmpeg use the "Hardware-accelerated H.264" on the m1 max?
Is there anything I need to do, like compiler flags, to get it?
Any switch at run time?
How can I verify that it's being used?
To compile ffmpeg, I just did the basics:
./configure --prefix=/tmp/ff --enable-gpl --enable-nonfree --enable-libx264
make
make install
For x264, I just did
./configure --prefix=/tmp/ff
make
make install
to run:
ffmpeg -i random.wmv -c:v libx264 -preset ultrafast -c:a aac output-ultra.mp4
Anything else I should be doing?
It looks like what I wanted was videotoolbox
Usage is documented here, basically
To use H.264/HEVC hardware encoding in macOS, just use the encoder -c:v h264_videotoolbox
Example:
ffmpeg -i random.wmv -c:v h264_videotoolbox -c:a aac junk-vt.mp4
Seems to be slightly faster than "ultrafast" with software, and much smaller files.
H264_videotoolbox is useless on M1 Pro. I don't see that the GPU is working. I use the same file to transcode h264_videotoolbox can only play to a 6.x magnification and -vcodec h264 Use CPU magnification to reach 12.x
Ffmpeg 5.1.2 macos 13.1

End of file on 19 min from start

I want to make like a youtube radio. It's infinity looping video(2 second) and one audio stream(radio). Always after 19 minutes, I getting an error. Does anyone know resolve for that?
UPD:
command: ffmpeg -re -stream_loop -1 -i video.mp4 -i http://127.0.0.1:3000/stream -c:v libx264 -preset ultrafast -map 0:v:0 -map 1:a:0 -filter_complex [0:v]fps=25,format=yuv420p -b:v 4500k -q:v 3 -f flv rtmp://a.rtmp.youtube.com/live2/KEY
Looks like bug #7547 ffmpeg quits with av_interleaved_write_frame message.
Comments indicate it may be an issue with librtmp. Your ffmpeg has been compiled with --enable-librtmp, so it may be affected. Using the built-in FFmpeg RTMP support may avoid this issue.
Recompile without --enable-librtmp (omit --with-rtmpdump if using Homebrew), or download an already compiled build from Evermeet and try that.

"The encoder 'aac' is experimental but experimental codecs are not enabled"

While converting flv to mp4 conversion using FFMPEG it's showing following error
[aac # 0x2b4b640] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
Actually it is not enough to add -strict -2 to the command line. It is very important where the -strict -2 is added and unfortunately this is not explained in the error message. It should be just before the last argument, that is, as follows:
ffmpeg -i infile -strict -2 outfile
Like the message says, the native ffmpeg AAC audio encoder is experimental and you need to add -strict -2 or -strict experimental to your command use it. However, this encoder is no longer marked as experimental, so recent ffmpeg builds do not need to use this option.
For the best results use libfdk_aac instead. You need to compile ffmpeg with this lib, see the compilation guide.
To set the audio encoder use -c:a libfdk_aac.
Try following command :
ffmpeg -i Inputfile.flv -vcodec h264 -acodec aac -strict -2 Filename.mp4
You can use this command to convert any type of video file into mp4 with x264 and with same quality.
I have tried so many ways but this worked for me like a charm. ;)
You can add the -strict experimental in your C++ code by setting the codec-context strict_std_complaince variable to -2 before opening the codec.
AVCodecContext *c;
c->strict_std_compliance = -2;
/* open it */
ret = avcodec_open2(c, codec, NULL);
See the original author's explanation here.
Your question answers itself.
Add -strict -2 to it. That should be enough

FFmpeg avcodec_find_encoder(AV_CODEC_ID_OPUS) and avcodec_find_decoder(AV_CODEC_ID_OPUS) both return NULL

The FFmpeg I am using is fine, because it works if I use AV_CODEC_ID_PCM_U8 and some the other CODEC with avcodec_find_encoder and avcodec_find_decoder.
Anybody knows why the finder coder functions always return NULL with AV_CODEC_ID_OPUS?
You need to check three things:
Is your fmpeg compiled with opus decodec? What does ffmpeg -decoders | grep libopus say?
Do you call av_register_all?
Is libopus present on your machine, and is it the same version ffmpeg expects (I'd try strace/ltrace)?
libopus is not compiled in by default:
ffmpeg-2.1.3> ./configure --help | grep opus
--enable-libopus enable Opus decoding via libopus [no]
so you need to specify --enable-libopus (and of course have libopus in your toolchain)
Once your ffmpeg lib has --enable-libopus you may also use
avcodec_find_decoder_by_name("libopus") and avcodec_find_encoder_by_name("libopus")

FMS FLV (Speex) to mp3/mp4/acc/wav

I'm trying to decode an FLV's audio to a playable format. I attempted to use this SO post: FMS FLV to mp3.. as an example, but my FLV is encoded in Speex.
I have compiled ffmpeg with --enable-libspeex on a Fedora 15 machine.
I believe this can be done with ffmpeg but I'm having a hard time figuring out how to do it.
Any thoughts? Thanks
Your ffmpeg needs to be configured with --enable-libspeex to support Speex decoding. Since you did not provide your OS I can not give any more specific instructions. Once you have a build of ffmpeg that can decode speex the most simple command would be:
ffmpeg -i input.flv output.wav
while reencoding flv file (speex to mp3) if you get sample rate error try this:
ffmpeg -i c:\in.flv -acodec libmp3lame -ar 44100 -vcodec copy c:\out.flv
It does not matter what your input. As long as you have the decoder and encoder enabled in your ffmpeg it will do it.
ffmpeg -i inputfile.flv -acodec libmp3lame any_other_parameters_you_want -vcodec copy out.flv
will do the trick.
run ffmpeg -codecs to see the codecs supported and ffmpeg -formats to see the formats supported in your install.

Resources