Answers.Body: <p>Assuming you're using bash or a similar shell, you need double quotes. Single quotes conveys its contents literally.</p>
  
  <pre><code>curves=r="0/0 .83/$var3 1/1":g="0/0 0.84/$var3 1/1":b="0/0 0.88/$var3 1/1"
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-12T21:24:16.313Z
Answers.Text: Thanks so much! I knew it was simple, but i don't think i would have figured that out for days :)
Answers.UserDisplayName: Leon Digz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-12T21:08:56.813Z
Answers.LastActivityDate: 2018-07-12T21:08:56.813Z
Answers.UserDisplayName: Gyan
Body: <p>I'm tearing my hair out trying to get this to work, i assume it's a syntax issue.</p>
  
  <p>I'm experimenting with the curves video filter in ffmpeg. When I enter the coordinates in the standard form;</p>
  
  <pre><code>ffmpeg -y -i 0.jpg -vf curves=r='0/0 .83/.88 1/1':g='0/0 0.84/0.88 1/1':b='0/0 0.88/0.88 1/1' curves.png;
  </code></pre>
  
  <p>....I have no issues.</p>
  
  <p>I am trying, however, to use variables vs fixed numbers for the curve points and i cannot in anyway get ffmpeg to accept it.</p>
  
  <p>For example if i simply type;</p>
  
  <pre><code>var3=0.88
  </code></pre>
  
  <p>and then repeat the code with;</p>
  
  <pre><code>ffmpeg -y -i 0.jpg -vf curves=r='0/0 .83/$var3 1/1':g='0/0 0.84/$var3 1/1':b='0/0 0.88/$var3 1/1' curves.png;
  </code></pre>
  
  <p>it won't work, it's sees $var3 as being 0.000000</p>
  
  <p>also tried;</p>
  
  <pre><code>ffmpeg -y -i 0.jpg -vf curves=r='0/0 .83/${var3} 1/1':g='0/0 0.84/${var3} 1/1':b='0/0 0.88/${var3} 1/1' curves.png;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>ffmpeg -y -i 0.jpg -vf curves=r='0/0 .83/`echo $var3` 1/1':g='0/0 0.84/`echo $var3 1/1':b='0/0 0.88/`echo $var3 1/1' curves.png;
  </code></pre>
  
  <p>I'm out of ideas. Could anyone help in this situation, really need these to be variables vs fixed numbers for my purposes.</p>
  
  <p>Thanks!</p>
  
Tags: <ffmpeg>
Title: FFMPEG - Using variables in curves video filer expression
UserDisplayName: Leon Digz
ThreadText: # FFMPEG - Using variables in curves video filer expression
  
  (Asked by: username_0 on 2018-07-12)
  
  I'm tearing my hair out trying to get this to work, i assume it's a syntax issue.
  
  I'm experimenting with the curves video filter in ffmpeg. When I enter the coordinates in the standard form;
  
  ```
  ffmpeg -y -i 0.jpg -vf curves=r='0/0 .83/.88 1/1':g='0/0 0.84/0.88 1/1':b='0/0 0.88/0.88 1/1' curves.png;
  
  ```
  
  ....I have no issues.
  
  I am trying, however, to use variables vs fixed numbers for the curve points and i cannot in anyway get ffmpeg to accept it.
  
  For example if i simply type;
  
  ```
  var3=0.88
  
  ```
  
  and then repeat the code with;
  
  ```
  ffmpeg -y -i 0.jpg -vf curves=r='0/0 .83/$var3 1/1':g='0/0 0.84/$var3 1/1':b='0/0 0.88/$var3 1/1' curves.png;
  
  ```
  
  it won't work, it's sees $var3 as being 0.000000
  
  also tried;
  
  ```
  ffmpeg -y -i 0.jpg -vf curves=r='0/0 .83/${var3} 1/1':g='0/0 0.84/${var3} 1/1':b='0/0 0.88/${var3} 1/1' curves.png;
  
  ```
  
  and
  
  ```
  ffmpeg -y -i 0.jpg -vf curves=r='0/0 .83/`echo $var3` 1/1':g='0/0 0.84/`echo $var3 1/1':b='0/0 0.88/`echo $var3 1/1' curves.png;
  
  ```
  
  I'm out of ideas. Could anyone help in this situation, really need these to be variables vs fixed numbers for my purposes.
  
  Thanks!
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-07-12. Score: 0 | Accepted answer
  
  Assuming you're using bash or a similar shell, you need double quotes. Single quotes conveys its contents literally.
  
  ```
  curves=r="0/0 .83/$var3 1/1":g="0/0 0.84/$var3 1/1":b="0/0 0.88/$var3 1/1"
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks so much! I knew it was simple, but i don't think i would have figured that out for days :)  
  
  ---
  
  