Button: Remove Audio from Video

Button: Remove Audio from Video

Description

This button removes audio from a video file. It uses FFMPEG, so you will need to download it.

Usage

Select one or more video files and click this button. It will create a version of the video with no audio name it the original name with "-nosound" appended. For example: MyMovie.mp4 will have a silent version created with the name MyMovie-nosound.mp4.

Button

Remove Audio from Video.dcf (554 Bytes)

Installation

Download the DCF above. In Directory Opus, go to Settings -> Customize. Drag the same file directly onto a toolbar or a menu. To make a menu or submenu expand, just hold the DCF button over that menu without letting go and it will expand in a moment.

Required

You'll have to download FFMPEG and put it in a place that allows the system to find it.

Personal Tip with Handling Programs with No Installer

  • I don't like messing with Windows' own folders. Instead, I've been doing the following for many years...
  • I installed FFMPEG by putting the FFMPEG in my /profile\Programs folder where Programs is a folder I created in my /profile folder and it's where I keep programs that do not have an installer.
  • Note that /profile is an alias automatically defined in Directory Opus. I added my /profile\Programs\FFMPEG folder to the path environment variable. The easiest way to edit that is to search for path in your Start Menu.

Standard command:

@disablenosel:type=grp:Movies
@nodeselect
@runmode:hide
ffmpeg -i {filepath} -c copy -an {filepath|noext}-nosound.{file|ext2} 

XML code from the attached DCF file:

<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" separate="yes" textcol="none">
	<label>Remove Audio from Video</label>
	<tip>Remove audio from video</tip>
	<icon1>/iconsets/file_audio_music_sound_remove-20.png,0</icon1>
	<function type="normal">
		<instruction>@disablenosel:type=grp:Movies</instruction>
		<instruction>@nodeselect</instruction>
		<instruction>@runmode:hide</instruction>
		<instruction>ffmpeg -i {filepath} -c copy -an {filepath|noext}-nosound.{file|ext2} </instruction>
	</function>
</button>

Explanation of Commands Used (for learning purposes)

@disablenosel:type=grp:Movies will disable (ghost out) the button if no file is selected that matches the Movies file type group. (Reference: File Type Groups)

@nodeselect will not deselect the file(s) after the button's commands are executed. (Reference: Command modifier reference)

@runmode:hide will prevent a CMD window from showing when processing the FFMPEG command. (Reference: Command modifier reference)

{filepath} provides the full filename with path to ffmpeg. (Reference: Codes for passing filenames)

{filepath|noext} provides the filename without the extension (which we will profile a little later) but with full path. (Reference: Codes for passing filenames)

{file|ext2} provides the original filename extension only without the period. (Reference: Codes for passing filenames)

Icon

I purchased this one from IconFinder.com. The license does not allow me to post it in a downloadable fashion.

Versions

  • 1.0 - 2020-03-15 - Initial version

I don't anticipate needing to make changes, but if someone wants help changing this simple button, please feel free to ask.

3 Likes

A word of warning: this will not set the quotes properly if {filepath} contains spaces. It will still work because a) only the output file is affected and b) FFmpeg is quite relaxed. Ideally we add the quotes ourselves:

@nofilenamequoting
ffmpeg -i "{filepath}" -c copy -an "{filepath|noext}- no sound at all{file|ext}"

I'm confused. You're suggesting I turn off off the automatic quotes with @nofilenamequoting so that I can then put in the quotes that Opus would have put in for me?

I've tested this with spaces in both the path and the filename. It's working fine.