ffmpeg
Convert from .mov to .mp4
-vcodec codec
Force video codec to codec. Use the "copy" special value to tell that the raw codec data must be copied as is
-acodec codec
Force audio codec to codec. Use the "copy" special value to specify that the raw codec data must be copied as is.
$ ffmpeg -i [file_to_convert].mov -vcodec libx264 -acodec aac [output_file_name].mp4Extract portion of video
-ss position
Seek to given time position in seconds. "hh:mm:ss[.xxx]" syntax is also supported.
-t duration
Restrict the transcoded/captured video sequence to the duration specified in seconds. "hh:mm:ss[.xxx]" syntax is also supported.
-i filename
input file name
$ ffmpeg -ss [seek_time] -t [restric_time] -i [input_file] -vcodec copy -acodec copy [output_file]Eg. Extract video portion from 10 minutes 05 seconds to 10 minutes 20 seconds (15 seconds video length from -t flag) from test.mp4, and store to output file output.mp4.
$ ffmpeg -ss 00:10:05 -t 00:00:15 -i 'test.mp4' -vcodec copy -acodec copy output.mp4Last updated