English

How to extract and convert the sound track from a video

  • Home
  • Article
  • How to extract and convert the sound track from a video
How to extract and convert the sound track from a video
Images
  • By electronics-phone
  • 428 Views

Easiest solution?! Are you kidding…

For MP4 format, with mp4box on the command line, just do: [cpp]mp4box -add “[file path][file name].mp4#audio” -new “[file path][ file name].m4a”[/cpp]As mp4box is included in Captvty (among others), if you already have this software installed, just add the path to the mp4box.exe file located in a sub-directory of Captvty , for my part it is in: “C:\Autonomous software\Captvtyools\mp4box.exe”And we can create a .bat file which will process all the .mp4 files located in the same directory by a double-click:[ cpp]FOR %%F in (*.mp4) DO “C:\Autonomous Software\Captvtyools\mp4box.exe” -add “%%F#audio” -new “%%~nF.m4a”[/cpp]Gain considerable time if you have to extract the audio from 50 files! The task is finished before we had time to process one with the VLC method…

The same can be done for other file types with ffmpeg:[cpp]ffmpeg -i “[filename].mp4” -vn -acodec copy “[filename].m4a”[/ cpp](Also works with .avi / mp3, etc. Check beforehand what the format of the audio is with MediaInfo to know which extension to indicate, for example it can be .wma, .ogg, .wav, etc.) And for a .bat script:[cpp]FOR %%F in (*.mp4) DO “[ffmpeg path]\ffmpeg.exe” -i “%%F” -vn -acodec copy “%%~ nF.m4a”[/cpp](Replace *.mp4 with *.avi and .m4a with .mp3 to extract MP3 track from AVI file.)

How to extract and convert audio track from 'a video

Otherwise in the graphical interface, Avidemux works very well, being much less "gas factory" than VLC Media Player on the conversion part.