Skip to content

Let movie main.sh handle show to open the movie #7455

Closed

Description

@PaulWessel

In modern mode script we can end with

gmt end show

and then the plot opens up in the default viewer.I learned today via @Esteban82 that ffmpeg is one of many ff tools; the full list is

ffmpeg ffprobe ffplay

So a proposal would be if main.sh ends with gmt end show then once movie assembles the mp4 movie it would call ffplay, or perhaps just "open" like we do for images? Open movie.mp4 works fine on macOS (opens QuickTime player) - how about Windows and Linux?

Activity

  1. added
    feature request
    on May 9, 2023
  2. self-assigned this
    on May 9, 2023
  3. Esteban82 commented on May 9, 2023

    @Esteban82
    Member

    ffplay works to play a mp4 on linux. Should we test the other formats?

  4. PaulWessel commented on May 9, 2023

    @PaulWessel
    ContributorAuthor

    Sure, but I would expect it to play anything ffmpeg can create, such as webm etc.
    Does open mg4file work on Linux?

  5. Esteban82 commented on May 9, 2023

    @Esteban82
    Member

    Sure, but I would expect it to play anything ffmpeg can create, such as webm etc.

    Ok.

    Does open mg4file work on Linux?

    Yes, it works.

  6. PaulWessel commented on May 9, 2023

    @PaulWessel
    ContributorAuthor

    And when @joa-quim gets back from eating again, he can tell us if it works on Windows.

    BTW, I see that gmt end show actually ends up passing the file to gmt docs, which is where it ends up calling open.

  7. joa-quim commented on May 9, 2023

    @joa-quim
    Member

    Loong dinner. What should I test?

  8. PaulWessel commented on May 10, 2023

    @PaulWessel
    ContributorAuthor

    If

    open somemovie.mp4

    works on windows

  9. joa-quim commented on May 10, 2023

    @joa-quim
    Member

    Sorry, still don't get what to test. Ofc .mp4 movies work on Windows.

  10. PaulWessel commented on May 10, 2023

    @PaulWessel
    ContributorAuthor

    Yes of course, but does the CLI command

    open somemovie.mp4

    open your movie viewer like it does on other OS?

  11. joa-quim commented on May 10, 2023

    @joa-quim
    Member

    No. open is not known. But simply typing the file name somemovie.mp4 does work.

  12. PaulWessel commented on May 10, 2023

    @PaulWessel
    ContributorAuthor

    Sorry, I should probably have said

    gmt docs movie.mp4

    since that is what gmt end show does - it knows what "open" applies.

  13. joa-quim commented on May 10, 2023

    @joa-quim
    Member

    Yes, that works.

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

Metadata

Metadata

Assignees

Labels

feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions