From af354ba6a3df94e46333c55a645d637a5d26cb61 Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Mon, 3 Aug 2015 17:48:15 +0530 Subject: [PATCH] New Sheet: ffmpeg - fast audio video encoder --- cheat/cheatsheets/ffmpeg | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 cheat/cheatsheets/ffmpeg diff --git a/cheat/cheatsheets/ffmpeg b/cheat/cheatsheets/ffmpeg new file mode 100644 index 0000000..952c45b --- /dev/null +++ b/cheat/cheatsheets/ffmpeg @@ -0,0 +1,12 @@ +# Print file metadata etc. +ffmpeg -i path/to/file.ext + +# Convert all m4a files to mp3 +for f in *.m4a; do ffmpeg -i "$f" -acodec libmp3lame -ab 320k "${f%.m4a}.mp3"; done + +# Listen to 10 seconds of audio from a video file +# +# -ss : start time +# -t : seconds to cut +# -autoexit : closes ffplay as soon as the audio finishes +ffmpeg -ss 00:34:24.85 -t 10 -i path/to/file.mp4 -f mp3 pipe:play | ffplay -i pipe:play -autoexit