VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Hi all,

    I am having problems trying to add a logo on a vstack/hstack composition using ffmpeg.

    I have tried numerous combinations but I can only add the logo over the first input video, but not over any position in the available space of the montage/composition.

    I need to add the logo sometimes over the space used by the second input or the third, or over any other point.

    My command line is as follow ...
    Code:
    ./ffmpeg -i movie0 -i movie1 -i movie2 -i logo.png -filter_complex "vstack=inputs=3,drawtext=text=\'movie0\',drawtext=text=\'movie1\',drawtext=text=\'movie2\' -map 0:v? -map 1:v? -map 2:v? -pix_fmt yuv420p -c:v libx264 -an -y output
    For example I cannot add the logo over the second video/input using ...
    Code:
    [1:v][3:v]overlay=x=50:y=240,vstack=inputs=3 ...
    Any idea about how to be able to use any space of the composition to insert the logo via overlay?

    Thank you very much in advance

    Mapg
    Quote Quote  
  2. Something like:
    Code:
    ffmpeg -i movie0 -i movie1 -i movie2 -i logo.png -filter_complex "[0:v]drawtext=text=\'movie0\'[a];[1:v]drawtext=text=\'movie1\'[b];[2:v]drawtext=text=\'movie2\'[c];[a][b][c]vstack=inputs=3[stack];[stack][3:v]overlay=x=50:y=240[out]" -map "[out]" -pix_fmt yuv420p -c:v libx264 -an -y output
    ?
    Last edited by sneaker; 22nd Sep 2019 at 10:23.
    Quote Quote  
  3. Originally Posted by sneaker View Post
    Something like:
    Code:
    ffmpeg -i movie0 -i movie1 -i movie2 -i logo.png -filter_complex "[0:v]drawtext=text=\'movie0\'[a];[1:v]drawtext=text=\'movie1\'[b];[2:v]drawtext=text=\'movie2\'[c];[a][b][b]vstack=inputs=3[stack];[stack][3:v]overlay=x=50:y=240[out]" -map "[out]" -pix_fmt yuv420p -c:v libx264 -an -y output
    ?
    Unfortunately, ffmpeg says ...

    Code:
    Invalid file index 3 in filtergraph description
    Quote Quote  
  4. Did you forget one or more of the input files? (Always) post your complete command/log.
    Quote Quote  
  5. Originally Posted by sneaker View Post
    Did you forget one or more of the input files? (Always) post your complete command/log.
    Yes, you are right. I forgot to add the input for the logo.

    Your code is working fine. Thank you very much!! You were very kind!

    Best regards,
    Mapg
    Quote Quote  



Similar Threads