Answers.Body: <p>The main reason lays in selecting an appropriate stream (audio or video) for filterchains <em>with no input labels,</em> for example</p>
  
  <pre><code>-filter_complex "[0:v]hue=s=0,split=2[outv1][outv2];fade;afade
  </code></pre>
  
  <p>The first filterchain <code>[0:v]hue=s=0,split=2[outv1][outv2]</code> has specified input label (<code>[1:v]</code>) but two others not.</p>
  
  <p>So:</p>
  
  <ul>
  <li>for the <code>fade</code> filter will be selected the first unused <strong>video</strong> stream, while </li>
  <li>for the <code>afade</code> filter will be selected the first unused <strong>audio</strong> stream.</li>
  </ul>
  
  <p>(In the case of only 1 video stream and only 1 audio stream in both input files in <code>ffmpeg -i input1 -i input2 ...</code>), the first unused <strong>video</strong> stream will be the video stream from the <em>second</em> input file, and the first unused <strong>audio</strong> stream will be the audio stream from the <em>first</em> input file.)</p>
  
  <p>If there would be the <em>same</em> names for both video and audio filters, then filterchains with no input labels <em>could't be allowed.</em></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-04T06:19:16.517Z
Answers.Text: This is not a fatal problem. See the concat filter, which has options to set number of segments, and types of media. Even without linklabels, the filtergraph can be made to autoselect inputs based on that info e.g. `fade=media=audio:type=out:...`
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-04T14:01:15.760Z
Answers.Text: @Gyan, thanks for your useful info, but you would still have to specify `media=audio`, while for `afade` you needn't.
Answers.UserDisplayName: MarianD
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-04T14:55:32.707Z
Answers.Text: True. I'm just pointing out that the main reason isn't technical. It's historical as Paul says.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-04T00:57:05.387Z
Answers.LastActivityDate: 2020-01-04T00:57:05.387Z
Answers.UserDisplayName: MarianD
Body: <p>There are many pairs of video and audio filters for the same purpose - one for <em>video</em> streams and the other for <em>audio</em> streams.</p>
  
  <p>For example <code>fade - afade</code>, <code>trim - atrim</code>, <code>split - asplit</code>, <code>loop - aloop</code>.</p>
  
  <p>The names for audio filters have the <code>a</code> prefix.</p>
  
  <p>Why? Why they are <em>different</em> names for <em>video</em> and audio <em>filters</em>? </p>
  
  <p>After all, every filter is applied to a <em>particular individual</em> stream, isn't it? So FFmpeg knows in advance the type of that stream, and is able to decide itself what type of filter have to use (video or audio), even if the names would be the same.</p>
  
Tags: <ffmpeg>
Title: Different names for video resp. audio filters
UserDisplayName: MarianD
ThreadText: # Different names for video resp. audio filters
  
  (Asked by: username_0 on 2019-06-03)
  
  There are many pairs of video and audio filters for the same purpose - one for *video* streams and the other for *audio* streams.
  
  For example `fade - afade`, `trim - atrim`, `split - asplit`, `loop - aloop`.
  
  The names for audio filters have the `a` prefix.
  
  Why? Why they are *different* names for *video* and audio *filters*?
  
  After all, every filter is applied to a *particular individual* stream, isn't it? So FFmpeg knows in advance the type of that stream, and is able to decide itself what type of filter have to use (video or audio), even if the names would be the same.
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2020-01-04. Score: 0
  
  The main reason lays in selecting an appropriate stream (audio or video) for filterchains *with no input labels,* for example
  
  ```
  -filter_complex "[0:v]hue=s=0,split=2[outv1][outv2];fade;afade
  
  ```
  
  The first filterchain `[0:v]hue=s=0,split=2[outv1][outv2]` has specified input label (`[1:v]`) but two others not.
  
  So:
  
  * for the `fade` filter will be selected the first unused **video** stream, while
  * for the `afade` filter will be selected the first unused **audio** stream.
  
  (In the case of only 1 video stream and only 1 audio stream in both input files in `ffmpeg -i input1 -i input2 ...`), the first unused **video** stream will be the video stream from the *second* input file, and the first unused **audio** stream will be the audio stream from the *first* input file.)
  
  If there would be the *same* names for both video and audio filters, then filterchains with no input labels *could't be allowed.*
  
  > **Comments:**
  > **username_1**: This is not a fatal problem. See the concat filter, which has options to set number of segments, and types of media. Even without linklabels, the filtergraph can be made to autoselect inputs based on that info e.g. `fade=media=audio:type=out:...`  
  > **username_0**: @username_1, thanks for your useful info, but you would still have to specify `media=audio`, while for `afade` you needn't.  
  > **username_1**: True. I'm just pointing out that the main reason isn't technical. It's historical as Paul says.  
  
  ---
  
  