Windows 10: A Powershell Script for HandBrake

Discus and support A Powershell Script for HandBrake in Windows 10 Software and Apps to solve the problem; Here's the thing. My system is an age-old i3-530 overclocked to 3.5GHz coupled with GTX 1050 2GB. I have around 1.5TB of tutorial videos that I have to... Discussion in 'Windows 10 Software and Apps' started by Mycroft2046, Oct 21, 2017.

  1. A Powershell Script for HandBrake


    Here's the thing. My system is an age-old i3-530 overclocked to 3.5GHz coupled with GTX 1050 2GB. I have around 1.5TB of tutorial videos that I have to encode due to dearth in HDD space. I want to encode the videos while keeping the folder and subfolder structure intact.

    Here's the problem though. Since my system is overclocked, I sometimes get Code: BSOD[/quote] with IFME. And when I run Handbrake GUI, sometimes it stops working. The difference is that in case of IFME, the incomplete file is in a Code: TEMP [/quote] folder, whereas it's pretty darn hard to differentiate between an incomplete and a complete output of HandBrake.

    Here's what I want to do. I want to run a Code: Powershell[/quote] script (I'm a Windows 10 x64 user), which will do the following -

    For each .mp4 in given folder:


    • Run IFME/Handbrake with proper arguments with output file in a Code: TEMP[/quote] folder
    • Once the encoding completes successfully (maybe use Code: ERRORLEVEL[/quote] here?), replace the original file with the encoded one.

    Can this be done?

    :)
     
    Mycroft2046, Oct 21, 2017
    #1
  2. Andre Da Costa, Oct 21, 2017
    #2
  3. SKC-PSI Win User
    Create a PowerShell script to create a copy

    I am having trouble with the powershell script. I have used powershell in very limited amounts, so am unfamiliar to the scripts that would be required to do the jobs that I desire, nor how to save the script so that it can be accessed by the scheduler.
     
    SKC-PSI, Oct 21, 2017
    #3
  4. sml156 Win User

    A Powershell Script for HandBrake

    Why not just set the CPU to where it should be and see if the problem stop's.
     
    sml156, Oct 22, 2017
    #4
  5. Bree New Member
    I agree.


    On another note, I have similar space concerns, so I have looked for the most compression I can get away with without noticeable quality loss. It's not the size of the original files that you should be looking at, rather the duration of the videos that's the determining factor.

    I use the free Open Source command line utility FFmpeg for my processing. The settings I use are:
    Codec: X.264 with Constant Rate Factor (CRF) of 28, preset 'veryslow' and tune 'film' (for live action) or 'animation' (if your tutorials are slideshows). This produces about 200MB for an hour of live action video (less if there's little action taking place). These settings are also available in Handbrake, just choose the H.264 codec to access them.

    If you want to script your conversions, FFmpeg (as it's used from a command line) may be easier to set up. a typical command line would be:

    FFMPEG -i input.mp4 -crf 28 -preset veryslow -tune film output.mp4
     
  6. Unfortunately, it doesn't. I've tried to run them in stock settings, but that doesn't work as well. And I only get problems with IFME or Handbrake. I regularly use 7Zip to compress files of size 2GB, or run multithreaded Python scripts that push the CPU to the extreme, but no problem occurs then.
     
    Mycroft2046, Oct 22, 2017
    #6
  7. Since most of my tutorials are screen grabs, I think they are comparable to slideshows. How does animation preset work with slideshows? Is sharpness of the texts affected?
     
    Mycroft2046, Oct 22, 2017
    #7
  8. Bree New Member

    A Powershell Script for HandBrake

    No. Details are preserved as much as possible, they are the last thing to be affected at higher CRF values. It appears to be large areas of a single colour which 'animation' tuning takes advantage of to reduce the filesize. That, and the fact that an animation will have several consecutive identical frames. For 'film' tuning it appears to be fast motion where the tuning get's its savings.

    Either way, tuning is the (optional) icing on the cake - for a particular type of video tuning can get you a little bit extra compression for a given CRF value, it's by increasing the CRF that the biggest savings are found.

    The preset works by allowing more (or less) time to process each frame. For a given CRF using veryslow gives the best perceived quality and the smallest filesize, while ultrafast makes larger files with noticeable compression artefacts (useful for a quick test of other settings, but not recommended for a video you want to keep).

    You can experiment with different CRF levels. More info on CRF, tuning and preset here...
    Encode/H.264 – FFmpeg
    (this FFmpeg documentation is equally applicable to Handbrake, the settings are standard H.264 ones)
     
    Bree, Apr 5, 2018
    #8
Thema:

A Powershell Script for HandBrake

Loading...
  1. A Powershell Script for HandBrake - Similar Threads - Powershell Script HandBrake

  2. Issue in Powershell script

    in Windows 10 Gaming
    Issue in Powershell script: HI Team,We have a power shell script. It will check if the user is available in the ACL list of ADL. To get the ACL list, we are connecting to the Azure Datalake storage using Connect-AzAccount and authenticating with SPN. To get the group member details, we authenticate the...
  3. Issue in Powershell script

    in Windows 10 Software and Apps
    Issue in Powershell script: HI Team,We have a power shell script. It will check if the user is available in the ACL list of ADL. To get the ACL list, we are connecting to the Azure Datalake storage using Connect-AzAccount and authenticating with SPN. To get the group member details, we authenticate the...
  4. windows powershell script not working.

    in Windows 10 Software and Apps
    windows powershell script not working.: Hallo!Problem: I wan´t to use a script to turn on autohide taskbar in desktop mode.if I put in: " powershell -command "&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=Get-ItemProperty -Path $p.Settings;$v[8]=3;&Set-ItemProperty -Path $p -Name...
  5. PowerShell script

    in Windows 10 Support
    PowerShell script: The code below tests a series of IPs in a txt file.The result is as follows and is written in a txt file. 19.191.12.161 - online 19.191.12.162 - offline 19.191.12.163 - offline 19.191.12.164 - offline 19.191.12.165 - offline also see the scrennshot Code: $Output= @()$GetIP =...
  6. powershell scripts

    in AntiVirus, Firewalls and System Security
    powershell scripts: Hi, I have azure. Someone is somehow installing powershell scripts onto my computer that allows them to host my PC through P2P and UDP connections, well I think so anyway. I have only just found powershell script entry changes in my registry by accident. These criminals...
  7. powershell script

    in Windows 10 Customization
    powershell script: looking for a script to monitor for a folder, if there is a file in that folder send it as an email, once the email is sent out, confirm and then move the files to an archive folder. monitor c:\test\*.pdf No files, do not send email. Yes Files, send an email to someone at...
  8. Powershell Script on Shutdown

    in Windows 10 Performance & Maintenance
    Powershell Script on Shutdown: Hi all, I try to run a Powershell Script (*.ps1) when i shut down my PC. I created the script and it is working fine when i run it. However if i want to run it on a regular Shutdown it seems like it does not start or is not finished, before Windows is killing every running...
  9. PowerShell Scripting - Run a Script from Shortcut

    in Windows 10 Tutorials
    PowerShell Scripting - Run a Script from Shortcut: How to: PowerShell Scripting - Run a Script from Shortcut [img] Information One of many PowerShell security features is that you can't run a script simply by double clicking it's icon on desktop or in a folder. Doing so will by default open script in Notepad for editing...
  10. PowerShell Scripting - The Basics

    in Windows 10 Tutorials
    PowerShell Scripting - The Basics: How to: PowerShell Scripting - The Basics [img] Information A PowerShell script is a collection of commands and cmdlets to be run in logical order, previous lines in script determining values and variables in command lines thereafter. The principle is the same than in...

Users found this page by searching for:

  1. hpw to set source in batch file for handbrake windows 10

    ,
  2. start handbrake with powershell

    ,
  3. powershell handbrake

    ,
  4. handbrake windows 10 powershell