[FFmpeg-user] Variables in bash script causes 'Unrecognized option'

Elliott Balsley elliottbalsley at gmail.com
Thu Apr 10 04:53:37 CEST 2014


I want to use ffmpeg in a bash script with variables, like this:

ffpreopts="-loglevel warning"
ffmpeg "$ffpreopts"

But it fails with error: "Unrecognized option 'loglevel warning'.
This is only an example, I've tried various options besides loglevel
and none work when passed in a variable like this.

The command "ffmpeg -loglevel warning" works fine in a Terminal.  So
what's wrong with my syntax?

Full output from script:

ffmpeg version 2.1.git-ffb7d71 Copyright (c) 2000-2014 the FFmpeg developers
  built on Mar  7 2014 16:54:41 with Apple LLVM version 5.0
(clang-500.2.79) (based on LLVM 3.3svn)
  configuration: --prefix=/opt/local --enable-swscale
--enable-avfilter --enable-avresample --enable-libmp3lame
--enable-libvorbis --enable-libopus --enable-libtheora
--enable-libschroedinger --enable-libopenjpeg --enable-libmodplug
--enable-libvpx --enable-libspeex --enable-libass --enable-libbluray
--enable-gnutls --enable-fontconfig --enable-libfreetype
--disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man
--enable-shared --enable-pthreads --cc=/usr/bin/cc --arch=x86_64
--enable-yasm --enable-gpl --enable-postproc --enable-libx264
--enable-libxvid --enable-nonfree --enable-libfdk-aac --enable-libfaac
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libavresample   1.  2.  0 /  1.  2.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Unrecognized option 'loglevel warning'.
Error splitting the argument list: Option not found


More information about the ffmpeg-user mailing list