Skip to content

Instantly share code, notes, and snippets.

@hirocarma
Created December 14, 2020 12:40
Show Gist options
  • Save hirocarma/3df6f8034125b4e885b54c1efaf0eefa to your computer and use it in GitHub Desktop.
Save hirocarma/3df6f8034125b4e885b54c1efaf0eefa to your computer and use it in GitHub Desktop.
mkv to wav
#!/bin/sh
INPUT="input.mkv"
OUTPUT="output.mp4"
START="hh:mm:ss"
END="hh:mm:ss"
ffmpeg -y -ss $START -to $END-i $INPUT -map 0:3 $OUTPUT
ffmpeg -y -i $OUTPUT -filter_complex "channelsplit=channel_layout=5.1[FL][FR][FC][LFE][BL][BR]" -map "[FL]" front_left.wav -map "[FR]" front_right.wav -map "[FC]" front_center.wav -map "[LFE]" lfe.wav -map "[BL]" back_left.wav -map "[BR]" back_right.wav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment