Okay, I think I understand what you’re doing a little better, though I’m still not totally sure I understand the context in which you’re seeing the outlines.
However one issue you’re going to run into is the alpha channel you’re getting from that first camera isn’t going to be right. Normally when rendering transparent objects, you’re doing so into a framebuffer or some other render texture with other content already in it. The alpha output by the shader exists simply to handle the compositing of the shader’s output color with the target’s color. The values that actually end up in the alpha channel of the target don’t matter.
Using Blend SrcAlpha OneMinusSrcAlpha, aka traditional alpha blending, means the color values nicely blend and look as you would expect, but they also mean that the alpha value being recorded in the target buffer is multiplied by itself, which is bad. You really want to be using Blend One OneMinusSrcAlpha for the alpha channel to get properly stored.
To do that you can either use that blend mode and multiply the output color.rgb by the color.a in the shader, or use a separate alpha blend mode.
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha.
Also, you should be clearing that first camera’s target to a solid color of (0.0, 0.0, 0.0, 0.0), aka black w/ alpha zeroed out.
The part I’m not understanding is why you’re rendering that render texture again as solid white with only the alpha left as is. Originally I though it was because you were looking to do the compositing within Unity. Now I assume this is so your output from Unity has the color and b&w alpha side by side, yes? Why not then output the alpha as the color?
fixed texAlpha = tex2D(_MainTex, i.uv).a;
return fixed4(texAlpha, texAlpha, texAlpha, 1.0);
Depending on your projects color space settings, and how ffmpeg handles stuff, you may need to additionally apply a sRGB color space conversion to this output.
fixed4 color = fixed4(texAlpha, texAlpha, texAlpha, 1.0);
color.rgb = LinearToGammaSpace(Color.rgb);
return color;
Now, for ffmpeg, you’ll want to use the alpha=premultiplied setting to actually do the compositing.
https://video.stackexchange.com/questions/23242/ffmpeg-overlay-with-transparency-has-dark-outline