Answers.Body: <p>The image to be scrolled has to be looped first and then scrolled.</p>
  
  <pre><code>ffmpeg -vsync 0 -i /tmp/2SN92agDIG.png -i /tmp/TogmpB9etD.png -i /tmp/lxiQXCxhaZ-1.png -filter_complex "color=size=312x312:c=0xffffff[color];\
  [0:v]setpts=PTS-STARTPTS,setsar=1,scale=480x320,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=1[0v];\
  [1:v]setpts=PTS-STARTPTS,setsar=1,scale=298x301,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=0.8[1v];\
  [2:v]setpts=PTS-STARTPTS,setsar=1,scale=288x614,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=1,loop=1:1,scroll=vertical=0.02857142857142857[2v];\
  [color][0v]overlay=x=-76.18:y=-4[-1+0];\
  [-1+0][1v]overlay=x=8.043499999999995:y=5.044000000000011[0+1];\
  [0+1][2v]overlay=x=8.021000000000015:y=0" -c:v h264_nvenc -t 35 -y out.mp4
  </code></pre>
  
  <p>(there are quite a few unnecessary or inert elements in this command, but I haven't removed them, such as the rotate filters which don't perform any rotation)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-30T06:47:14.167Z
Answers.Text: Thanks for you help, I tried with your command and the result is I only have a little movement at the beginning (less than a second) but it's fixed then
Answers.UserDisplayName: Julien Planchet
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-30T06:51:38.640Z
Answers.Text: I added like loop=-1:75:0 and it's working like a charm :) Thanks for your help
Answers.UserDisplayName: Julien Planchet
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-29T14:47:18.430Z
Answers.LastActivityDate: 2020-03-29T14:47:18.430Z
Answers.UserDisplayName: Gyan
Body: <p>I apply filter_complex to put objects on coordinates using overlay. Sometime, I need to use the scroll filter.</p>
  
  <p>Here is the code </p>
  
  <pre><code>ffmpeg -vsync 0 -i /tmp/2SN92agDIG.png -i /tmp/TogmpB9etD.png -i /tmp/lxiQXCxhaZ-1.png -filter_complex "color=size=312x312:c=0xffffff,loop=-1[color];\
  [0:v]setpts=PTS-STARTPTS,setsar=1,scale=480x320,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=1[0];\
  [1:v]setpts=PTS-STARTPTS,setsar=1,scale=298x301,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=0.8[1];\
  [2:v]setpts=PTS-STARTPTS,setsar=1,scale=288x614,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=1[2];\
  [color][0]overlay=x=-76.18:y=-4[-1+0];\
  [-1+0][1]overlay=x=8.043499999999995:y=5.044000000000011[0+1];\
  [0+1][2]overlay=x=8.021000000000015:y=0,scroll=vertical=0.02857142857142857" -map 0:a? -c:v h264_nvenc -c:a copy -t 35 -y
  </code></pre>
  
  <p>It works great but when this filter is applied on an object which is on top of other objects (Ex. third object in the filter complex chain), the scroll is applied to all under layer.</p>
  
  <p>Do you have an idea how can I "isolate" the scroll to be applies only on one object ?</p>
  
  <p>Thanks.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-25T12:06:30.220Z
Comments.Text: The scroll should be applied within the `[2:v]` filtering.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T11:22:19.263Z
Comments.Text: How can I connect the output of the filter scroll to my filter_complex ? Thanks
Comments.UserDisplayName: Julien Planchet
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T11:25:57.493Z
Comments.Text: Shift the scroll to after the `colorchannelmixer` for `2:v`
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T13:05:35.860Z
Comments.Text: I tried this `[2:v]setpts=PTS-STARTPTS,setsar=1,scale=288x614,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=1,scroll=vertical=0.02857142857142857[2];` But i got `Filter scroll has an unconnected output`
Comments.UserDisplayName: Julien Planchet
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T15:41:44.343Z
Comments.Text: Add -report and rerun. Share report.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T17:12:31.493Z
Comments.Text: Here it is : https://pastebin.com/GEAwbsXH  Thanks for your help :)
Comments.UserDisplayName: Julien Planchet
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T18:01:10.320Z
Comments.Text: You removed the final overlay. Why?
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-27T18:27:31.873Z
Comments.Text: Because if I let it, there is no movement
Comments.UserDisplayName: Julien Planchet
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-28T09:12:41.617Z
Comments.Text: I'll try to reproduce.
Comments.UserDisplayName: Gyan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-03-29T11:50:43.853Z
Comments.Text: Did you find a way ?
Comments.UserDisplayName: Julien Planchet
Tags: <ffmpeg><filter>
Title: FFMPEG - Scroll filter on filter_complex applies on under layer
UserDisplayName: Julien Planchet
ThreadText: # FFMPEG - Scroll filter on filter_complex applies on under layer
  
  (Asked by: username_0 on 2020-03-25)
  
  I apply filter\_complex to put objects on coordinates using overlay. Sometime, I need to use the scroll filter.
  
  Here is the code
  
  ```
  ffmpeg -vsync 0 -i /tmp/2SN92agDIG.png -i /tmp/TogmpB9etD.png -i /tmp/lxiQXCxhaZ-1.png -filter_complex "color=size=312x312:c=0xffffff,loop=-1[color];\
  [0:v]setpts=PTS-STARTPTS,setsar=1,scale=480x320,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=1[0];\
  [1:v]setpts=PTS-STARTPTS,setsar=1,scale=298x301,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=0.8[1];\
  [2:v]setpts=PTS-STARTPTS,setsar=1,scale=288x614,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=1[2];\
  [color][0]overlay=x=-76.18:y=-4[-1+0];\
  [-1+0][1]overlay=x=8.043499999999995:y=5.044000000000011[0+1];\
  [0+1][2]overlay=x=8.021000000000015:y=0,scroll=vertical=0.02857142857142857" -map 0:a? -c:v h264_nvenc -c:a copy -t 35 -y
  
  ```
  
  It works great but when this filter is applied on an object which is on top of other objects (Ex. third object in the filter complex chain), the scroll is applied to all under layer.
  
  Do you have an idea how can I "isolate" the scroll to be applies only on one object ?
  
  Thanks.
  
  **Tags:** ffmpeg, filter
  
  > **Comments:**
  > **username_1**: The scroll should be applied within the `[2:v]` filtering.  
  > **username_0**: How can I connect the output of the filter scroll to my filter_complex ? Thanks  
  > **username_1**: Shift the scroll to after the `colorchannelmixer` for `2:v`  
  > **username_0**: I tried this `[2:v]setpts=PTS-STARTPTS,setsar=1,scale=288x614,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=1,scroll=vertical=0.02857142857142857[2];` But i got `Filter scroll has an unconnected output`  
  > **username_1**: Add -report and rerun. Share report.  
  > **username_0**: Here it is : https://pastebin.com/GEAwbsXH  Thanks for your help :)  
  > **username_1**: You removed the final overlay. Why?  
  > **username_0**: Because if I let it, there is no movement  
  > **username_1**: I'll try to reproduce.  
  > **username_0**: Did you find a way ?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-03-29. Score: 0 | Accepted answer
  
  The image to be scrolled has to be looped first and then scrolled.
  
  ```
  ffmpeg -vsync 0 -i /tmp/2SN92agDIG.png -i /tmp/TogmpB9etD.png -i /tmp/lxiQXCxhaZ-1.png -filter_complex "color=size=312x312:c=0xffffff[color];\
  [0:v]setpts=PTS-STARTPTS,setsar=1,scale=480x320,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=1[0v];\
  [1:v]setpts=PTS-STARTPTS,setsar=1,scale=298x301,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=0.8[1v];\
  [2:v]setpts=PTS-STARTPTS,setsar=1,scale=288x614,rotate=0:c=none:ow=rotw(0):oh=roth(0),format=argb,colorchannelmixer=aa=1,loop=1:1,scroll=vertical=0.02857142857142857[2v];\
  [color][0v]overlay=x=-76.18:y=-4[-1+0];\
  [-1+0][1v]overlay=x=8.043499999999995:y=5.044000000000011[0+1];\
  [0+1][2v]overlay=x=8.021000000000015:y=0" -c:v h264_nvenc -t 35 -y out.mp4
  
  ```
  
  (there are quite a few unnecessary or inert elements in this command, but I haven't removed them, such as the rotate filters which don't perform any rotation)
  
  > **Comments:**
  > **username_0**: Thanks for you help, I tried with your command and the result is I only have a little movement at the beginning (less than a second) but it's fixed then  
  > **username_0**: I added like loop=-1:75:0 and it's working like a charm :) Thanks for your help  
  
  ---
  
  