01.03.2024, 20:20
(18.02.2024, 13:38)Selur Wrote: There isn't a (good) way unless your program is compiled for command line only or it does open a terminal (on Linux&Co this is Windows is not shown, on Windows it is).
(add "CONFIG += console" to the .pro file)
Usually this isn't really a problem, since writing to std::out from a gui, doesn't make much sense.
One point of having a gui is not to have to deal with std::out.
Cu Selur
I was unable to get a console adding "CONFIG += console" even if this option should do what it is expected to do, i.e. shows a console.
I end up by adding a piece of console code in main.cpp.
The Qt console is just a "poor" version of "gui" application so I don't think that it is useful.
In the case you are curious to see what happen when is enabled the console I attached the new version.
The usage is the following
vsViewer --nogui|--silent [optional] --y4m [optional] --i [python script] --enc [encoder path] --cmd [encode command]
where:
--nogui : if present the encoding gui will not be visible (messages will be displyed on console)
--silent : like "--nogui" but with no console
--y4m : if present will be provided the y4m header
--i : input vapoursynth script
--enc : encoder program
--cmd : encoder command
Examples:
1) Encoding with encoding Gui with y4m header (*)
vsViewer.exe --y4m --i "VideoScript.vpy" --enc "x265.exe" --cmd "- --y4m --crf 18 --preset fast --output-depth 10 -o \"{sd}\{sn}_x265_gui.hevc\""
2) Encoding with no-Gui and with y4m header (*)
vsViewer.exe --nogui --y4m --i "VideoScript.vpy" --enc "x265.exe" --cmd "- --y4m --crf 18 --preset fast --output-depth 10 -o \"{sd}\{sn}_x265_gui.hevc\""
(*) for script and encoder pass the full path not only the name as in this example
I hope that you like it.
Dan