ffmpeg overlay rotated images onto a video, how to transparent the output area not covered by the rotated...












0















I am using ffmpeg to overlay a picture on a movie. The requirement is to rotate the picture through an arbitrary angle. Using filter_complex, I can overlay the rotated picture now. However, the output area of the picture is filled in black and not transparent. I checked the docs, it says can specify the fill color, according to this, but I failed to do so. Any ideas?



I copy my command line here:



./ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-30*PI/180:c=black@'0x00':ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4









share|improve this question

























  • Have you tried this? -vcodec png -pix_fmt bgra overlayavatar.mov

    – Ĭsααc tիε βöss
    Jul 2 '14 at 10:23











  • sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.

    – xftzg
    Jul 3 '14 at 4:55
















0















I am using ffmpeg to overlay a picture on a movie. The requirement is to rotate the picture through an arbitrary angle. Using filter_complex, I can overlay the rotated picture now. However, the output area of the picture is filled in black and not transparent. I checked the docs, it says can specify the fill color, according to this, but I failed to do so. Any ideas?



I copy my command line here:



./ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-30*PI/180:c=black@'0x00':ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4









share|improve this question

























  • Have you tried this? -vcodec png -pix_fmt bgra overlayavatar.mov

    – Ĭsααc tիε βöss
    Jul 2 '14 at 10:23











  • sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.

    – xftzg
    Jul 3 '14 at 4:55














0












0








0








I am using ffmpeg to overlay a picture on a movie. The requirement is to rotate the picture through an arbitrary angle. Using filter_complex, I can overlay the rotated picture now. However, the output area of the picture is filled in black and not transparent. I checked the docs, it says can specify the fill color, according to this, but I failed to do so. Any ideas?



I copy my command line here:



./ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-30*PI/180:c=black@'0x00':ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4









share|improve this question
















I am using ffmpeg to overlay a picture on a movie. The requirement is to rotate the picture through an arbitrary angle. Using filter_complex, I can overlay the rotated picture now. However, the output area of the picture is filled in black and not transparent. I checked the docs, it says can specify the fill color, according to this, but I failed to do so. Any ideas?



I copy my command line here:



./ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-30*PI/180:c=black@'0x00':ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4






images ffmpeg transparency rotate






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 2 '14 at 10:38









Cornelius

2,3961923




2,3961923










asked Jul 2 '14 at 8:49









xftzgxftzg

32




32













  • Have you tried this? -vcodec png -pix_fmt bgra overlayavatar.mov

    – Ĭsααc tիε βöss
    Jul 2 '14 at 10:23











  • sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.

    – xftzg
    Jul 3 '14 at 4:55



















  • Have you tried this? -vcodec png -pix_fmt bgra overlayavatar.mov

    – Ĭsααc tիε βöss
    Jul 2 '14 at 10:23











  • sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.

    – xftzg
    Jul 3 '14 at 4:55

















Have you tried this? -vcodec png -pix_fmt bgra overlayavatar.mov

– Ĭsααc tիε βöss
Jul 2 '14 at 10:23





Have you tried this? -vcodec png -pix_fmt bgra overlayavatar.mov

– Ĭsααc tիε βöss
Jul 2 '14 at 10:23













sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.

– xftzg
Jul 3 '14 at 4:55





sorry, but i am not using any PNGs with alpha channel. besides, I do not want to transparent the picture itself.

– xftzg
Jul 3 '14 at 4:55










1 Answer
1






active

oldest

votes


















0














for transparent try c=none.



ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-    30*PI/180:c=none:ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4





share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f775922%2fffmpeg-overlay-rotated-images-onto-a-video-how-to-transparent-the-output-area-n%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    for transparent try c=none.



    ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-    30*PI/180:c=none:ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4





    share|improve this answer






























      0














      for transparent try c=none.



      ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-    30*PI/180:c=none:ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4





      share|improve this answer




























        0












        0








        0







        for transparent try c=none.



        ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-    30*PI/180:c=none:ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4





        share|improve this answer















        for transparent try c=none.



        ffmpeg -i mersyvideo.mp4 -i avatar.jpg -filter_complex "[1:v] rotate=-    30*PI/180:c=none:ow=rotw(iw):oh=roth(ih) [rotate];[0:v][rotate] overlay=40:10" -codec:a copy output/overlayavatar.mp4






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Oct 30 '14 at 11:47









        Kunal

        1,59051726




        1,59051726










        answered Oct 30 '14 at 10:54









        Apostol VictorApostol Victor

        16




        16






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f775922%2fffmpeg-overlay-rotated-images-onto-a-video-how-to-transparent-the-output-area-n%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Сан-Квентин

            Алькесар

            Josef Freinademetz