Ffmpeg: error while re-encoding video

I am trying to transcode a video using ffmpeg and I get this error:

[aac @ 0x3752e40] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it. 

Team and full exit ::

 /root$ /usr/bin/ffmpeg -i http://website.com/uploads/usr_videos/MVI_05571.mp4 -b:v 500k -threads 4 -vf scale=-1:144 -b:a 128k http://website.com/uploads/usr_videos/144p_output.mp4 ffmpeg version 2.5.4 Copyright (c) 2000-2015 the FFmpeg developers built on Feb 18 2015 01:39:38 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11) configuration: libavutil 54. 15.100 / 54. 15.100 libavcodec 56. 13.100 / 56. 13.100 libavformat 56. 15.102 / 56. 15.102 libavdevice 56. 3.100 / 56. 3.100 libavfilter 5. 2.103 / 5. 2.103 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'http://website.com/uploads/usr_videos/MVI_05571.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf54.63.104 Duration: 00:01:48.26, start: 0.023220, bitrate: 7122 kb/s Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 6990 kb/s, 29 fps, 29 tbr, 14848 tbn, 29 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 126 kb/s (default) Metadata: handler_name : SoundHandler [aac @ 0x3752e40] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it. 

So can anyone before me understand what this error means and how can I fix it?
I am using ffmpeg version 2.5 on a centOS server.

+6
source share
3 answers

A quick fix is ​​to add the -strict -2 option immediately before the last argument (exit name).

There are several different AAC encoders that FFmpeg can use. For better quality, use the libfdk_aac encoder. Unfortunately, the libfdk_aac license is not compatible with the GPL, which means that the GPL does not allow distributing executable files obtained from both libx264 (GPL) (used to encode H.264 video) and libfdk_aac (used to encode AAC audio). However, this can be a great choice if you yourself create FFmpeg. If your FFmpeg was created using libfdk_aac, you can use it with the -c:a libfdk_aac in front of the output file name.

FFmpeg also has an experimental built-in AAC encoder, which has poor quality at a given bitrate, but a compatible license. Since it is experimental, it is not used by default, but it can be used if you enabled the -strict experimental or -strict -2 option directly in front of the output file name to enable experimental codecs.

See the FFmpeg AAC Encoding Guide for more details.

+21
source

If you use aac to encode the stream programmatically, you can include an experimental function in the AVCodecContext , as shown below.

 AVCodecContext* enc_ctx; // ... enc_ctx->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL; 
0
source

The native FFmpeg AAC encoder ( -codec:a aac ) is no longer experimental as of 2015-12-05. Use a recent build from the current git branch and you won’t have to use the -strict .

0
source

Source: https://habr.com/ru/post/982685/


All Articles