PDA

View Full Version : joining jpeg photos into Divx film


nalooti
15th September 2006, 12:37
Hi,

i want to take several photos at fixed intervals (intervalometer mode) with my digicam, then join/merge them into one Mjpeg .avi file for later compression to Divx.
Can you please tell me how to do this ?

some notes:
1/ i need it for various things like plant observation, blooming flowers, people going around in one area, etc...

2/ i could do a direct compression to Divx without passing through Mjpeg step. However, i prefer to first have an Mjpeg .avi file so i get the max resolution out of my digicam (Canon s80), then if necessary to reduce the resolution while compressing to Divx in order to view them on TV

3/ i'd love to do it in Virtualdub if possible. I know how to compress to Divx with vdub but don't know how to join several jpeg files with it if possible. If not possible, i'd prefer do the joining with another software and still do the compression with vdub (this means, the other soft has to produce an .avi file out of merging)

thanks very much
nalooti

nalooti
17th September 2006, 11:15
Hi,
Thanks for viewing this thread but since nobody answered, maybe i didn't explain correctly my case.

What i want to do is called a time laps movie.

Now i want this movie be in Mjpeg format in an avi container, in order to have no loss due to conversion ( i'll later compress it into divx).

I though Mjpeg is a kind of joing jpeg files with some timing sets between each frame (photos). Saying it that way, it should be really straightforward, but how to do it, what tools ?

Do i need an Mjpeg codec ? How and where to get one ?

thanks again
nalooti

full.ashtray
17th September 2006, 14:00
Hi nalooti -

I don't have any experience with MJPEG since I never needed it. When I make a movie out of photo stills, I use
Donald Graft's logo filter for vdub (http://neuron2.net/logo/logo.html) (copy it into the plugins subdir of your vdub directory, restart vdub - and the filter will be present in the filters scroll box). It's pretty much self-explaining, just apply the filter again and again for each photo you want in the movie - you can select the duration of each pic, you can even do cross-fades between them. When you're done, you just select a compression method (divx, xvid or whatever) and save your new movie.

There are 2 things you have to take into account: you must convert your JPGs into BMP format, and, since vdub filters don't create new movie pictures but only change existing ones: you have to have a dummy movie with the correct resolution and desired duration. I normally use a dummy movie with a simple black picture for this.

Hope this helps -
f.a.

nalooti
17th September 2006, 18:47
There are 2 things you have to take into account: you must convert your JPGs into BMP format, and, since vdub filters don't create new movie pictures but only change existing ones: you have to have a dummy movie with the correct resolution and desired duration. I normally use a dummy movie with a simple black picture for this.

f.a.

thanks very much full.ashtray

i downloaded the filter along with a zip file containing a sample (earth). Then from the sample i loaded the first bmp file into vdub.
vdub shows me 2 screen of the bmp photo (the earth). When i push the vdub cursor to the right, erath begin turning.

First, i don't understand what vdub is doing when i move its cursor ? (it's not a movie, just a bmp photo! so why this animation)

Second, i don't understand what's a dummy movie, how can i create one and set the correct resolution and desired duration. Can you please explain this to me simply and step by step of operations?

Lastly i wonder in what format the result would be before Divx compression. I'll sure compress it to Divx (to view on TV) but i'd also be interested to save the original format if it's lossless and if it's readable on my PC. I guess when i have the answer of my second point above, i'll be able to see the last point myself.

thanks very much for your help and looking for another answer please.

nalooti

full.ashtray
17th September 2006, 20:15
First, i don't understand what vdub is doing when i move its cursor ? (it's not a movie, just a bmp photo! so why this animation)
I never downloaded this demo zip, so I can't tell for sure, but I assume it's not just one bmp but a series with identical filenames containing increasing numbers. So vdub takes this series and puts it together to a virtual movie.

Second, i don't understand what's a dummy movie, how can i create one and set the correct resolution and desired duration.
As I said, vdub filters do not add new frames to a movie (they do not lengthen it), but modify existing ones. So the frames you want to fill with your bitmaps, must already exist - as a "layer" on top of which filters can be applied. Here is how you can do that:

1. Check the width/height of your pictures - they all should have the same size.

2. Take any existing avi file you like from your hard disk. Load it into vdub. If you use vdubmod, you can even take a vob file from a DVD. It should have at least the duration of the movie you want to create.

3. Use vdub's resize filter to adjust the frame size of this movie to the size of the bitmaps you want to use. So far for the "layer" or "dummy". Now you can

4. start using the logo filter. For each pic you want in the movie you have to call the filter again and fill in the appropriate controls.
For example: if you want the 1st picture to stay for 10 seconds, you should choose pic01.bmp as Input file, set the Starting frame to 0 and the duration to 250 (if your movie has 25 fps). For the 2nd picture you call the filter again: if you want this one to stay for, say 20 seconds, you choose pic02.bmp as Input file, you set the Starting frame to 250 and the Duration to 500. Go on this way until you have all your pics in the movie.

5. Finally cut the movie dummy to the appropriate length and save it.

Lastly i wonder in what format the result would be before Divx compression. I'll sure compress it to Divx (to view on TV) but i'd also be interested to save the original format if it's lossless and if it's readable on my PC.
In vdub you have the option to save a movie uncompressed - but you will need a lot of HD space. You can use the Huffyuv codec which is actually lossless. You can of course also divx-compress it directly.

Good luck -
f.a.

nalooti
18th September 2006, 09:54
Hi full.ashtray and thanks really much for taking your time for this detailed answer.

I'll certainly give it a try, but it seems that this process is rather very long since i must do something after each frame insertion!

I'll have more than 200,300 or 400 photos forming a 30s long timelaps movie. I can't imagine doing something manually 400 times!

So far the easiest way i found is doing it with windows movie maker which produces me a wmv file that i can then convert to Divx. Yes i know i'm going through two compression steps and i'd like to have at most one ending with an avi Divx but i'm still searching.

thanks very much anyway
nalooti

full.ashtray
18th September 2006, 13:30
You didn't tell me you've got that much different pictures and, more important, that you (obviously) want each of them to be only one frame long in the movie.

If so, there is a much easier way - the same way the Earth demo in your downloaded zip file works. Just give all your bmp files the same name with continuously increasing numbers (e.g. pic0001.bmp, pic0002.bmp and so on). You can do that automatically, there are renaming utilities in the Web for that.

Then load the first pic into vdub, choose a compression (or choose uncompressed) and save. Finished.

f.a.

jggimi
18th September 2006, 13:34
There are a whole classification of software applications that can aid you in your quest. They are known as "Non Linear Editors" or NLEs. I'm not aware of any freeware ones, but there are any number of consumer-grade commercial products that cost around US$100 that can do what you are looking for.

Several companies offer 30-day free trials of their software; one that I have tried is Ulead's VideoStudio (www.ulead.com).

There are others.

Your question really isn't about DivX encoding, it is really about editing video prior to encoding. I'm moving this thread to our NLE forum, where you may be able to receive additional advice on NLE solutions that might best meet your needs.

nalooti
18th September 2006, 15:46
You didn't tell me you've got that much different pictures and, more important, that you (obviously) want each of them to be only one frame long in the movie.

If so, there is a much easier way - the same way the Earth demo in your downloaded zip file works. Just give all your bmp files the same name with continuously increasing numbers (e.g. pic0001.bmp, pic0002.bmp and so on). You can do that automatically, there are renaming utilities in the Web for that.

Then load the first pic into vdub, choose a compression (or choose uncompressed) and save. Finished.

f.a.
Hi full.ashtray

thanks again for your reply and sorry if i didn't explain correctly. In the first thread i said the purpose is for "plant observation, blooming flowers, people going around in one area". At the time i didn't know even the name "timelaps movie".

Hopefully, now i'm very close to the end. I'm gonna try what you said very soon. I presume i still need that filter i put in vdub directory.
If it's that simple as you said and specially with my prefered tool i.e. vdub, i just have to convert all my jpegs to bmp. If you have a little advice on a tool to do it automatically i'd be grateful. My files are already sequentially numbered out of my canon s80 digicam, so no worry for renaming.

So i load the first , then save the file ? that's it ?? amazing!!!

thanks a lot
nalooti

nalooti
18th September 2006, 15:51
There are a whole classification of software applications that can aid you in your quest. They are known as "Non Linear Editors" or NLEs. ...

thanks a lot jggimi

and sorry for the wrong place of my post.

full.ashtray
18th September 2006, 22:45
Hi nalooti -

no, you don't need the logo filter if you do it this way. A free batch conversion tool (and, by the way, an excellent picture viewer) is IrfanView. But there is still another possibility: you could try vdubmod instead of vdub. It accepts jpgs as input, too, as far as I know.

f.a.

setarip_old
19th September 2006, 02:32
@nalooti

Hi!i'd love to do it in Virtualdub if possible. I know how to compress to Divx with vdub but don't know how to join several jpeg files with it if possibleYou can accomplish this readily in VirtualDubMOD (NOT the standard VirtualDub), as follows:

1) Make certain that ALL JPEGs are of the identical dimensions (Both Horizontal and Vertical must be multiples of 8) and color depth

2) Rename the jpegs, in the sequence you desire, using the following format, which will be recognized by VirtualDubMOD:

flower.01.jpg, flower.02.jpg, flower.03.jpg, etc.

3) Load only "flower.01.jpg" into VirtualDubMOD. VirtualDubMOD wil AUTOMATICALLY load all of the other files in the numerical sequence you've created

4) From the "Video" dropdown menu, select "Frame Rate" and for "Change the frame rate to", enter the decimal corollary to the frame rate you desire (e.g. 0.2 = 1 frame every 5 seconds, 0.1 = 1 frame every 10 seconds, 1.0 = 1 frame every 1 second, 2.0 = 2 frames every 1 second)

5) From the "Video" dropdown menu, select "Compression" - and choose the codec and settings you desire

6) Then use VirtualDubMOD to "Save as .AVI"

nalooti
19th September 2006, 09:42
Hi full.ashtray and thanks again


Then load the first pic into vdub, choose a compression (or choose uncompressed) and save. Finished.


well, "almost" finished. Here is the problem:
i load the 1st pic into vdub. Then i try to compress with Divx. It tells me it doesn't recognize the input file (pic_001.bmp).
So under compression, i check uncompressed. I get an avi file of about 16MB resulting from all the bmp files (totaling about 2MB). I can read that file with wmp. But i can't compress it to Divx afterwards with vdub. It just can't recognize the format. So i check the properties of video and it's a Microsoft format (i don't remember the name of the codec; i'm not at home while writing this).

So, it works if i want to play it on my PC and with a big resulting file. It can't still convert it to Divx for reducing the size and make it readable on my Divx player on TV.


you could try vdubmod instead of vdub. It accepts jpgs as input, too...


Actually, if this works, it's far better since i have no jpg conversion step. i'll try it and let you know

thanks a lot
nalooti

nalooti
19th September 2006, 10:06
Hi setarip_old and thank you for answering

@nalooti

Hi!You can accomplish this readily in VirtualDubMOD (NOT the standard VirtualDub), as follows:

1) Make certain that ALL JPEGs are of the identical dimensions (Both Horizontal and Vertical must be multiples of 8) and color depth

2) Rename the jpegs, in the sequence you desire, using the following format, which will be recognized by VirtualDubMOD:

flower.01.jpg, flower.02.jpg, flower.03.jpg, etc.

All pictures have the same dimension. Actually i set my canon s80 digicam on "intervalometer" mode taking a picture every 1 minute for as long as the battery and/or the SD card can handle. However the file name format is IMG_xxxx.jpg, a bit different from what you said but still sequentially numbered. I guess it should be no problem?



4) From the "Video" dropdown menu, select "Frame Rate" and for "Change the frame rate to", enter the decimal corollary to the frame rate you desire (e.g. 0.2 = 1 frame every 5 seconds, 0.1 = 1 frame every 10 seconds, 1.0 = 1 frame every 1 second, 2.0 = 2 frames every 1 second)


I'm confused, your example of 0.2 must be for a slide show or something. Mine would be 25fps, just the standard frame rate of PAL. Am i right ?


(EDIT - Upon testing, this seems to work properly only with "Uncompressed RGB")

Should i understand you tested it and you can't compress directly to Divx ?
But if i can first do it in "Uncompressed RGB", can i later compress it to Divx in another step ?

Please note that i can just test these instructions in few hours, not now when i'm writing this thread, hence some stupid question that i could maybe answer myself after testing :)

many thanks
nalooti

setarip_old
19th September 2006, 18:08
Originally Posted by setarip_old
(EDIT - Upon testing, this seems to work properly only with "Uncompressed RGB")

Should i understand you tested it and you can't compress directly to Divx ?
But if i can first do it in "Uncompressed RGB", can i later compress it to Divx in another step ?Please note that I subsequently REMOVED that "edit" note and, instead added(Both Horizontal and Vertical must be multiples of 8)DivX compression will work just fine...

I'm confused, your example of 0.2 must be for a slide show or something. Mine would be 25fps, just the standard frame rate of PAL. Am i right ?That would be up to you, based on how long you want each image of your time lapse video to display...

However the file name format is IMG_xxxx.jpg, a bit different from what you said but still sequentially numbered. I guess it should be no problem?That will likely work. Check it out by using a small sample of three consecutive images...

SeeMoreDigital
19th September 2006, 18:47
I use an application called JPGAvi (v1.07.0.0) (http://www.ndrw.co.uk/) to generate full motion video from JPEG stills: -

http://img97.imageshack.us/img97/4760/screenshotfullsizefv6.gif

It's a "payware" ($29.99 (US)) application with a 30 day trial. But it's very flexible...


Cheers

GodofaGap
20th September 2006, 09:48
Recent verrsions of VirtualDub (1.16.x) can load bmp, png, tga AND jpg. No need to pay for anything.

I'm not sure why you have problems converting to DivX. Makes ure the input dimensions are correct and that you are not breaking DivX profiles.

nalooti
21st September 2006, 11:50
Hi setarip_old, Hi GodofaGap
and thanks to all answering my questions. I finally found how to do it thanks to all of you.

setarip_old,
VirtualDubMod worked fine. I can set the frame rate i want. I tested with 25fps, 15fps, ...

Although at this point i can say i have what i was looking for, i'm just curious about one point:

When doing this with windows movie maker (which produces only wmv video, hence my search for other solutions), there are two parameters controlling frame rate but they are named differently:
image duration time (with minimum of 0.125s) and image transition duration (minimum of 0.25s) and i don't know how to relate them to image/frame rate

GodofaGap,
thanks for the information about vdub 1.16.x
Actually, i was using vdub 1.15.x.x because i think i had heard some time ago about some bugs and/or further restrictions (that i don't remember) about newer versions above 1.15.x.x.

I'll sure test a newer 1.16.x version of vdub (specially that there is no installation and just running the executable will show me how it works).

Can you tell me that 1.16.x is definitely better than 1.15.x.x with no restrictions so that i remove the old version from my disk?

I use nandub for cutting/joining since it supports VBR and also when joining, it produces a file size which is the exact sum of files i join (which is logic since there is no processing being done) whereas vdub gives me a file of bigger size than the actual sum of the files joined. Also with nandub i have no audio/video synchronization problem.

thanks to all of you
nalooti

nalooti
21st September 2006, 12:01
sorry, i meant vdub versions 1.5.x.x and 1.6.x.x , not 15 nor 16!!!

nalooti

setarip_old
21st September 2006, 18:51
setarip_old,
VirtualDubMod worked fine. I can set the frame rate i want. I tested with 25fps, 15fps, ...Glad to hear my suggestion worked for you ;>}

Congratulations!

GodofaGap
21st September 2006, 21:34
VirtualDub 1.6.x has no restrictions compared to 1.5.10, it can actually just do more. Of course, it doesn't have all the functions of VDM.

ommadawn
4th October 2006, 18:12
My first post.
Thank you all for the detailed info here. I was looking for quite some time for this option, and had no idea it existed in Vdub (mind you, I use vdub for more than 2 years now! never noticed the option, "Image Sequence" under "Open Video File".! )
Amazing what one misses unknowingly.
Anyhow, ran a quick test, and everything runs smoothly (using xvid, no restriction on image size)
Thank you so much!