Author Topic: Updated version of "batchpro.exe"  (Read 191 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7542
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Updated version of "batchpro.exe"
« on: August 21, 2020, 01:49:48 PM »
Its only a very small mod but I have changed the way the output files are named. Instead of fully renaming each file to a sorted number name, this version prepends a single "v" to each file name so you don't lose the original names and numberings.

C0007.MP4 when processed becomes vC0007.MP4

Now this means in effect that if you have a large list of MP4 files, say 100 files, you can put 50 in one directory and 50 in another and process each directory with batchpro and when finished, you can move the results back to the same directory maintaining the original numbering but with a "v" prepended to each file name.

I have done this for a very good reason, via normal networking you can use 2 or more computers to process 2 or more directories and reduce the processing time and I have some testing done already with 2 nearly identical computers, make a pair of directories, one for each computer (in this case on one of the two computers) split the files list into 2 and move them to the two directories. Using batchpro from each of the two computers and process each directory from a different processor and you will get the task done in half the time.

My test was done on 96 MP4 files totalling about 7.2 gigabytes and they were all finished in 14 and a half minutes.

The ZIP file is only the binary as this one was written in PowerBASIC and the code would be of no use to anyone.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

Vortex

  • Member
  • *****
  • Posts: 2337
Re: Updated version of "batchpro.exe"
« Reply #1 on: August 22, 2020, 06:30:36 AM »
Hi Hutch,

This simple batch file can do the renaming task :

Code: [Select]
FOR /f %%a IN ('dir /b *.mp4') DO @(
                                   ren %%a v%%a
                                   )

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 7542
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Updated version of "batchpro.exe"
« Reply #2 on: August 22, 2020, 08:34:53 AM »
Hi Erol,

The renaming is the simple part, the ffmpeg command line requires both an input and an output file name that cannot be the same, the slight mod prepends a "v" so the file names are different so the input and output file names work with ffmpeg. The batch file it produces is like this.
Code: [Select]
@echo off
ffmpeg -i 131320AA.MP4 -stats -loglevel 0 -b:v 16384k -s 1920x1080 -vf unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.25 -hide_banner -codec:v h264 -acodec aac v131320AA.MP4
ffmpeg -i 131406AA.MP4 -stats -loglevel 0 -b:v 16384k -s 1920x1080 -vf unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.25 -hide_banner -codec:v h264 -acodec aac v131406AA.MP4
ffmpeg -i 131506AA.MP4 -stats -loglevel 0 -b:v 16384k -s 1920x1080 -vf unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.25 -hide_banner -codec:v h264 -acodec aac v131506AA.MP4
ffmpeg -i 131554AA.MP4 -stats -loglevel 0 -b:v 16384k -s 1920x1080 -vf unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.25 -hide_banner -codec:v h264 -acodec aac v131554AA.MP4
ffmpeg -i 131742AA.MP4 -stats -loglevel 0 -b:v 16384k -s 1920x1080 -vf unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.25 -hide_banner -codec:v h264 -acodec aac v131742AA.MP4
ffmpeg -i 131943AA.MP4 -stats -loglevel 0 -b:v 16384k -s 1920x1080 -vf unsharp=luma_msize_x=3:luma_msize_y=3:luma_amount=0.25 -hide_banner -codec:v h264 -acodec aac v131943AA.MP4
pause
[/tt]
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy: