Audio within mp4 and flv files is AAC, and a proper container for that is m4a. So, in order to extract sound from mp4 and flv I use a command like

gnome-terminal -e "parallel avconv -i '{}' -map 0:1 -c:a copy '{}.m4a' ::: %F"

and add it to Thunar's custom actions. More here and here.

How to achieve that for Webm? (I read here that the audio contained is Vorbis.)


Considering the answers linked (in my question above), and the answers linked therein (especially this answer and the comment under it, I dare think that the same line of command can be used in the same way for extracting ogg-vorbis out of Webm video. I welcome comments on whether this is the case.

To be able to convert multiple files, install parallel (see this answer).

 sudo apt-get install parallel

And then, just adapting the mentioned command to extract in ogg-vorbis.

parallel avconv -i '{}' -map 0:1 -c:a copy '{}.ogg' ::: %F

(The idea is to get the same audio content as in the original Webm - and checking both the Webm and the output ogg with mediainfo, I see the same audio specifications.)

This command can be used in Thunar's custom actions in a form similar to

xfce4-terminal -e "parallel avconv -i '{}' -map 0:1 -c:a copy '{}.ogg' ::: %F"


I now prefer a different line of command, without the terminal and parallel:

bash -c 'avconv -i "$0" -map 0:1 -c:a copy "${0%%.*}".ogg' %f
  • mkvextract from the mkvtoolnix package can also be used, but while you are not using MP4Box for the MP4 container, you might want to stick with ffmpeg. – LiveWireBT Aug 30 '13 at 10:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy