Answers.Body: <p>Through trial and error, imitating different people's syntax used in similar commands, plus at the suggestion of an ffmpeg error message, I've come up with the following, and it worked as expected:</p>
  
  <pre><code> ffmpeg -i input.m2t -filter_complex "scale=852:480,setsar=1","eq=brightness=0.1:saturation=1.5" -crf 24 -c:a aac -b:a 48k -ac 1 -movflags +faststart output.mp4
  </code></pre>
  
  <p>The first change is <code>-vf</code> needed to be changed to <code>-filter_complex</code>. ffmpeg suggested this in an error message. After that, just separating the two commands with a comma, then also quoting the new command did the trick. So the syntax is very much like a csv.</p>
  
  <p>If you have more insight, please post an answer.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-19T00:16:58.583Z
Answers.LastActivityDate: 2018-04-19T00:16:58.583Z
Answers.UserDisplayName: user3643
Answers.Body: <p>Filter complex isn't needed. When a series of filters are to be applied to a single input in sequence, they are to be separated with a comma and passed along as a single filterchain (<code>-vf</code>, <code>-af</code>). You already did that with the setsar. So,</p>
  
  <pre><code> ffmpeg -i input.m2t -vf "scale=852:480,setsar=1,eq=brightness=0.1:saturation=1.5" -crf 24 -c:a aac -b:a 48k -ac 1 -movflags +faststart output.mp4
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-19T05:34:20.160Z
Answers.Text: Hmmm. I thought I tried that one, but I'll double check. What would be the difference in using `-vf` instead of `-filter_complex`?
Answers.UserDisplayName: user3643
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-19T06:03:35.870Z
Answers.Text: filter_complex is meant for filtering multiple streams in a combination of serial and/or parallel sequences. You can also combine those multiple streams, like when using `overlay` filter. For this specific case, ther's no difference, but the correct answer for your issue isn't that filter_complex is needed.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-04-19T05:12:18.020Z
Answers.LastActivityDate: 2018-04-19T05:12:18.020Z
Answers.UserDisplayName: Gyan
Body: <p>I'm currently using the following batch script to run an ffmpeg command:</p>
  
  <pre><code>@echo off
  title Convert videos to Mp4 h.264 with FFMPEG. 
  echo This script will find all video files of a given extension then make an mp4 h.264 file out of them.
  set /p folder="Enter the folder path (cannot contain spaces; must have trailing slash \): "
  set /p ft="Enter file type extension: "
  set /p abitrate="Enter the audio bitrate in kbps (usually 48): "
  set /p size="Enter video width and height (w:h) (usually 852:480): "
  set /p vcrf="Enter the video crf value (usually 24): "
  for %%f in (%folder%*.%ft%) do ffmpeg -i "%%f" -vf "scale=%size%,setsar=1" -crf %vcrf% -c:a aac -b:a %abitrate%k -ac 1 -movflags +faststart "%folder%%%~nf.mp4"
  pause
  </code></pre>
  
  <p>The script says what it does in the description at the top. I built it to convert HDV .m2t files to web-ready mp4 files. If I extract the ffmpeg command from the script loop, it looks like this:</p>
  
  <pre><code> ffmpeg -i input.m2t -vf "scale=852:480,setsar=1" -crf 24 -c:a aac -b:a 48k -ac 1 -movflags +faststart output.mp4
  </code></pre>
  
  <p>I have some videos that need color correction, so I just want to toss a filter on them before I encode. I've fiddled with ffplay and determined that the look I want will require the following command, which <a href="https://video.stackexchange.com/a/20963/3643">has been modified from this answer</a>:</p>
  
  <pre><code> -vf eq=brightness=0.1:saturation=1.5
  </code></pre>
  
  <p>The issue I'm having is integrating this new <code>-vf</code> line into the main command. If I put it separately, ffmpeg ignores the first one for the second one. If it put them together in the quotes, it throws errors. I assume this is a syntax issue, but maybe not. The main command seems to be using commas for separators, but this new command uses colons.</p>
  
Tags: <ffmpeg><color-correction><scale>
Title: How to combine ffmpeg vf commands for resizing and color correction?
UserDisplayName: user3643
ThreadText: # How to combine ffmpeg vf commands for resizing and color correction?
  
  (Asked by: username_0 on 2018-04-18)
  
  I'm currently using the following batch script to run an ffmpeg command:
  
  ```
  @echo off
  title Convert videos to Mp4 h.264 with FFMPEG. 
  echo This script will find all video files of a given extension then make an mp4 h.264 file out of them.
  set /p folder="Enter the folder path (cannot contain spaces; must have trailing slash \): "
  set /p ft="Enter file type extension: "
  set /p abitrate="Enter the audio bitrate in kbps (usually 48): "
  set /p size="Enter video width and height (w:h) (usually 852:480): "
  set /p vcrf="Enter the video crf value (usually 24): "
  for %%f in (%folder%*.%ft%) do ffmpeg -i "%%f" -vf "scale=%size%,setsar=1" -crf %vcrf% -c:a aac -b:a %abitrate%k -ac 1 -movflags +faststart "%folder%%%~nf.mp4"
  pause
  
  ```
  
  The script says what it does in the description at the top. I built it to convert HDV .m2t files to web-ready mp4 files. If I extract the ffmpeg command from the script loop, it looks like this:
  
  ```
   ffmpeg -i input.m2t -vf "scale=852:480,setsar=1" -crf 24 -c:a aac -b:a 48k -ac 1 -movflags +faststart output.mp4
  
  ```
  
  I have some videos that need color correction, so I just want to toss a filter on them before I encode. I've fiddled with ffplay and determined that the look I want will require the following command, which [has been modified from this answer](https://video.stackexchange.com/a/20963/3643):
  
  ```
   -vf eq=brightness=0.1:saturation=1.5
  
  ```
  
  The issue I'm having is integrating this new `-vf` line into the main command. If I put it separately, ffmpeg ignores the first one for the second one. If it put them together in the quotes, it throws errors. I assume this is a syntax issue, but maybe not. The main command seems to be using commas for separators, but this new command uses colons.
  
  **Tags:** ffmpeg, color-correction, scale
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-04-19. Score: 7 | Accepted answer
  
  Filter complex isn't needed. When a series of filters are to be applied to a single input in sequence, they are to be separated with a comma and passed along as a single filterchain (`-vf`, `-af`). You already did that with the setsar. So,
  
  ```
   ffmpeg -i input.m2t -vf "scale=852:480,setsar=1,eq=brightness=0.1:saturation=1.5" -crf 24 -c:a aac -b:a 48k -ac 1 -movflags +faststart output.mp4
  
  ```
  
  > **Comments:**
  > **username_0**: Hmmm. I thought I tried that one, but I'll double check. What would be the difference in using `-vf` instead of `-filter_complex`?  
  > **username_1**: filter_complex is meant for filtering multiple streams in a combination of serial and/or parallel sequences. You can also combine those multiple streams, like when using `overlay` filter. For this specific case, ther's no difference, but the correct answer for your issue isn't that filter_complex is needed.  
  
  ---
  
  ### Answer by username_0 on 2018-04-19. Score: 0
  
  Through trial and error, imitating different people's syntax used in similar commands, plus at the suggestion of an ffmpeg error message, I've come up with the following, and it worked as expected:
  
  ```
   ffmpeg -i input.m2t -filter_complex "scale=852:480,setsar=1","eq=brightness=0.1:saturation=1.5" -crf 24 -c:a aac -b:a 48k -ac 1 -movflags +faststart output.mp4
  
  ```
  
  The first change is `-vf` needed to be changed to `-filter_complex`. ffmpeg suggested this in an error message. After that, just separating the two commands with a comma, then also quoting the new command did the trick. So the syntax is very much like a csv.
  
  If you have more insight, please post an answer.
  
  
  ---
  
  