Skip to content

FFMPEG Audio Encoder v4.0

Compare
Choose a tag to compare
@jessielw jessielw released this 25 May 15:30
· 35 commits to master since this release
Some information:

I've re-worked the program, from the top of the code to the bottom. I learned python/tkinter during quarantine and made this tool very quickly afterword's. Not knowing many of the things that I know now about python/tkinter. I've since made several other tools, learned a lot during all this time, and knew eventually I'd need to come back to this one, clean the code up, and create what I originally envisioned a long time ago...
A lot of work has went into this update. It has taken me around 3 months to fully complete this release. I've changed how the entire program works internally, in alot of ways under the hood. I've done my best to check for bugs and correct them and I have gotten the new update to a stable spot where I was ready to do a release. If you find any bugs, please report them to me!

I present: FFMPEG Audio Encoder v4.0

Screenshots:

Click on any picture to see a full high resolution screenshot

image host
image host
image host
image host
image host
image host
image host
image host
image host

Tool Updates:

QAAC and FDK-AAC changes:

  • FDK-AAC is no longer included with the release
  • QAAC QTFiles64, is no longer included with the release
  1. Both tools are still fully supported by the GUI, but out of the box neither of these tools will be enabled
  2. qaac64.exe is still included in the release, but you will need to obtain the quicktime .dll's in order to utilize the encoder. In the settings menu you can obtain these files easily by selecting 'Download QTfiles64' and then opening the directory to the tool. Once the tools are in place the program will automatically re-enable the qaac encoder
  3. fdkaac.exe is not quite as easy to obtain. You technically need to build the executable yourself or use other means to get the executable file. If you know where to look you can easily obtain it. Once obtained, add the path to it in the settings window, or simply add it into it's app folder, restart the GUI, and it will automatically detect fdkaac.exe and re-enable the encoder
    The changes to these tools are due to a license conflict #19

Changelog:

  1. The GUI now will maintain it's correct size without blurring text or the GUI, this should look cleaner on all DPI sizes and versions of windows
  2. All GUI buttons now change colors when the mouse is hovering over them
  3. Reset Config in the tools menu now completely deletes the config.ini file, forcing the program to create a new one with all the default parameters
  4. Fixed a bug where files without a duration (usually raw files, dtshd, etc) don't have any duration information, could cause errors. Progress bars are no longer created when the user inputs one of these files, instead it'll let the user know via a prompt and label
  5. Fully re-worked the normal progress window for manual/auto encodes:
    • Encoding progress is wrapped in a nice little frame
    • The text window is now a scrollable text window, it saves all of the encoding text progress
      • During an encode, it will show the user the input file, the encoder, and the progress of the encode, followed the output file or an error if there is one
      • The scrolled text window will have a progress bar, if the input file has a duration, or just a label saying that the progress bar is disabled if there is no duration for the audio track
      • You can right click inside the progress scrolled text window and copy selected text
    • There is now an Options frame
      • This frame has a check box to automatically close. If checked this will automatically close the progress window upon completed. (This also can be changed on the main gui in the options menu > Progress Output > On/Off)
      • Copy to Clipboard button (works like it says, copies all text in the window to clipboard)
      • Pause button
      • Resume button
      • Cancel button
      • Open Output Directory button
      • All of the above options do exactly as they say
    • Pressing cancel will either close the window IF the encode is stopped or ask the user if they want to cancel the encode. If the user presses yes, the program will cancel the encode and close the window. The 'X' button at the top of the window works exactly the same way as the cancel button
    • The progress window now saves the process id of the job and correctly kills the process ID and it's children when the window is force closed or canceled
    • When a job is started, the main GUI window AND all other windows hide until the process is complete/canceled, after words they will re-appear
    • The error handling (it barely had any before), the logic for the progress window, all has been completely reprogrammed
    • The progress bar is based off of the selected stream duration INSTEAD of the general file duration, that it was before. This resulted in the progress bar not being completely updated during the encoding process
    • The progress window is now fully resizable and remembers where it was last closed at
    • There has been a lot more changes under the hood, but I listed the main changes
  6. There is no extension limits anymore .mkv, .mp4, .aac, .ac3 etc. You can open ANY file now, the program will check that file for audio tracks, then accept it if it has audio tracks. If it doesn't it will let the user know.
  7. QAAC command line, now has the --ignorelength command automatically added to it, since the program pipes a WAV format to qaac
  8. All of the main GUI buttons hover status, has been adjusted, to say more informative information
  9. Show Command Button changes:
    • Button name changed to "Display Command"
    • Clicking this button now gives the user a fully re-worked command line window
    • Now a scrolled text box, all of the commands will now easily fit in this window
    • Updates automatically on the fly, if left open, and other codecs/settings are changed
    • Right clicking in the scrolled text box will result in a menu, to copy selected text, or copy all text
    • The window is fully resizable and now remembers where it was last closed
    • This shows the full command line, if you was to copy this text, and paste it into cmd.exe it would run as is
  10. Removed "Original" from the DTS channel selection, the default is now '2 (Stereo)'. This was needed because DTS cannot map ALL channels. FFMPEG DTS encoder only supports channels 1.0/2.0
  11. FLAC compression level menu fix, while the internal commands was correct, what was displayed was incorrect. 0 is actually the fastest speed/lowest compression, where as 12 is the slowest speed/most compressed. Default is still 5. This includes updating the parameters to remember settings/as well as reset settings
  12. Added the commands '-sn -vn -map_chapters -1' to be sent to all codecs, rarely, some codecs would carry over the chapters, this will ensure ONLY audio is mapped
  13. The program now automatically detects the language from the track as well as the delay of the track:
    • If the track is a single track by itself in it's elementary container, the code to detect this does not run. It will only put the track# in the output filename
    • If the track is in a container, with any other track, the code searched that stream for the language/delay code
    • If the program finds a language, it will update the output string, otherwise it'll add the language string [UND]
    • If it finds delay it'll update the delay, otherwise it'll add a string that says [delay 0ms]'
    • This is very useful for muxers, to ensure that audio tracks are still in sync, if encoded by my program and remuxed back into the video file. In the even you are using a muxer that doesn't auto detect this, this will give the user the ability to see the delay visually, and add the switch/command to the muxer with the proper delay
  14. 'Save File' button no longer gives the user the option to select 'All Files', this was not needed and could potentially cause bugs if used incorrectly
  15. Opus (libopus) changes:
    • Added a new menu to select 'Opus Mapping Family'
    • Mapping -1 is default (auto detection)
    • Mapping 0 is for Mono/Stereo
    • Mapping 1 is for anything greater then 2.0 (multi channel)
    • Alternatively, you can let FFMPEG auto detect this, as it's supposed to select this correctly based off of the input channel
    • Added the code needed for the menu hover color to change
    • Added the config options to save this/reset this (be careful saving the wrong mapping channel, this will result in an ffmpeg error)
    • Newer builds support mono for opus, so added the channel mapping '1 (Mono)' for opus
  16. Every codec window now supports 'Volume', this replaced 'Gain'. The commands for the 'Gain' spinbox was actually for volume, the only codec that supports proper gain is QAAC:
    • Added a right click menu on the volume spinbox, to quickly select/reset values
  17. Auto Encode: Last Used Options changes:
    • This works similarly as before, it gets all the quality of life changes as the manual encode, like delay/language string in the output filename
    • However, if the input file has 2 or more audio tracks, a new 'Audio Track Selection' window will pop up, with the ability to select which track you'd like to quick encode, as well as a mini command window
    • This 'Audio Track Selection' window has a cancel and confirm button, they function as you'd think, cancel stops/closes the window/re-opens the main GUI, confirm selects the track and starts the encode
  18. Program will no longer allow the user to open multiples of ANY windows. The logic for every window is there to prevent this, it'll either ignore the command/update the window depending on which window it is.
    • This disables the ability to start multiple job windows, as as soon as the user starts an encode the main GUI is hidden
    • This might seem like a downgrade, however, further in the commit list, there is several other changes that will counter this change, and make it make more sense
    • If you still want to spawn multiple windows, you can disable progress bars to CMD in the options menu, this will just spawn multiple CMD windows
  19. Added a new window 'Window Location Settings' that can be accessed in options menu or by using the hotkey CTRL + W:
    • This allows the user to enable/disable the programs ability to save the last closed position of every window that opens from the main gui, including the main gui itself
    • You can also right click in each frame, to disable all, enable all, reset all, as well as reset each individual window to defaults
    • Everything but youtube-dl-gui remembers it's last saved position by default and can be enabled/disabled here
    • The 'Windows Location Settings' window will most likely end up in the general settings window eventually, but as of now there is where it will be location
  20. Upon exiting the main GUI, I use a lot more efficient code, to check for ANY open secondary windows, if any are opened, it will prompt the user if they'd like to exit. If there are no open windows, it will just save it's position/close
  21. 'Audio Settings' is now changed to 'Codec Settings'
  22. 'Codec Settings' window changes:
    • A lot of this is the same but there are some important changes
    • The 'View Streams' menu option, now spawns a brand new, cleaner looking window, that shows practically everything there is to know about each stream in the file
    • There is a new 'View Command' option menu in the window, this enables/disables the mini command window at the bottom of the 'Codec Settings' window. Default is enabled.
      • Removed the 'View Command' button in every codec window, as this new mini textbox is present. This updates constantly, as changes are made within 1ms of the change.
      • Added the ability to right click in this window and copy all/selected text
  23. Program is no longer bundled with it's icon.ico file, it's embedded in a base64 text image, that is decoded at each program launch. This makes it where I have to pack less with the program
  24. New Feature - Job Manager:
    • You can access the Job Manager by selecting 'File > Job Manager' or by adding a job via the 'Add to Jobs List' button (also, not discussed yet, from the new batch processing window), the hotkey to open it is 'CTRL + J'
    • Inside of this window you have some pretty basic options/information
      • On the left, largest area of the window, you have a decent sized list box, that will list all of your jobs
        • You can right click inside of this window and use the same buttons, that are on the right side of the Job Manager window
        • The box can be scrolled on the X and Y axis (up/down/left/right) if needed
        • Each job will display the codec first, filename, entire command line, duration and the output file name
      • On the right side, you have 4 buttons
        • Delete Selected: this deletes the selected job
        • Delete All: this will delete EVERY job in window
        • Start Selected Job: This starts what ever job is highlighted in the list
        • Start All Jobs: This loops from top to bottom doing 1 job at a time until they are complete (I plan to add 2 or 4 job workers later)
      • The job manager, stores the jobs in a jobs.dat file, that will automatically be created upon first use of the job manager window. If you launch multiple instances of the program, this file is shared between instances of each program from the same directory. The 'Job Manager' automatically updates jobs in less than a millisecond between each instance
      • You can add jobs to the manager, save them for later, as long as you don't move the source files, you can encode these jobs at anytime later
      • Upon starting a new encode, a 'Progress Drawer' will open expanding the 'Job Manger' window downwards:
        • This job window contains a new encoding progress window output, with a progress bar/label (depending on duration), it works the same way as the other progress window
        • You can right click inside of it to copy the text
        • On the right side of the drawer you have 4 new buttons:
          • Pause
          • Resume
          • Cancel
          • Cancel All (You will only see 'Cancel All' if you start the job with the 'Start All Jobs' button)
          • Selecting 'Cancel' or 'Cancel All' will correctly kill the job/processes and attempt to delete the un-finished file
        • Closing the 'Job Manager' with the 'X' button at the top of the window, will close the job process, attempt to delete the un-finished file and close the window.
        • During encoding process, you'll notice the main window disappears, this is by design, as GUI applications are not multithreaded, even though the code running it is multi-threaded, this prevents any errors. Once the process is complete, the window will return
  25. FFMPEG Audio Encoder GUI changes:
    • You'll notice, while familiar, there are some changes to the window
    • The window is slightly increased in size
    • Both the file input/output boxes, now correctly display the backslashes of the files (before, it would use forward slashes sometimes and back slashes other, as the code manipulating these windows is called from multiple functions)
    • 'Open File' has become 'Input'
      • If you select 'Input' via left click or right click on the mouse, you will get a new small window that pops up over the button
        • 'Open File' - This works like before, opens a file dialog box
        • 'Batch Process' - This will be explained later in this changelog
      • 'Show Command' is changed to 'Display Command'
      • Removed the un-needed 'Codec ->' label, I placed this in there to space the geometry of the window, I've learned to properly use the grid system/frames and this was no longer needed
      • 'Audio Settings' is now 'Codec Settings' (works pretty much the same)
      • The long 'Start Audio Job' button is changed into 2 buttons
        • On the left you have 'Add to Jobs List'
          • Once you load a file, select the codec, the settings, you can either start the job, or add the job to the job list window (this will open the job manager immediately and load the new job)
        • On the right you have 'Start Job' (works the same as before)
      • The GUI is organized, labeled and looks a lot better, everything resizes properly
      • The GUI (unless force closed via task manager) will remember it's last used size/position on the monitor when closed
      • The 'Help' menu has changed
        • Documentation (hotkey 'F1')
          • This is a WORK IN PROGRESS, I still have to write the wiki, but I plan to do that this week
        • Project Page
          • This opens the main github page for the FFMPEG Audio Encoder
        • Report Error / Feature Request
          • This opens a github tracker page for the program, with 2 templates available, or you can select a blank template
          • Here you can request a feature/report errors etc...
        • Info
          • This is the improved 'About' window
            • In this window, you now see a much cleaner window, with more information and the license information
            • This window remembers it's size/last closed position as well
      • In the 'Tools' menu batch processing has been removed, this is replaced by the new batch processing
        • All of the code that had to do with the old batch processor, has been remove
        • I'll talk more about the 'Batch Processing Window' later in this changelog
      • In the 'Options' menu we have a couple more options that hasn't been gone over yet
        • General Settings - this will be explained later in this changelog
        • Reset Configuration File - this resets the config.ini file by deleting it and closes the program with a prompt telling the user to restart
        • Clean Log Files - this cleans the log files (will go over log files later in the changelog)
      • File Menu
        • Open File - works like before
        • File Batch - opens the new 'Batch Window'
        • Job Manager - opens the 'Job Manager' window
        • Reset GUI - this resets the GUI back to a fresh starting state (does not remove user data/config files/log files)
        • Exit - works the same as the 'X' button
        • All of these have hotkeys
      • You can now drag and drop a file anywhere into the main GUI, instead of just the input button/entry
      • 'Shell Options' has been changed to 'Progress Output' - works the same as before
  26. 'General Settings' window:
    • This is where the majority of the settings will take place
    • Currently you can set the path to all your tools as well as default save paths
    • You can set the paths to:
      • FFMPEG
      • MPV
      • Mediainfo GUI
      • FDK-AAC
      • QAAC
      • Manual/Auto Encode Output Path
      • Batch Processing Path
    • Each option has a button, entry box, with the two lower options a reset to default button in the form of a 'X'
    • This window is built with tabs, currently the only tab at the top is 'Paths', but this will eventually be where most/if not all of the settings will be adjusted in the future
  27. Added Log Files:
    • They are stored in /Runtime/logs
    • manual_auto - this stores all of the auto encode/start job logs (stores up to 50 at a time, deletes the oldest first)
    • job_manager_single - this stores job manager single encode logs (up to 100 at a time, deletes the oldest first)
    • job_manager_multi - this stores job manager batch encode logs (up to 100 at a time, deletes the oldest first)
    • error_logs - this stores python errors/traceback/gui errors (up to 10 log files at once, deletes the oldest first, cleans up temporary empty logs at close/start of program)
    • All logs have a date/time stamp in the filename, depending on what type of log they will have other unique identifiers
  28. Manual/Auto jobs will now check if the output file exists when starting the job, if it exists it will prompt the user asking if they'd like to overwrite the file, if the user selects yes it will over write, if the user selects no then it will open a save dialog box, to specify a new save location and/or filename
  29. Job Manager jobs will check if output file exists, this however will not prompt the user. This window is meant to do jobs automatically, so it will rename the old file with the tags [old_file] added before the extension. (If for some reason a file with [old_file] already exists, it'll add a random set of numbers behind that, in an attempt to never overwrite existing files)
  30. Added proper error handling:
    • This will log all pythonic/gui/stdout related errors
    • It will open a new error window (it opens based off of where the main GUI is at)
      • This window makes a notification sound when opening
      • It displays the error in a text box
      • Has a button to report error to github
      • You can copy all the text in the window
      • It has a button to force close the entire program (in the event the main gui is hidden when this window opens)
    • This new logger also saves error logs automatically to the 'error_logs' directory in the log files folder
    • This logger runs on a separate thread, in order to catch all errors and open them/save them to file quickly
    • I've done my best to comb over the entire program to make sure that there are no errors, in the event you find one please report them to me!!!!!
  31. Removed the need for mediainfo CLI through out the entire program
  32. In any window that has track selection (Track #1, Track #2, etc...), you can now see A LOT more information per track. It essentially shows a shortened version of most/if not all the information per track
  33. Adding a file to the GUI is significantly faster then before, the code is quicker/shorter/more effecient
  34. QAAC / FDK-AAC now has two separate custom command line inputs:
    • FDK-AAC/QAAC Custom Command Line: This adjusts the fdk/qaac side of the command line
    • FFMPEG Custom Command Line: This adjusts the ffmpeg side of the command
    • You can adjust before/after the pipe for each encoder if you'd like
    • 'Track Name' is changed to 'Title' for both of these codecs
    • Both codec windows has been slightly resized/organized for the new entry command line
  35. Changed the programs license from GPL to the MIT license
  36. Batch Processing: (new window)
    • You can access this window from the 'File' menu, pressing the hotkey 'CTRL + B', or by clicking on the 'Input' button and selecting 'Batch Process'
    • You'll be greeted with a window that looks similar to the job manager window
      • On the left you have a list box, where you can view the files that you have added to this window
        • You can add files by dragging and dropping files (not directories, might look into adding this later) into the window or by selecting the 'Add Files' button on the right, then using the dialogue box to select as many files as you want
        • Upon adding files, depending on how large/how many, give the program a few seconds to quickly parse each file, to check for audio tracks and the amount of audio tracks
        • If you selected files that have 0 audio tracks, the program will let you know that x amount of files have not been added because they didn't have no audio tracks
        • It uses the track count from each file dropped to dynamically allow the user to select which track is batch processed:
          • If you input 50 files and 49 of them have 2 tracks where as only 1 of them has 1 track, you will be limited to only batch processing with "Track 1'
          • If you Input 50 files with 2 tracks, then you will be able to select 'Tracks 1, or Track 2'
          • If you input 50 files with 10 tracks, then you will be able to select all 10 tracks
          • You get the point :)
          • This is dynamically changed each time files are added to the window
            • If you add 10 tracks with 3 tracks, this would give you the ability to select tracks 1 - 3. However, if you was to add 1 or more files, with less tracks, the track selection in the settings window would be limited to the lower amount of tracks in the file
          • Alternately, if you add 10 files with 3 tracks and another file with 4 tracks. You will be limited to 3 tracks
          • The takeaway, the program will only allow you to select the tracks that ALL input files have in the batch window
          • If you want to batch different track counts, for different directories, I'd suggest adding them to the window, doing the settings, adding to the job manager, for each directory
    • On the bottom you have a 'Batch Processing Path' frame
      • You can set the default path to the files that you are going to process
      • NOTE: This changes the path permanently until you change it again, it is changed in the general settings window as well from this save box
      • The default is 'File Input Directory' this will save encoded files where the old files are with new names
    • On the right side of the window you have buttons and the codec menu:
      • 'Add Files' button - opens a dialog box to manually add files, works just like drag and drop
      • 'Delete Selected Item(s)' button - this will delete a selected input file from the window
      • 'Delete All' button - this deletes everything from the window
      • 'Codec Menu':
        • Once you have opened a file you get access to this menu
        • You can select all of the same codecs from this menu, just like the main gui, once selected you simply click the 'Codec Settings' button below
          • The 'Codec Settings' button works exactly the same as the manual/auto
          • It has the dynamic track selection (minus all the extra individual track information)
          • It's missing some individual file menu options
      • Once you have added files, set the codec/settings for the file, (path if you want) select 'Add to Jobs Manager' button
      • This will re-open the 'Job Manager' window like we previously talked about, where you can encode induvial files/the entire list
    • The new 'Batch Processing' code, is integrated directly into the programming, instead of a huge module. (Old code for batch processing was messy, hard to keep up to date, 6000 lines of code. The new code is integrated directly into the programs code, less than 600 lines of code)
    • The new batch processing code is easy to maintain and will update automatically to any new changes made to all codecs/settings
  37. New to this version is the installer version
    • This installs a decompressed version of the program, that is a tad faster to startup and I'll be able to update with the setup file
    • You can still use the portable version as well, packed with the program instead
      • NOTE: Do not run the portable version from archive, this needs to be extracted, to properly remember settings/use dependencies

I've done my best to list all of the changes. This has been a massive update, with many many changes, that I could not remember/list all of them
However, I have listed all of the major changes that is new in the program
I look forward to feedback!
Remember, if you find any bugs, please let me know and I will fix them!!

The Wiki will be updated soon, with a how to etc