How can I output Handbrake output to both the screen and to a file?

后端 未结 2 1721
[愿得一人]
[愿得一人] 2021-01-21 16:03

So I\'ve been using Handbrake command line to encode my video collection to store on my NAS so I can use it on my HTPC. I was looking for a way to output both to the screen so I

2条回答
  •  梦毁少年i
    2021-01-21 16:33

    I would use Tee-Object for this:

    ./HandbrakeCLI.exe -i infile -o outfile ... 2>&1 | Tee-Object -File movie.log
    

    Added in the 2>&1 to capture errors to the log as well as the screen.

提交回复
热议问题