Skip to content

Instantly share code, notes, and snippets.

@fatboab
Created August 23, 2012 10:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fatboab/3435389 to your computer and use it in GitHub Desktop.
Save fatboab/3435389 to your computer and use it in GitHub Desktop.
Recursively extract FLAC audo from MKV files in the current folder.
#!/bin/bash
find . -type f -name *.mkv | while read filename; do mkvextract tracks "$filename" 3:"${filename%.*}".flac; done
~/scrap/music/mkv/Franz Ferdinand/Live at Brixton$ mkvmerge -i 08\ -\ I\'m\ Your\ Villain.mkv
File '08 - I'm Your Villain.mkv': container: Matroska
Track ID 1: video (V_MPEG4/ISO/AVC)
Track ID 2: audio (A_AC3)
Track ID 3: audio (A_FLAC)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment