Convert set of images to AVI and/or Quicktime

642 views
Skip to first unread message

StrideColossus

unread,
Sep 16, 2009, 1:20:43 PM9/16/09
to gstreamer-java
Hi all

I have a requirement on the project we're developing to generate and
render video, preferably in AVI and Quicktime formats. We are
generating a series of frames (JPEG or PNG format) from a 3D scene
which go to make the movie.

I've tried the 'standard' approach of using JMF but it's basically
poorly implemented, poorly documented, no longer supported (being
replaced in Java 7 I understand), and most importantly doesn't work.
So I've been looking at alternatives and am liking the look of
GStreamer-java.

However multi-media is not my background and I'm struggling to work
out how to create a pipeline that will generate an AVI movie from a
set of JPEG images, or even if it's possible (certainly no-one seemed
to be able to do it using JMF!)

Can anyone point me at some example code (tried internet but perhaps
I'm not using the right search terms) or perhaps outline the elements
I would need pseudo-code style?

Any assistance would be greatly appreciated.

Cheers

- chris

Pascha

unread,
Sep 16, 2009, 6:54:51 PM9/16/09
to gstreamer-java
HI,

for a couple of weeks i was trying to do the similar thing for my
thesis. For test purposes i was using the command line to generate a
AVI-Movie from a list of JPEG-files.

gst-launch multifilesrc location="img.%04d.jpg" num-buffers=100
caps=image/jpeg,framerate=5/1 ! jpegdec ! ffmpegcolorspace ! xvidenc !
avimux ! filesink location="movie.avi"

This command will generate a AVI file, each image has a length of 20
(100 buffer / 5fps) seconds.

StrideColossus

unread,
Sep 17, 2009, 4:48:43 AM9/17/09
to gstreamer-java
Excellent, cheers for that Pascha

I can base my pipeline design on your gst-launch command-line :)

However next problem: I tried the command but couldn't get it
working, seems like a common problem:

C:\gstreamer\bin>gst-launch-0.10 multifilesrc location="/images/
%01d.jpeg" num-b
uffers=100 caps=image/jpeg,framerate=5/1 ! jpegdec !
ffmpegcolorspace ! xvidenc
! avimux ! filesink location="jpeg.avi"
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/
GstMultiFileSrc:multifilesrc0: Intern
al data flow error.
Additional debug info:
..\Source\gstreamer\libs\gst\base\gstbasesrc.c(2334):
gst_base_src_loop (): /Gst
Pipeline:pipeline0/GstMultiFileSrc:multifilesrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Just get a generic "data flow error" from the multifilesrc. I assume
it's something I'm doing wrong - probably not installed a JPEG loader
plugin perhaps?

- chris

Pascha

unread,
Sep 17, 2009, 6:02:14 AM9/17/09
to gstreamer-java
HI chris,

i think the lines were broken wrong on copy paste. I just tried it on
my computer and got the same error. So try this:

gst-launch multifilesrc location="/images/%01d.jpeg" num-buffers=100 \
caps=image/jpeg,framerate=5/1 ! jpegdec ! ffmpegcolorspace !
xvidenc ! \
avimux ! filesink location="jpeg.avi"

Pascha

unread,
Sep 17, 2009, 6:08:28 AM9/17/09
to gstreamer-java
gst-launch multifilesrc location="/images/%01d.jpeg" num-buffers=100 \
caps=image/jpeg,framerate=5/1 ! jpegdec ! ffmpegcolorspace ! \
xvidenc ! avimux ! filesink location="jpeg.avi"

StrideColossus

unread,
Sep 17, 2009, 6:18:16 AM9/17/09
to gstreamer-java
No I don't think that's it, I'm pretty certain the command-line is
getting parsed correctly (tried it in batch file as well).
Definitely some problem with initialising the pipeline as far as I can
tell.

Is there a debug or verbose option on gst-launch that might help
diagnose what I'm doing wrong? Just had a quick look at the docs but
can't see anything.

Pascha

unread,
Sep 17, 2009, 6:43:10 AM9/17/09
to gstreamer-java
gst-launch -v multifilesrc ...
Reply all
Reply to author
Forward
0 new messages