[FFmpeg-user] Can ffmpeg ignore the "Cannot find a matching stream" error when using -filter_complex?

Hugo Li aawl2001 at gmail.com
Thu Dec 3 03:17:25 CET 2015


Hi, all
    I'm trying to convert av files using following command:
ffmpeg -i INPUTFILE -filter_complex scale=400x300 -c:v libx264 -b:v 100k
-strict -2 -c:a aac -b:a 30k test.mp4
    It's ok when INPUTFILE contains video. But in case the INPUTFILE
doesn't contain video, following error will happen and the converting is
terminated.
So, my question is can ffmpeg ignore the "-filter_complex" parameters if
the input file doesn't contain video?
I know ffmpeg can ignore "-s" option, but I have to use "-filter_complex"
in my case.

Thanks,
Jason

======================================================================================
D:\stream\hls>ffmpeg -i audio.mp3 -filter_complex scale=400x300 -c:v
libx264 -b:
v 100k -strict -2 -c:a aac -b:a 30k test.mp4
ffmpeg version N-76347-gdd36749 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls
--enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b
--enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm
--enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp
--en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora
--ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc
--enable-libvo-amrwbenc
 --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
--enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma
--ena
ble-decklink --enable-zlib
  libavutil      55.  5.100 / 55.  5.100
  libavcodec     57. 12.100 / 57. 12.100
  libavformat    57. 11.100 / 57. 11.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 14.101 /  6. 14.101
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
[mp3 @ 00000000005434a0] Skipping 0 bytes of junk at 326.
Input #0, mp3, from 'audio.mp3':
  Metadata:
    major_brand     : isom
    minor_version   : 1
    compatible_brands: isom
    encoder         : Lavf57.11.100
  Duration: 00:28:16.10, start: 0.023021, bitrate: 128 kb/s
    Stream #0:0: Audio: mp3, 48000 Hz, stereo, s16p, 128 kb/s
    Metadata:
      encoder         : Lavc57.12
Cannot find a matching stream for unlabeled input pad 0 on filter
Parsed_scale_0
=====================================================================================


More information about the ffmpeg-user mailing list