Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

Using the Timelapse app on my Sony NEX-6 camera, I get an AVI which contains an MJPEG stream.

However, I'd like to take all the individual frames into Lightroom as normal photos, to do my post-processing. Is there a way to extract the individual JPEG frames in a lossless fashion, e.g. without resaving them? As I understand it, MJPEG format is essentially just a lot of JPEG files contained within (in this case) an AVI container.

I would prefer to do this on a Mac (I normally use Lightroom and Photoshop), but any application that does it would be fine, I'll find an OS to run it!

share|improve this question
    
Could you please add to the question which OS you're using and which photo/video editing applications you have? This helps people to answer your question. –  Bart Arondson Jan 9 '13 at 21:03
add comment

migrated from photo.stackexchange.com Jan 10 '13 at 13:27

This question came from our site for professional, enthusiast and amateur photographers.

3 Answers

up vote 5 down vote accepted

The easiest way is to use ffmpeg or avconv.

The command:

ffmpeg -i mjpegvideo.avi -vcodec copy frame%d.jpg

will create a series of jpeg without reencoding.

share|improve this answer
add comment

If you have access to Photoshop you can open the MJPEG in Photoshop and apply the same edits there as you would in Lightroom.

The instructions below are carried out on a Mac with Photoshop CS5.1 but for Windows it should be comparable.

  1. Open Photoshop
  2. Open your MJPEG file
  3. Go to Window -> Workspace -> Motion
  4. Now a timeline appears on your screen where you can play and scrub through your footage.
  5. Go to Layer -> New Adjustment Layer and choose the adjustment you want.
  6. When you're done editing go to File -> Export -> Render Video and choose the desired video settings.

Make sure to use adjustment layers, as a simple adjustment will only affect one frame.

share|improve this answer
    
Thanks, this answer work well also! –  RipperDoc Jan 17 '13 at 7:28
add comment

I'm not sure what you mean by "without re-saving them" ... I use a software freestudio to extract the JPEG files and then reorganize & edit the pix in LR,PS or AE...

share|improve this answer
    
Without re-saving means that the JPEG information is saved to file untouched, rather than a simple screen grab being made and then saved as JPEG (as would happen if the video was of another codec). As the MJPEGS are already compressed, I'd rather not re-compress them. –  RipperDoc Jan 9 '13 at 15:41
    
@RipperDoc i think this program actually extracts the frames, i'm not sure though cuz i never analyzed the data from the files this program created (maybe when i get home i'll check-if i remember...) anyway the program is free so u can try it out yourself & if it doesn't do the job just uninstall it afterwards –  June Jan 9 '13 at 16:07
    
by without re-saving he means what's called lossless extraction (or, conversion), I think. –  naxa Jan 9 '13 at 17:45
    
Yep, lossless! Thanks! –  RipperDoc Jan 10 '13 at 1:03
    
I think its really more like "no further losses" since both MPEG and JPEG are already lossy compression formats. Its important to note that a video frame may not be complete in the MPEG file, as the encoding uses a difference from prior frames, so you may have to include image data from many prior frames –  Pat Farrell Jan 10 '13 at 1:26
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.