Search code examples
videoffmpegrtmpvideo-watermarking

Selective "Unkown encoder libfdk_aac" message


Out of the following two commands, the 2nd throws exception saying "unknown codec libfdk_aac". Can anyone point me, to what might be the issue?

$> ffmpeg -loglevel verbose -re -i /var/mp4s/test4.mp4  -vcodec libx264 -vprofile baseline -acodec libfdk_aac -ar 44100 -ac 1 -f flv rtmp://localhost/hls/hls
$> ffmpeg -loglevel verbose -re -i /var/mp4s/test4.mp4 -i /var/mp4s/watermark.png -filter_complex overlay -c:a libfdk_aac -f /var/mp4s/output.mp4

Obviously, the 1st one publishes an RTMP stream from a file. The second one is intended to watermark the stream. I had tried creating file from the stream first to test the command.

FYI: ffmpeg has been compiled with "libfdk_aac" libraries. Strange thing, I do even see it listed upon querying for Audio-codecs.

Update to the question to reproduce the same, with a different command

souvik@PFTBLR-DEV-6:/var/segmented/high$ sudo /home/souvik/bin/ffmpeg -i ../../mp4s/output.mp4 -c:a libfdk-aac -ar 48000 -ab 64k -c:v libx264 -b:v 96k -flags -global_header -map 0 -f segment -segment_list index.m3u8 -segment_format mpegts index%03d.ts
ffmpeg version N-76286-g15d8b65 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
configuration: --prefix=/home/souvik/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/souvik/ffmpeg_build/include --extra-ldflags=-L/home/souvik/ffmpeg_build/lib --bindir=/home/souvik/bin --enable-gpl --enable-libfdk-aac --enable-libmp3lame --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 55. 4.100 / 55. 4.100
libavcodec 57. 10.100 / 57. 10.100
libavformat 57. 11.100 / 57. 11.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 14.100 / 6. 14.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../../mp4s/output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.15.102
Duration: 00:02:27.32, start: 0.021333, bitrate: 607 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 474 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Unknown encoder 'libfdk-aac'
souvik@PFTBLR-DEV-6:/var/segmented/high$ 


Solution

  • There is a typo: use libfdk_aac not libfdk-aac.