Announcement

Collapse
No announcement yet.

Issue with command line export

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with command line export

    Hello,

    We are trying to export a video via command line, "--save_mask_as_sequence" , "--save_mask_as_sequence=file.ext..." , "--save_layer_as" "--save_layer_as=file.ext..." do not initialize properly.

    In this first example, we load a video, adjust exposure, saturation, contrast, and try to save_frame_as (the dialog should initialize?)
    "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" "video.MP4" --exposure=0.8 --saturation=80 --contrast=0.2 --save_layer_as

    second example where we give it a path string to save, but doesn't starts to save
    "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" "video.MP4" --exposure=0.8 --saturation=80 --contrast=0.2 --save_layer_as="video_post.MP4"

    We have used "--layer_select_all" "--automatic_preload=0" "--selected_layer=1" for these examples thinking that the layer is not selected, or the preloading was creating an issue.
    None of the examples above would initialize the dialog window, this also holds true for using "--save_mask_as_sequence" instead of "--save_layer_as"

    More testing was done using the same from above string above but actually trying with
    "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" "video.MP4" --exposure=0.8 --saturation=80 --contrast=0.2 --save_frame_as
    Which opens the save frame dialog window first then after saving or Canceling continues to load app with video, but also if you save it will only saves a black square 8x8 px, nothing from the loaded video/frame


    And finally we split the inputs using --attach, first we load then we do save
    1. "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" "video.MP4" --exposure=0.8 --saturation=80 --contrast=0.2 (to load video and adjust)
    2. "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" -- attach --save_mask_as_sequence (which opens the dialog window to save)
    but
    2a. "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" -- attach --save_mask_as_sequence="video_post.mp4" (doesn't work)
    2b. "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" -- attach --layer_select_all --save_mask_as_sequence="video_post.mp4" (doesn't work)
    2c. "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" ---attach --layer_select_all --save_mask_as_sequence="video_post.PNG" (creates layer with name of input "video_post.PNG") any image file name does this ".tif", ".tga..."

    What could be going wrong?

    The version of the app is
    Version 2.00.22 build stable/2.0 29 2022

    Thank you,

    edit:
    "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" "video.MP4" --save_mask_as_sequence="video_post.PNG" (works)
    Last edited by bf_software; 09-09-2022, 01:36 AM.

  • #2
    Hi there, sorry for not getting back to you earlier.
    Generally, --save* should bring up the save dialog, and --save*="path/filename.ext" should directly save to this path.

    It seems there's some issues with saving from the command line, especially when writing to mp4. It does seem to work with PNG, so if that's your target format, it should work for you.
    Just to make sure we're talking about the same thing - when you use any of the flags that don't work for you - does the running Player instance actually do anything?
    Alex Yolov
    Product Manager
    V-Ray for Maya, Chaos Player
    www.chaos.com

    Comment


    • #3
      Hello there,

      Yes, we are unable to save from the command line using --save_mask_as_sequence=path/filename.ext or --save_layer_as=path/filename.ext

      running the player before the command line inputs, will open another instances of chaos player
      using --attach it will try to use the existing instance of chaos player, then it does loads/adjusts/selects and opens the dialog windows for --save_mask_as_sequence, --save_layer_as

      if chaos player already has video loaded then using --attach and --save_mask_as_sequence=path/filename.ext or --save_layer_as=path/filename.ext does nothing if the .ext is mp4/MP4
      and
      --save_mask_as_sequence=path/filename.PNG works, it starts to exports the video as PNG sequences

      something to note
      "video.MP4" --exposure=0.8 --saturation=80 --contrast=0.2 --save_frame_as
      will start chaos player, open the dialog window to save frame first before anything else, after pressing cancel or saving the frame chaos player continues to load video and apply exposure/saturation/contrast

      We assume that save* functions are being called first, as in the case above the save_frame_as window opens, and when saving it saves a default 8x8 black image, this may affect also the other save* modes.
      If true, then save_mask_as_sequences cannot export anything as its called before the video is loaded.

      We like chaos player, we would just like to save via command line for batching processing.

      Comment


      • #4
        Hey bf_software,
        Just a note that we're looking into this.
        Would you care to test an experimental build with a fix for this and let us know if it works better?
        Alex Yolov
        Product Manager
        V-Ray for Maya, Chaos Player
        www.chaos.com

        Comment


        • #5
          We can save using the experimental version, much better indeed.
          Have noticed that preset/safe area was being used not sure if default in experimental versions, once we switch to preset layer it exported the whole video and not just 940px crop, is it possible to add --preset=whole/layer/none, and --quiet to ignore any message popups incase there will be any?

          Going to experiment with some batching and see how it behaves

          Thank you,

          Comment


          • #6
            Hello once more
            We've been working with the experimental version and discovered an interesting error

            Start chaosplayer then "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" --attach --exit
            Will throws 2 messagebox "Video files may be slow to playback... " and 2 errors with "Open error -2 (0xFFFFFFFFE)" and then closes.

            Question:
            Will adding --exit process video then exit? or --exit supposed to be used with --attach --exit ?
            Ex:"C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" --exit --save_mask_as_sequence="video_post.mp4"

            Otherwise we will try with layer_replace_with, and loop over with attach instead of opening > processing > closing

            Thank you,

            Comment


            • #7
              Originally posted by bf_software View Post
              We can save using the experimental version, much better indeed.
              Good to hear. We'll consider merging the changes to the builds and include the fix in the next release.


              Originally posted by bf_software View Post
              Have noticed that preset/safe area was being used not sure if default in experimental versions, once we switch to preset layer it exported the whole video and not just 940px crop, is it possible to add --preset=whole/layer/none, and --quiet to ignore any message popups incase there will be any?
              There aren't any changes to the default mask resolution (it's called mask resolution in player).
              Usually it keeps the value from the last session, so when working with different layer input resolutions you'll need to adjust it. The "layer" preset is there for convenience just for such cases.
              Can you tell me more about what you expect to achieve with a preset=whole/layer in this case?
              Can you tell me more about what you expect to achieve with --quiet? Is there any particular issue that you're facing?
              Alex Yolov
              Product Manager
              V-Ray for Maya, Chaos Player
              www.chaos.com

              Comment


              • #8
                Originally posted by bf_software View Post
                Hello once more
                We've been working with the experimental version and discovered an interesting error

                Start chaosplayer then "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" --attach --exit
                Will throws 2 messagebox "Video files may be slow to playback... " and 2 errors with "Open error -2 (0xFFFFFFFFE)" and then closes.
                This is actually what I came across when trying to replicate your original issue.
                I was hoping that the experimental build would fix that too, but it seems it still needs some work. We'll try to fix that too.

                Originally posted by bf_software View Post
                Question:
                Will adding --exit process video then exit? or --exit supposed to be used with --attach --exit ?
                Ex:"C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" --exit --save_mask_as_sequence="video_post.mp4"
                I'm not completely sure I understand the question, but --exit will generally close the Player. You can use it with or without --attach, depending on whether you want to launch a new instance or use a running one, and of course whether you want to exit at the end of your script.

                Originally posted by bf_software View Post
                Otherwise we will try with layer_replace_with, and loop over with attach instead of opening > processing > closing
                Can you tell me what the goal is here? Maybe you want to add one layer, process it, export it and then repeat the process for another layer?
                If that's the case, you can try the --new_composition flag. It will basically reset the existing Player instance (similar to New Scene or New Project in other applications).
                You can try it with something like this: load layer, process, export, new_composition, load layer2, process, export, and so on.

                Tip -you can add your commands in a text file and pass the path to the text file to player (with or without --attach), instead of passing a very long list of commands each time.
                The flag is:
                Code:
                --cmdfile=filename.txt
                
                  Execute the commands from filename.txt​
                As an example:
                Code:
                "C:\Program Files\Chaos Group\Chaos Player\chaosplayer_qt5.exe" --attach --cmdfile=C:\scripts\my_file.txt
                Where my_file.txt can have the long line and you can even use line breaks for better readability:
                Code:
                 "video.MP4"
                -save_mask_as_sequence="video_post.PNG"
                Alex Yolov
                Product Manager
                V-Ray for Maya, Chaos Player
                www.chaos.com

                Comment


                • #9
                  We've added fixed for the pop-ups and they work internally. I've sent you a new build over DM. We'll add the fix to the public builds once we make sure everything works as expected.
                  Alex Yolov
                  Product Manager
                  V-Ray for Maya, Chaos Player
                  www.chaos.com

                  Comment

                  Working...
                  X