VideoHelp Forum
+ Reply to Thread
Results 1 to 8 of 8
Thread
  1. I use Avidemux to transcode a folder of files from one container to another. The problem is that since the folder is quite large with many files, I want the process to work in the background whilst I do other stuff on the PC. The problem is that on most occasions the processing window appears and I have to click away to minimise it, but as soon as the next file is loaded, it reappears. I just want it to work in the background and only appear IF I click the tab on the taskbar. Thanks for any help!

    Code:
    set avidemux="C:\Program Files\Avidemux 2.8 VC++ 64bits\avidemux.exe"
    
    set videocodec=Copy
    
    set audiocodec=Copy
    
    for %%f in (*.mkv) do %avidemux% --video-codec %videocodec% --audio-codec %audiocodec% --force-alt-h264 --load "%%f" --save "%%~nf.mp4" --quit
    
    echo.
    
    Pause
    Quote Quote  
  2. start /b ffmpeg

    or

    start /min avidemux
    Quote Quote  
  3. Originally Posted by jagabo View Post
    start /min avidemux
    Where do I add this in the batch file? I tried after the exe launches;

    Code:
    set avidemux="C:\Program Files\Avidemux 2.8 VC++ 64bits\avidemux.exe"
    
    start /min avidemux
    
    set videocodec=Copy
    
    ...
    and at the start;

    Code:
    start /min avidemux
    
    set avidemux="C:\Program Files\Avidemux 2.8 VC++ 64bits\avidemux.exe"
    
    set videocodec=Copy
    
    ...
    Both give errors about not finding "avidemux"
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Code:
    start /min "C:\Program Files\Avidemux 2.8 VC++ 64bits\avidemux.exe"
    should do it
    Quote Quote  
  5. Originally Posted by davexnet View Post
    Code:
    start /min "C:\Program Files\Avidemux 2.8 VC++ 64bits\avidemux.exe"
    should do it
    This doesn't work unfortunately. Changing;

    Code:
    set avidemux="C:\Program Files\Avidemux 2.8 VC++ 64bits\avidemux.exe"
    to this;

    Code:
    start /min "C:\Program Files\Avidemux 2.8 VC++ 64bits\avidemux.exe"
    causes every video file within the directory to have the following appended to the end, in the output log;

    Code:
    ..... is not recognized as an internal or external command, operable program or batch file.
    Quote Quote  
  6. Code:
    set avidemux="C:\Program Files\Avidemux 2.8 VC++ 64bits\avidemux.exe"
    
    set videocodec=Copy
    
    set audiocodec=Copy
    
    for %%f in (*.mkv) do start /b %avidemux% --video-codec %videocodec% --audio-codec %audiocodec% --force-alt-h264 --load "%%f" --save "%%~nf.mp4" --quit
    
    echo.
    
    Pause
    Quote Quote  
  7. By the way,

    Code:
    Start /?
    Will list all the Start options.
    Quote Quote  
  8. So I went looking for a solution and I found it by using a combination of things.

    1. The AviDemux GUI cannot be kept running in a minimised state. I don't know why and none of the replies above have suggested it can do so either. I feel it should be able to, but nobody has figured it out.

    2. Someone suggested that instead of running avidemux.exe in the batch file, to use avidemux_cli.exe instead. This however also ran onscreen. However it was probably easier to keep a CLI minimised than a GUI, since nobody had figured out the latter.

    3. Then it was suggested that I add this code to the start of the batch file script;

    Code:
    rem ---------------------------------------------
    rem how to minimize the command prompt when
    rem running a batch script?
    rem ---------------------------------------------
    rem https://stackoverflow.com/questions/2106723/
    rem   how-to-minimize-the-command-prompt-when-
    rem   running-a-batch-script
    
    if not "%minimized%"=="" goto :minimized
    set minimized=true
    start /min cmd /C "%~dpnx0"
    goto :EOF
    :minimized
    rem Anything after here will run in a minimized window
    4. So by combining both parts (with a change to the exe) into the batch script, we get the following;

    Code:
    rem ---------------------------------------------
    rem how to minimize the command prompt when
    rem running a batch script?
    rem ---------------------------------------------
    rem https://stackoverflow.com/questions/2106723/
    rem   how-to-minimize-the-command-prompt-when-
    rem   running-a-batch-script
    
    if not "%minimized%"=="" goto :minimized
    set minimized=true
    start /min cmd /C "%~dpnx0"
    goto :EOF
    :minimized
    rem Anything after here will run in a minimized window
    
    set avidemux="C:\Program Files\Avidemux 2.8 VC++ 64bits\avidemux_cli.exe"
    
    set videocodec=Copy
    
    set audiocodec=Copy
    
    for %%f in (*.mkv) do %avidemux% --video-codec %videocodec% --audio-codec %audiocodec% --force-alt-h264 --load "%%f" --save "%%~nf.mp4" --quit
    
    echo.
    
    Pause
    5. Now when the script runs, it runs minimised does the complete task and prompts to close - all in the background. Mission accomplished.

    I hope at some point someone can figure out the original request of how to keep the GUI minimised and not having to use the CLI. The only reason I say this is because the GUI gives a good popup warning when there is an error to pinpoint it to the exact part in the video. For now however, it seems that the goal has been achieved.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!