Code Monkey home page Code Monkey logo

Comments (9)

MattMcManis avatar MattMcManis commented on May 22, 2024

Hi, thanks for using Axiom.

I will work on adding a Priority dropdown menu with different levels.

And an overwrite toggle button that will set it to -y or -n.

I will have it save their state to the config file so you won't have to switch them every time.

from axiom.

MattMcManis avatar MattMcManis commented on May 22, 2024

@jorgebr

How are you using the Priority with 2 Pass?

When I set START "" /B /LOW for ffmpeg pass 2, I get the errors:

Failed to initialize encoder: Invalid parameter
Additional information: rc_twopass_stats_in.buf not set.

and Pass 2 does not start.


Update: I think I found the solution, it's start /low /wait /b.

from axiom.

jorgebr avatar jorgebr commented on May 22, 2024

Great! I only use CRF, so I didn't think about the implications for 2-pass. Great you figured it out.

Thanks for working on this!

from axiom.

MattMcManis avatar MattMcManis commented on May 22, 2024

@jorgebr

I've almost finished it, I'm just getting Process Priority to work with PowerShell and Batch Processing.

It will work with CMD, PowerShell, CRF, 1 Pass, 2 Pass, Batch, and YouTube-DL.


The new menus are going to look like this:

Menus

Priority

  • Default
  • Low
  • Below Normal
  • Normal
  • Above Normal
  • High

Overwrite

  • Ask (blank)
  • Always (-y)
  • Never (-n)

from axiom.

jorgebr avatar jorgebr commented on May 22, 2024

Perfect! Thank you!

from axiom.

MattMcManis avatar MattMcManis commented on May 22, 2024

@jorgebr

I've released an update v1.9.0.0. Let me know how it works. It will need more testing.

Press the arrow button in Axiom to update through PowerShell, or download from here
https://github.com/MattMcManis/Axiom/releases

Update


Process Priority Script Examples:

Axiom will now generate these scripts.

CMD

1 Pass / CRF

start "" /b /wait /belownormal ffmpeg -i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K "C:\path\to\video.webm"

2 Pass

start "" /b /wait /belownormal ffmpeg -i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K -pass 1 NUL &&
start "" /b /wait /belownormal ffmpeg -i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K -pass 2 "C:\path\to\video.webm"

Batch

1 Pass / CRF

cd /d "C:\path\to\" && 

for %f in (*.mpg) do (echo) && 

start "" /b /wait /belownormal ffmpeg 

-i "C:\path\to\%f" -c:v libvpx -b:v 1300K "C:\path\to\%~nf.webm"

PowerShell

1 Pass / CRF

($Process = Start-Process ffmpeg -NoNewWindow -ArgumentList '-i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K "C:\path\to\video.webm"' -PassThru).PriorityClass = [System.Diagnostics.ProcessPriorityClass]::BelowNormal; Wait-Process -Id $Process.id

2 Pass

($Process = Start-Process ffmpeg -NoNewWindow -ArgumentList '-i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K -pass 1 NUL' -PassThru).PriorityClass = [System.Diagnostics.ProcessPriorityClass]::BelowNormal; Wait-Process -Id $Process.id;

($Process = Start-Process ffmpeg -NoNewWindow -ArgumentList '-i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K -pass 2 "C:\path\to\video.webm"' -PassThru).PriorityClass = [System.Diagnostics.ProcessPriorityClass]::BelowNormal; Wait-Process -Id $Process.id;

Batch

1 Pass / CRF

$files = Get-ChildItem "C:\path\to\" -Filter *.mpg;

foreach ($f in $files) {

    $fullName = $f.FullName; 
    $inputName = $f.Name; 
    $outputName = (Get-Item $inputName).Basename; 

    ($Process = Start-Process ffmpeg -NoNewWindow -ArgumentList '-i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K "C:\path\to\video.webm"' -PassThru).PriorityClass = [System.Diagnostics.ProcessPriorityClass]::BelowNormal; Wait-Process -Id $Process.id
}

Call Operator

If Process Priority is Default

If using FFmpeg / FFprobe Full Path, uses Call Operator &

& "C:\path\to\ffmpeg\bin\ffmpeg.exe" 
& "C:\path\to\ffmpeg\bin\ffprobe.exe" 

If Process Priority is Low, Normal, High, etc. uses Start-Process

Start-Process "C:\path\to\ffmpeg\bin\ffmpeg.exe" 

If using Environment Variable

ffmpeg
ffprobe

from axiom.

jorgebr avatar jorgebr commented on May 22, 2024

Amazing! So far, it's working perfectly. Thank you!

from axiom.

MattMcManis avatar MattMcManis commented on May 22, 2024

@jorgebr

Thanks, this was a good feature suggestion.

I'll leave this thread open for few weeks. Report back if you come across any problems.

from axiom.

MattMcManis avatar MattMcManis commented on May 22, 2024

@jorgebr

I found an error with External Subtitles using PowerShell and Process Priority.

In the next update I will be changing -ArgumentList to use double quotes " instead of single ', and it will escape `" double quoted filters and paths.


Before

-ArgumentList '-i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K -vf "subtitles='C\:\\path\\to\\subtitles.srt'" "C:\path\to\video.webm"'

After

-ArgumentList "-i `"C:\path\to\video.mpg`" -c:v libvpx -b:v 1300K -vf `"subtitles='C\:\\path\\to\\subtitles.srt'`" `"C:\path\to\video.webm`""

from axiom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.