Log in

View Full Version : Converting a JPEG image to a video sequence


geoffman
7th December 2003, 07:49
This question is a result of this (http://forum.doom9.org/showthread.php?s=&threadid=66304) thread in the newbie section.

I have made a JPEG image as a basis for conversion (eventually into a 5 second MPEG stream). In the referenced thread I have been assured that I can turn my JPEG image into a video stream using avisynth.

I have had a play with avisynth scripts and cannot seem to do it, and a search of the forum wasn't very revealing either (maybe no one has asked this before). Can anyone suggest as to how to go about it please?

P.S. I would have asked this in my previous thread as a follow on question, but as I am asking this as a particular avisynth question, I felt that this forum is more appropriate. (If I have broken any forum rules I apologise).

d'Oursse
7th December 2003, 09:12
perhaps this :
http://www.avisynth.org/index.php?page=Image
might help you.

geoffman
7th December 2003, 11:18
I tried Imagereader, it didn't seem to work all I got was the following error message:Avisynth read error: ImageReader : error #1290 ecountered in DevIL libraryThanks anyway.

d'Oursse
7th December 2003, 11:25
Perhaps try this :

1) make (for instance) 50 copies of your image, and name them image01.jpeg, image02.jpeg, .... image50.jpeg. Let us suppose that they are in the directory DIR.

2)in your .avs, add

ImageReader("DIR\image%02d.jpeg", 1, 50, 25, false)

replace 25 by your desired fps.

edit : if you have more than 100 images, replace %02d by %03d (the number before d must be at least the number of digits in the name of the image)

geoffman
7th December 2003, 11:31
d'Oursse, thanks or the tip, I tried your method and it worked. :)

Also upon reading the documentation more closely, (utilising your advice), I realise I had made an error in my input file specification and it now works fine. Thanks very much for your assistance.

Leak
7th December 2003, 14:42
Originally posted by d'Oursse
1) make (for instance) 50 copies of your image, and name them image01.jpeg, image02.jpeg, .... image50.jpeg. Let us suppose that they are in the directory DIR.

2)in your .avs, add

ImageReader("DIR\image%02d.jpeg", 1, 50, 25, false)

replace 25 by your desired fps.


Ummm... since it's only one source image it's probably more efficient to use

ImageReader("<path>\Image.jpg",0,0,25).Loop(5*25)

(Or something like that, I haven't tested it... :))

np: Metamatics - Hymn Bream (Mind Mushing Git)