Extract audio from a movie

ffmpeg -i infile.mkv outfile.mp3

Convert WAV to MP3

ffmpeg -i infile.wav outfile.mp3

Extract subtitles from movie with ffmmpeg


ffmpeg -i Movie.mkv -map 0:s:0 subs.srt

i: Input file URL/path. -map: Designate one or more input streams as a source for the output file. s:0: Select the subtitle stream.

his would download the first subtitle track. If there are several, use 0:s:1 to download the second one, 0:s:2 to download the third one, and so on

Crop an MP3 from x to x+n

Take a look at the -t and -ss arguments. They should do what you want.

-t duration

Restrict the transcoded/captured video sequence to the duration specified in seconds. hh:mm:ss[.xxx] syntax is also supported.

-ss position'

Seek to given time position in seconds. hh:mm:ss[.xxx] syntax is also supported.

For example, ffmpeg -ss 30 -t 70 -i inputfile.mp3 -acodec copy outputfile.mp3 should do the trick for the range you mentioned (30s-100s).

Related pages