Page 1 of 1

CLI with visual progress?

Posted: Wed Aug 03, 2022 12:57 pm
by phil.hagen
Hi I am new to HandBrake. I was interested in a way to automate the video file conversion via scripts. I have a way to generate the proper syntax for the command line. I have tested that and it works fine. However, I still want to see some onscreen progress of the files that are being converted. Is this possible with HandBrake? Could someone point me in the correct direction? Thanks

Re: CLI with visual progress?

Posted: Wed Aug 03, 2022 1:16 pm
by phil.hagen
I guess I should be more clear. I plan on running my scripts with a command line hidden. I am wondering if HandBrake can still show what the progress is. I mean with the Windows interface of any other minimal on-screen feature. Thanks

Re: CLI with visual progress?

Posted: Wed Aug 03, 2022 4:24 pm
by Deleted User 11865
No, but progress is written to standard output, which you can redirect to a file. You can then use tail or perhaps a script of your choice to monitor proress from said file.

Re: CLI with visual progress?

Posted: Wed Aug 03, 2022 5:08 pm
by phil.hagen
Hi, thanks for the reply. OK, if anybody has examples could they show me thanks.

Re: CLI with visual progress?

Posted: Thu Aug 04, 2022 1:18 pm
by DrXenos
This is pretty easy to do. You just need to run HB as a separate process with its standard out redirected to a non-blocking (asynchronous) pipe. You can then periodically read and parse the output, looking for percent done text.

I do this in my GUI transcoder tool to update the % complete on the status bar, taskbar, etc.

I don't know how doable it would be from a batch file because, unlike Unix shell scripts, the pipes don't create background processes (I don't think they do, anyway). You can start another process in a batch file using the START command, but you'll need another to monitor the progress.

Re: CLI with visual progress?

Posted: Tue Aug 09, 2022 2:03 pm
by floffy
phil.hagen wrote: Wed Aug 03, 2022 12:57 pm Hi I am new to HandBrake. I was interested in a way to automate the video file conversion via scripts. I have a way to generate the proper syntax for the command line. I have tested that and it works fine. However, I still want to see some onscreen progress of the files that are being converted. Is this possible with HandBrake? Could someone point me in the correct direction? Thanks
Normaly on CLi the DOS windows Display the Progress :
>>> Encoding: task 1 of 1, 11.85 % (81.38 fps, avg 83.67 fps, ETA 00h24m33s) <<<