Opened 8 years ago

Last modified 8 years ago

#5804 open defect

pan audio filter parser fails to correctly parse LFE2 channel identifier

Reported by: Cody Opel Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: pan
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

The pan filter only expects alphabetical characters for channel identifiers so parsing LFE2 fails.

https://github.com/FFmpeg/FFmpeg/blob/eae2d89bf715bc3edff478174b43e1f388e768bf/libavfilter/af_pan.c#L73

ffmpeg -i test1.mp4 -filter:a 'pan=stereo|FL<FL<LFE2+FL|FR<LFE2+FR' ~/tmp/test.mkv
ffmpeg version 3.1.3 Copyright (c) 2000-2016 the FFmpeg developers

built with gcc 6.2.0 (GCC)
configuration: --disable-static --prefix=/nix/store/lg96h2rflg1yagkhyaw52031dkh3akl2-ffmpeg-3.1.3 --enable-gpl --enable-version3 --disable-nonfree --disable-thumb --enable-shared --disable-static --enable-pic --disable-small --enable-runtime-cpudetect --enable-gray --enable-swscale-alpha --disable-incompatible-libav-abi --enable-hardcoded-tables --enable-safe-bitstream-reader --disable-memalign-hack --enable-pthreads --disable-w32threads --disable-os2threads --enable-network --enable-pixelutils --enable-ffmpeg --enable-ffplay --enable-ffprobe --enable-ffserver --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --enable-avresample --enable-avutil --enable-postproc --enable-swresample --enable-swscale --enable-doc --disable-htmlpages --enable-manpages --disable-podpages --disable-txtpages --disable-audiotoolbox --disable-cuda --disable-cuvid --disable-d3d11va --disable-dxva2 --disable-libmfx --disable-libnpp --disable-mmal --disable-nvenc --enable-vaapi --disable-vda --enable-vdpau --disable-videotoolbox --enable-xvmc --disable-avisynth --enable-bzlib --disable-chromaprint --disable-crystalhd --disable-frei0r --enable-gcrypt --disable-gmp --enable-gnutls --enable-iconv --disable-jni --disable-ladspa --enable-libass --enable-libbluray --disable-libbs2b --disable-libcaca --disable-libcelt --disable-libcdio --disable-libdc1394 --disable-libebur128 --disable-libfaac --disable-libfdk-aac --enable-libfontconfig --disable-libflite --enable-libfreetype --disable-libfribidi --disable-libgme --disable-libgsm --disable-libiec61883 --disable-libilbc --disable-libkvazaar --disable-libmodplug --enable-libmp3lame --disable-libnut --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libopencv --disable-libopenh264 --disable-libopenjpeg --enable-libopus --enable-libpulse --disable-librubberband --disable-librtmp --disable-libschroedinger --disable-libshine --disable-libsmbclient --disable-libsnappy --enable-libsoxr --enable-libspeex --disable-libssh --disable-libtesseract --enable-libtheora --disable-libtwolame --enable-libv4l2 --disable-libvidstab --disable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --disable-libwavpack --disable-libwebp --enable-libx264 --enable-libx265 --disable-libxavs --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --disable-libxvid --disable-libzimg --disable-libzmq --disable-libzvbi --enable-lzma --disable-decklink --disable-mediacodec --disable-netcdf --disable-openal --disable-opencl --enable-opengl --disable-openssl --disable-schannel --enable-sdl --disable-securetransport --disable-x11grab --enable-zlib --disable-debug --enable-optimizations --disable-extra-warnings --disable-stripping
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test1.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.40.101

Duration: 00:01:00.10, start: 0.000000, bitrate: 5916 kb/s

Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 5907 kb/s, 23.98 fps, 23.98 tbr, 16k tbn, 180k tbc (default)
Metadata:

handler_name : VideoHandler

Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
Metadata:

handler_name : SoundHandler

[Parsed_pan_0 @ 0x190f820] Syntax error near "2+FL"
[AVFilterGraph @ 0x190e660] Error initializing filter 'pan' with args 'stereo|FL<LFE2+FL|FR<LFE2+FR'
Error opening filters!

Change History (1)

comment:1 by Carl Eugen Hoyos, 8 years ago

Reproduced by developer: set
Status: newopen

For future tickets, please remember to test current FFmpeg git head when reporting an issue.

$ ffmpeg -channel_layout LFE2 -f lavfi -i sine=d=1 -af "pan=1c|c0=LFE2" -f null -
ffmpeg version N-81473-gb2c6a11 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 29.100 / 55. 29.100
  libavcodec     57. 54.100 / 57. 54.100
  libavformat    57. 48.100 / 57. 48.100
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 57.100 /  6. 57.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, lavfi, from 'sine=d=1':
  Duration: N/A, start: 0.000000, bitrate: 705 kb/s
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, 1 channels (LFE2), s16, 705 kb/s
[Parsed_pan_0 @ 0x28b2a40] Syntax error near "2"
[AVFilterGraph @ 0x28b1b20] Error initializing filter 'pan' with args '1c|c0=LFE2'
Error opening filters!

The following does not show an error:

$ ffmpeg -channel_layout LFE2 -f lavfi -i sine=d=1 -af "pan=LFE2" -f null -
Note: See TracTickets for help on using tickets.