Having an MPEG4 (MP4 container, H264 AVC video, AAC audio) video clip downloaded from YouTube, how to separate its audio channel into an independent audio (without de&re-compressing the audio preferably) file with free Linux tools?
If you know there is only 1 audio stream and that it is
If you want to script the first audio stream ID and codec-type/file-extension, you can use this:
Considering Youtube videos, extracting audio from video may not be necessary, as the audio tracks can be downloaded separately as such by using Firefox with the latest Flashgot addon or by using mps-youtube (it is a tool meant to play and download audio tracks from youtube: more here).
Considering mp4 video files:
As answered here, one can us a more generic command without the need for the specific names of the files, and add that to the File Manager custom menu, like:
Also, this command run in a terminal will extract audio tracks from all mp4 files in the current folder:
(here the source post)
See comments and related info in the linked answers and questions on how to use such commands in the context-menus of file managers.
Above and other similar commands can be used also for extracting audio from other types of video files, by replacing accordingly the input and output extensions.
The first command works as such for