Avidemux Forum

Avidemux => Windows => Topic started by: BG Davis on February 18, 2016, 08:12:34 AM

Title: Extract multiple JPEG images from video?
Post by: BG Davis on February 18, 2016, 08:12:34 AM
Is there a way to extract multiple JPEG images from a 60p video?  I found one suggestion online but it involved a function that doesn't seem to exist on my newly-downloaded version of Avidemux.  (It suggested "file->save->save jpg images" but the actual path available is File>Save>Save as Image, which will save one frame only.)
I know how to extract one image at a time as above, but I'd like to get a sequence of successive images without doing each one manually.
All assistance appreciated!
Title: Re: Extract multiple JPEG images from video?
Post by: Jan Gruuthuse on February 18, 2016, 09:21:06 AM
You could try with ffmpeg:
ffmpeg -i yourvideo.ts -r 60 -f image2 image-%3d.jpg

Where you replace yourvideo.ts with the name of your video file and its extention.
Be sure to have enough space on your hard disc and only use a fragment of video and not complete video.
Title: Re: Extract multiple JPEG images from video?
Post by: BG Davis on February 18, 2016, 05:54:48 PM
Thanks!  I was hoping there was a way to extract them directly using the Avidemux controls. :'(
Title: Re: Extract multiple JPEG images from video?
Post by: AQUAR on February 19, 2016, 01:20:54 AM
The frame based version of ADM can save a selection of frames.

Frame based ADM = ADM V2.5.6

It kind off depends on what codec is used .
Codecs with complex frame reconstruction (eg VP9, AVC, HECV etc) are not handled well by ADM 2.5.6.
But if Xvid, mpeg2 etc it should work fine although not tried myself.
Title: Re: Extract multiple JPEG images from video?
Post by: BG Davis on February 19, 2016, 06:23:37 AM
Thanks.  Original is AVCHD 1080/60p (Lumix GX7).
Title: Re: Extract multiple JPEG images from video?
Post by: Jan Gruuthuse on February 19, 2016, 03:31:59 PM
Use copy for both Video Output and Audio Output
make selection
save selection (video)
process that video with ffmpeg.
All you can do for now.
Title: Re: Extract multiple JPEG images from video?
Post by: BG Davis on February 19, 2016, 03:38:14 PM
Thanks!
Title: Re: Extract multiple JPEG images from video?
Post by: AQUAR on February 20, 2016, 07:00:08 AM
I tried extracting a sequence of jpegs from AVC using ADM2.5.6.

It still works but you might not quite get the frames you selected between the A and B markers.
Just make the selection a little bit broader and prune out any unwanted pictures.
And just accept that adm 2.5.6 isn't quite suited for codecs like AVC, but still can be pressed into service for this requirement.

Or use ffmpeg  with a CLI as suggested by Jan.
Title: Re: Extract multiple JPEG images from video?
Post by: BG Davis on February 21, 2016, 02:22:29 PM
Thanks, got it.
Just out of curiosity, was there ever an option in Avidemux as described by someone online elsewhere, i.e., "file->save->save jpg images"
Or was this just another example of someone blowing smoke?
Title: Re: Extract multiple JPEG images from video?
Post by: mean on February 21, 2016, 02:27:04 PM
It was in the old branch (i.e. 2.4/2.5)
Title: Re: Extract multiple JPEG images from video?
Post by: BG Davis on February 23, 2016, 04:01:42 AM
Thanks.  Sometimes newer is not all beter... :(
Title: Re: Extract multiple JPEG images from video?
Post by: Jan Gruuthuse on February 23, 2016, 06:28:33 AM
that's life.