Question

I spent last 4 days trying to acheive that but with no luck,

I am trying to detect volume of streaming link or save audio file, using the FFmpeg I tried every single command line.

ffmpeg -f lavfi -i amovie=sample1.aac,volumedetect -f null -y test.txt

Output

There was a problem! Array (
    [0] => FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
    [1] => built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
    [2] => configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
    [3] => libavutil 50.15. 1 / 50.15. 1
    [4] => libavcodec 52.72. 2 / 52.72. 2
    [5] => libavformat 52.64. 2 / 52.64. 2
    [6] => libavdevice 52. 2. 0 / 52. 2. 0
    [7] => libavfilter 1.19. 0 / 1.19. 0
    [8] => libswscale 0.11. 0 / 0.11. 0
    [9] => libpostproc 51. 2. 0 / 51. 2. 0
    [10] => Unknown input format: 'lavf'
)

Basically my problem now is :

 Unknown input format: 'lavf'

Any help please

My FFMpeg Version is

[root@bea ~]# ffmpeg -formats | grep lavfi

FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6) configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab libavutil 50.15. 1 / 50.15. 1 libavcodec 52.72. 2 / 52.72. 2 libavformat 52.64. 2 / 52.64. 2 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.19. 0 / 1.19. 0 libswscale 0.11. 0 / 0.11. 0 libpostproc 51. 2. 0 / 51. 2. 0

From PHP info

ffmpeg

ffmpeg-php version 0.6.0-svn ffmpeg-php built on Sep 21 2013 15:38:20 ffmpeg-php gd support enabled ffmpeg libavcodec version Lavc52.72.2 ffmpeg libavformat version Lavf52.64.2 ffmpeg swscaler version SwS0.11.0

Directive Local Value Master Value ffmpeg.allow_persistent 0 0 ffmpeg.show_warnings 0 0

Was it helpful?

Solution

I think your ffmpeg is too old to support lavfi. Find out by doing ffmpeg -formats. lavfi should be part of the list? You can try

ffmpeg -formats | grep lavfi

The following works fine otherwise.

ffmpeg -f lavfi -i amovie=sample1.aac,volumedetect 
[aac @ 0x1e26a20] Estimating duration from bitrate, this may be inaccurate
[lavfi @ 0x1e25a60] Estimating duration from bitrate, this may be inaccurate
Input #0, lavfi, from 'amovie=sample1.aac,volumedetect':
  Duration: N/A, start: 0.023220, bitrate: 1411 kb/s
  Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
At least one output file must be specified
n_samples: 2048
[Parsed_volumedetect_1 @ 0x1e27280] mean_volume: -61.9 dB
[Parsed_volumedetect_1 @ 0x1e27280] max_volume: -49.0 dB
[Parsed_volumedetect_1 @ 0x1e27280] histogram_49db: 14

OTHER TIPS

I solved it Thanks to AV501,

I did updated the FFMpeg to FFmpeg 2

and I used the code as following :

/usr/local/bin/ffmpeg -f lavfi -i amovie=sample1.aac,volumedetect 

And it did work fine,

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top