user24254: I'm using lenscorrection filter on a video and the result contains green background as canvas!
How Can i replace this color with different one or an image?
This is the command i used:
ffmpeg -i out.mp4 -vf "lenscorrection=cx=0.5:cy=0.5:k1=0.4:k2=0.4" sss.mp4



user1871: This is a byproduct of the lenscorrection algorithm, originally meant to work on RGB pixels only. If the output pixel has no corresponding input pixel mapped, it is populated with 0, but in a YUV format, that's a shade of green.
As a workaround, you'll have to force manual format conversion before and after the filter.
ffmpeg -i out.mp4 -vf "format=gbrp,lenscorrection=cx=0.5:cy=0.5:k1=0.4:k2=0.4,format=yuv420p" sss.mp4


24254: <p>I'm using lenscorrection filter on a video and the result contains green background as canvas!</p>

<p>How Can i replace this color with different one or an image?
This is the command i used:</p>

<pre><code>ffmpeg -i out.mp4 -vf "lenscorrection=cx=0.5:cy=0.5:k1=0.4:k2=0.4" sss.mp4
</code></pre>

<p><a href="https://i.stack.imgur.com/YlZJj.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YlZJj.jpg" alt="result"></a></p>
 1871: <p>This is a byproduct of the lenscorrection algorithm, originally meant to work on RGB pixels only. If the output pixel has no corresponding input pixel mapped, it is populated with 0, but in a YUV format, that's a shade of green.</p>

<p>As a workaround, you'll have to force manual format conversion before and after the filter.</p>

<pre><code>ffmpeg -i out.mp4 -vf "format=gbrp,lenscorrection=cx=0.5:cy=0.5:k1=0.4:k2=0.4,format=yuv420p" sss.mp4
</code></pre>
