[FFmpeg-user] How to cut mjpeg video ?

Lou lou at lrcd.com
Mon Nov 5 19:38:11 CET 2012


On Mon, 5 Nov 2012 17:29:09 +0530
"J. B" <bakshi12 at gmail.com> wrote:

> 
> Dear list,
> 
> My camcorder takes avi video in mjpeg format. How can I cut a clip from
> such a video without re-encoding ?

ffmpeg -i input -ss 20 -t 10 -map 0 -c copy output

* "-ss" is the offset time as in "skip first 20 seconds". The example
  is in seconds but it can also be in sexagesimal format
  (HOURS:MM:SS.MICROSECONDS).

* "-t" is the output duration. Can also be in sexagesimal format.

* "-map 0" map all streams from the first input file to the output.

* "-c copy" enables stream copy mode. There will be no re-encoding.

See the documentation for more details.

> ffmpeg seems convert it to mpeg4.

I assume you didn't include any option to tell ffmpeg to copy the
stream, but I can only guess without seeing your ffmpeg command and the
complete console output.

> How can I find out the start and duration of the clip I need to extract ?

You can watch it in ffplay and note the time that displays in the
bottom left of the console output.


More information about the ffmpeg-user mailing list