Author Topic: A new interface using ffmpeg "h264vid.exe"  (Read 1224 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5894
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
A new interface using ffmpeg "h264vid.exe"
« on: November 27, 2017, 11:15:53 AM »
I have done a completely new version of this interface and to date it has been particularly useful in tweaking h264 format video. The app is supplied with full 64 bit MASM source and to use it you need to have "ffmpeg" set in your computer's path as its easier to develop this way. I have disabled the check for ffmpeg in the local directory for the moment. It is designed to size the output video to a range of 16/9 standard sizes up to 4k, it can set the bitrate to control the output file size and quality and it has 2 adjustments for the unsharp mask so that you can carefully tweak the sharpness level. I have set this to the maximum range to handle video from very good to very ordinary and with high res video (1080 & 4k) the settings above and below zero are incremented very finely so you can avoid the outlining defect of over sharpening.

To set it up you need to download ffmpeg from https://ffmpeg.zeranoe.com/builds/ and place both "ffmpeg.exe" and "ffplay.exe" in a directory that is in the computer's path. The logic of the application is one of getting the required settings and writing a conventional batch file that then runs ffmpeg and displays the result in ffplay. The batch file is left in the target directory so it can be modified and re-used. As usual the app is subject to change but is currently doing all of what I need it to do so it is pretty stable. I have not had any trouble loading a non mp4 video file as the source file and outputting mp4 files. Tested so far on FLV, MOV and a few other common file formats.

The MASM code is a reasonably straight forward dialog interface and a reasonable example of coding an app of this type.

LATEST VERSION BELOW.
« Last Edit: June 26, 2018, 03:31:04 AM by hutch-- »
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5894
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: A new interface using ffmpeg "h264vid.exe"
« Reply #1 on: July 12, 2018, 05:04:51 PM »
I have just updated the app so that it remembers the last directory it was used in. I found that it was starting to drive me NUTZ having to climb up a directory tree each time I started it. Install is simple, delete the complete set of files for the earlier version(s) and replace them with the contents of the attached zip file.

The first time it is run it will create a default settings file "h264vid.set". It is a binary file that is not designed to be edited. If for some obscure reason it ever gets damaged, delete it and run the app again and it will create a new default settings file.

As before you need to have "ffmpeg and ffplay" in your PATH settings and it is worth downloading the later versions of ffmpeg as they keep adding capacity to it, ffplay now has sound which you can turn off by pressing "m" on your keyboard.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: