How to open all contents of a folder via command line?


#1

shotcut --help shows resource as an argument.

Can we pass a folder as the argument somehow and all files are loaded into the playlist from that folder?

I’ve tried numerous methods, none seem to work, it will only load the first file in most cases, or keep opening file after file in the source window. Any suggestions?


#2

Select all the files in the folder drag and drop them on the playlist panel.


#3

Thank you. I am aware that it can be done like that. This is for a script and a workflow… Looking for automation.


#4

Have you tried looking at what @nwgat did with his fire escape benchmark as a refrence? https://nwgat.ninja/thefireescape/


#5

Negative, but I will now. Thanks.


#6

Since you are scripting I suggest to write a script to generate a playlist XML project. (no timeline).

  1. Start Shotcut.
  2. Set Settings > Video Mode to something you want other than Automatic.
  3. From a file manager, drag a collection of files to Shotcut.
  4. See it populate the Playlist.
  5. File > Save
  6. Open the .mlt XML file in a text editor.
  7. Make a template.
  8. Write a script to get folder contents and build the XML playlist.

I will move this to Suggestions.


#7

Thank you. I had not thought of using the MLT as the resource. I appreciate your help.


#8

I added this for next release v18.10. It will also work via drop from a file manager. Also, the command line executable will accept multiple filesystem arguments any of which can be folders, which will be expanded. It only expands a folder one level - not recursively deep.


#9

are these additions to the commandline going to mean we can do a commandline only render on a headless client now with 18.10?


#10

It looks like you are doing that already:


#11

That is working, but it is… clunky because of the requirement to use X and xvdb(a virtual x window) some more… official(possibly with folder monitoring built in if I’m dreaming) would be nice


#12

This will most likely always be a requirement: at least Qt and OpenGL require it, possibly more. Do not use those MLT modules and likely you can render headless using melt instead of qmelt. Opening a folder of files from the command line has nothing to do with headless rendering.


#13

This topic was automatically closed after 90 days. New replies are no longer allowed.