Skip to content

Movie. Canvas color and -K #7593

Closed

Description

@Esteban82

It is not possible to set the background color (-G) of the canvas when -K is used.

  1. When I use this, then the canvas is red

gmt movie main.sh -Nffmpeg1 -T40 -C12cx12cx80 -Z -D12 -Fmp4 -Vi -Gred

  1. With this command, then the fade in/out are red. And the canvas during the animation is white. I can't find I way to set the canvas color in a case like this.

gmt movie main.sh -Nffmpeg2 -T40 -C12cx12cx80 -Z -D12 -Fmp4 -Vi -Gred -K+p

  1. Here, the inicial and final frames are red even when I used +gyellow. I attach this mp4.

gmt movie main.sh -Nffmpeg3 -T40 -C12cx12cx80 -Z -D12 -Fmp4 -Vi -Gred -K+p+gyellow

Solution

I think that -G should be only be use to the set the color of canvas for the main animation.

Full script

cat << EOF > main.sh
gmt begin
	echo \${MOVIE_FRAME} | gmt text -R0/1/0/1 -JX10c -F+f200p+cCM -B0 -X0 -Y0
gmt end
EOF

gmt movie main.sh -Nffmpeg1 -T40 -C12cx12cx80 -Z  -D12 -Fmp4 -Vi -Gred
gmt movie main.sh -Nffmpeg2 -T40 -C12cx12cx80 -Z  -D12 -Fmp4 -Vi -Gred -K+p
gmt movie main.sh -Nffmpeg3 -T40 -C12cx12cx80 -Z -D12 -Fmp4 -Vi -Gred -K+p+gyellow
ffmpeg3.mp4

Activity

  1. added
    bug
    on Jul 2, 2023
  2. PaulWessel commented on Jul 2, 2023

    @PaulWessel
    Contributor

    Can confirm. Problem is that the scripts we generate (see for your 3rd case) has

    A+M+r,N+f${MOVIE_FADE}+gyellow+gred,E${MOVIE_DPU}

    i.e., it uses -N+g twice to set yellow and red. So of course it overrides and gets red. Think the only path forward is to select another modifier for fade color, e.g., +kfadecolor, or perhaps +g belongs with psconvert -I or -A?. Will chew on that for a while....

  3. PaulWessel commented on Jul 2, 2023

    @PaulWessel
    Contributor

    Perhaps we should define/agree what is supposed to happen during the fade. Is the red background supposed to be there and the fading adds in more or less red, giving a different red? Or should the fade areas not have a background color? How would this all work in your estimation?

  4. PaulWessel commented on Jul 2, 2023

    @PaulWessel
    Contributor

    I think that -G should be only be use to the set the color of canvas for the main animation.

    Yes, I guess that is the only sensible solution here.

  5. Esteban82 commented on Jul 2, 2023

    @Esteban82
    MemberAuthor

    I was only concern about the color of the canvas for the main sequence. I haven't thought about the color during the fading.

  6. PaulWessel commented on Jul 3, 2023

    @PaulWessel
    Contributor

    Does @joa-quim have any thoughts about this color issue?

  7. joa-quim commented on Jul 3, 2023

    @joa-quim
    Member

    Difficult to plunge in these matters without being doing them. Generically, if we set a background that should be respected. That is, no other sub-obtion should change it (but I imagine, even this should eventually be temporarily be allowed). A fade should overlay the background color, not a white bg.

  8. PaulWessel commented on Jul 3, 2023

    @PaulWessel
    Contributor

    Maybe summit discussions.

  9. PaulWessel commented on Oct 24, 2023

    @PaulWessel
    Contributor

    @Esteban82, I believe #7972 fixes the issue. Your three test movies now do the right fading I think,

  10. Esteban82 commented on Oct 24, 2023

    @Esteban82
    MemberAuthor

    Ok, thanks Paul!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions