MattMcManis / Axiom

An FFmpeg GUI for Windows
https://axiomui.github.io
GNU General Public License v3.0
1.44k stars 114 forks source link

[FEATURE REQ] Queues & Loops #54

Open jorgebr opened 4 years ago

jorgebr commented 4 years ago

The latest improvements (set shell priorities and window titles, automatically generate filenames based on encoding & other options, etc.), allow one to quickly set up and run multiple jobs.

It is so easy that now we run into a new problem -- many shell windows open but there's only a limited number of shell priority values. So, for example, in my workflow I end up having one process belownormal and all the other ones low, and then manually over time "upgrade" one of the low process to belownormal as processes complete.

I can think of two ways to help deal with this.

Manual Queues

It would be amazing to have a "Queue" function where jobs can be run in sequence in the same shell window.

A more complex approach, trying to build "from" "to" and "step" values for different parameters, would be way too complicated ... would add too much to the UI.

Of course, it would be nice to have a way to "see the queue" and edit it (for example to remove a job added by accident). A button "Edit Queue" (or perhaps "Show Queue Script" or "Show Queue") could show the queue in the script text field, which already allows edit. If the script field text color is changed, perhaps to bright yellow, it would be a clear visual indicator that the script you are now looking at is the Queue.

Ideally there would also be another button called "Replace Queue" which then replaces the queue with the text in the script field. Having a separate "Add Queue" button is still useful, for example, to use the current queue as a template to make some quick changes, and add to the queue again.

So in summary, I'm thinking a new set of buttons in a new boxed section titled "Queue": Edit, Add, Replace, Run


Loop code: entire directory or wildcards

Sample code I use for this:

FOR /F "usebackq delims=" %%f IN (`dir /b /s "c:\path\to\Wild Kr*S02E*.mkv" ^| sort`)  DO (
TITLE "%%~nxf" & ^
START "" /b /wait /LOW "C:\path\to\Axiom 1.9.2.0\ffmpeg\bin\ffmpeg.exe" ^
-n -i "%%f" -c:v libx265 -preset superfast -crf 30 -pix_fmt yuv420p ^
-vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -map 0:v:0? -map_chapters 0 ^
-c:s mov_text -map 0:s? ^
-c:a copy -map 0:a? -map_metadata 0 -f mp4 -threads 0 ^
"%dest%\%%~nf 1080p x265 CRF30 p-super-fast yuv420p AAC.mp4"
)

So if the Input text box has wildcards or no filename, you generate loop code. That's it.

I recommend disabling the "Convert" button in this case (not re-enabled until Input text field has a proper filename with no wildcards), so that a basic user doesn't set off a big loop accidentally.

So in this case, only the "Script" button is enabled, allowing a user to see the generated loop code in the Script text box.

This use case could be implemented stand-alone -- it's completely separate from the "Queue" idea above. However, if the queue idea is implemented, this case can work along with it. All the Queue buttons as above could still work, so one can queue a loop along with single-file jobs, or just run the loop as a single job.

MattMcManis commented 4 years ago

I will have to look into this.

I have already planned a feature called Jobs, which will queue jobs with their selected settings to a list. It would then process each one, running ffmpeg.exe directly through Axiom, and piping the terminal's output to a textbox, instead of passing it to cmd.exe. However this feature is far away.

Axiom Template Jobs


Axiom Template FFmpeg

jorgebr commented 4 years ago

That looks great ... but after thinking about it overnight, I'm now leaning that jobs/queues may not be worth it. One could just copy each script, and paste it cumulatively into a text batch file, which is then run manually in the shell. One could add an "echo ==================" in between each "job" to easily be able to look at the output later.

That's what I'll do from now on.

On the other hand, for those that don't do command line at all, it definitely adds value.

The "Loops" suggestion, though, I think is still valid, and I think simpler to implement, no?