Can I Change Context Menu Convert To Bitrates?

Jamil-Taylor wrote on 3/30/2020, 7:45 AM

When I right click a FLAC file from Windows Explorer, I am able to select SOUND FORGE Pro 14.0 (x64) -> Convert to... followed by a specific audio codec to convert the selected file to. This is handy. However, when I choose MP4 it is set at 128kbps. I wish this to instead be 256kbps. Is there a way that I may change this? I do not see this listed anywhere under preferences. Is this a script that I must modify perhaps? Under Tools|Scripting there does exist a Convert to script. Is this what gets executed from the Explorer context menu?

Under C:\Program Files\SOUND FORGE\SOUND FORGE Pro 14.0\Script Menu there exists two Convert To script files:

  1. Convert To.bat
  2. Convert To.cs

Which one of these above is invoked from the context menu?

Comments

rraud wrote on 3/30/2020, 12:09 PM

You would probably have to write a script to encode to a higher bit rate. But that would not make the file sound any better, if that is what your are looking for. It's like putting one gallon of fuel in two gallon container.. it's still one gallon. (thanks MV)

Jamil-Taylor wrote on 3/30/2020, 12:32 PM

You would probably have to write a script to encode to a higher bit rate. But that would not make the file sound any better, if that is what your are looking for. It's like putting one gallon of fuel in two gallon container.. it's still one gallon. (thanks MV)


So is the answer you do not know if/how what I am looking for can be done?

rraud wrote on 3/30/2020, 1:17 PM

A script could certainly be written, SF scripting is not my area of expertise so I would not know what to write.
How about creating a AAC file render preset? That's quick and easy in SF. However, every time a file is encoded (or re-encoded) to a lossy format, quality is reduced some, regardless of the bit rate.

There are also some Windows context menu utilities. I like the Default Programs Editor for basic context menus and other file control. Nirsoft also has a context menu utility. Sorry, I am only familiar with basic context menu creation.

Jamil-Taylor wrote on 3/30/2020, 1:25 PM

No worries. I already have a support ticket open for the Convert to Explorer context menu feature. I will find out from the support technician handling my case. This is a nice convenience feature that would be unfortunate if we do not have the ability to change defaults.

Jamil-Taylor wrote on 3/31/2020, 12:57 PM

I received a response from support today.

This cannot be done currently.

Jamil-Taylor wrote on 4/4/2020, 10:17 PM

Okay I found where the Explorer context menu item is located in the registry:

Computer\HKEY_CLASSES_ROOT\Directory\shell\SfProContextMenu\shell\2convert\shell\4mp4\command

It does execute a script for this conversion:

C:\Program Files\SOUND FORGE\SOUND FORGE Pro 14.0\Forge140.exe -SCRIPTARGS:"arg="%1%"\4" -SCRIPT:"C:\Program Files\SOUND FORGE\SOUND FORGE Pro 14.0\Script Menu\DirConvertTo.cs" -NOLOGO -EXIT -NOPLUGINMAN

Modifying DirConvertTo.cs to the desired bitrate will solve this issue.

 

 

Jamil-Taylor wrote on 4/5/2020, 1:35 AM

Okay -- I got this to work. This is the solution below only for MP4/M4A audio files. You may follow similar steps for other media types.

First, you must create a custom template for the audio format you are interested in converting to. If MAGIX allowed users to modify the Default template for all codecs, we could simply do this with no additional change. For reasons only they know, they locked down Default template modifications (this is asinine really; I am a licensed user and should be able to change the default for my licensed software installed on my machine). I am using the Sony AVC/MVC codec, because it is a newer MP4 codec. Mine looks like this: https://dl.dropboxusercontent.com/s/rr9l95hk5nqlzf4/sound_forge_custom_template.png

Remember the name you gave your custom template.

Next, modify two script files located under SOUND FORGE\SOUND FORGE Pro 14.0\Script Menu:

  1. DirConvertTo.cs
  2. Convert To.cs

You must modify line 40 of DirConvertTo.cs and line 41 of ConvertTo.cs. You make the same modification to both files. Change the associated lines from:

".mp4|0", // 4

to:

"Sony AVC/MVC|AAC 256kbps 44.1KHz", // 4

The AAC 256kbps 44.1KHz text after the pipe symbol must match the custom template name you created. Save these changes, and your Convert to context menu will convert to your new custom format.

Please do not add anything else to this thread, as this is the solution. Please increase your post count in other threads.

Thank you!

EDIT: I will revise this script to add some intelligence to it later. If the source file is greater than 16-bit 48kHz, I will add a dither and resample step that makes use of the system preset [Sys] Convert to 16 bit  (dither and noise shaping). I will do this when I get time later...