Electron.js Node.js Remove Audio From Video Desktop App Using FFMPEG Full Project

Electron.js Node.js Remove Audio From Video Desktop App Using FFMPEG Full Project

Hi folks today in this video I will be talking about how to make a desktop app in which we will be removing audio from video using ffmpeg library. We will be using electron and node.js to make this application.


So you can see that this is the exact desktop app we will be building in this tutorial. In this app as you can see we have two buttons the first button is the select video button in which we can select the video to be processed and the second button is used to process the video and remove the audio from the video.


Practical Video



1) Electron

2) Node.js



Initialization of Project


npx create-electron-app removeaudio


cd removeaudio


npm start




const { app, BrowserWindow } = require('electron');
const path = require('path');

// Handle creating/removing shortcuts on Windows when installing/uninstalling.
if (require('electron-squirrel-startup')) { // eslint-disable-line global-require

const createWindow = () => {
  // Create the browser window.
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,

  // and load the index.html of the app.
  mainWindow.loadFile(path.join(__dirname, 'index.html'));

  // Open the DevTools.

// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow);

// Quit when all windows are closed.
app.on('window-all-closed', () => {
  // On OS X it is common for applications and their menu bar
  // to stay active until the user quits explicitly with Cmd + Q
  if (process.platform !== 'darwin') {

app.on('activate', () => {
  // On OS X it's common to re-create a window in the app when the
  // dock icon is clicked and there are no other windows open.
  if (BrowserWindow.getAllWindows().length === 0) {

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and import them here.


See also  jQuery Project to Search Tumblr API User Blog Posts & Images & Display it on Website With Pagination in Javascript Full Project For Beginners



<!DOCTYPE html>
    <meta charset="UTF-8" />
    <title>Hello World!</title>
    <link rel="stylesheet" href="index.css" />
    <div class="container">
      <h1 style="text-align: center;">Remove Audio From Video</h1>
      <label for="filePath" id="filePath"></label>
      <button class="btn btn-block btn-primary" id="upload">Select File</button>

      <hr /><br>

      <button class="btn btn-block btn-danger" id="save">
        Save File and Remove Audio
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
  <script src="render.js"></script>




const {remote} = require('electron')
const $ = require('jquery')
const process = require('child_process')
const path = require('path')

const {dialog} = remote
var extname
var inputPath


    dialog.showOpenDialog(null, {
        properties: ['openFile']
      }).then(result => {
        inputPath = result.filePaths[0]
        extname = path.extname(result.filePaths[0])
      }).catch(err => {

$("#save").click(async function(){
    const { filePath } = await dialog.showSaveDialog({
        buttonLabel: 'Save video',
        defaultPath: `vid-${Date.now()}.${extname}`


      $(this).html("Processing Video")


      process.exec(`ffmpeg -i "${inputPath}" -an ${filePath}`,function(error,stdout, stderr){

        console.log('stdout: ' + stdout);

        $("#save").html("Save Video and Remove Audio")

            var myNotification = new Notification('Conversion Completed',{
                body:"Your file was successfully converted"
        if (error !== null) {
             console.log('exec error: ' + error);


See also  Login with Google Account using Javascript


Leave a Reply