Stitch X images to a video container

69 views
Skip to first unread message

rchand

unread,
Jan 8, 2013, 12:30:57 AM1/8/13
to jjmpeg-...@googlegroups.com
Hi , I am unable to find much documentation on the classes used in jjmpeg. Can someone help me in stitching set of images in a video container ?

Michael Zucchi

unread,
Jan 8, 2013, 2:59:22 AM1/8/13
to jjmpeg-...@googlegroups.com
I presume you mean just write images to a video - stitching usually
refers to registration and merging of multi-shot images.

Look at au.notzed.jjmpeg.JJMediaWriter, or something that uses it like this:

http://code.google.com/p/jjmpeg/source/browse/trunk/jjmpegdemos/src/au/notzed/jjmpeg/streamwriter/VideoWriter.java

It's pretty much directly based on the ffmpeg demo output-example.c so
you can just reference that too.

I haven't needed the audio stuff so that might not work.

Michael

rchand

unread,
Jan 10, 2013, 1:41:10 AM1/10/13
to jjmpeg-...@googlegroups.com
Thank you Michael for your response. I have some more questions:
 1. Is JJMPEG can be used on cross-platform?
 2. Also, In VideoWriter.Java file, vstream.addframe() takes AVFrame as an argument , not a Bufferred image ... can you please throw more light on this?
3.  i have a set of pictures, can I vary the frame rate and bit rate using JJMPEG?
4. Which all video containers can i bind my images to ( mp4?) 
Hope, the list is not too long to reply ... 

Michael Zucchi

unread,
Jan 10, 2013, 5:21:34 AM1/10/13
to jjmpeg-...@googlegroups.com

On 10/01/13 17:11, rchand wrote:
> Thank you Michael for your response. I have some more questions:
> 1. Is JJMPEG can be used on cross-platform?

Oh come on, you can read this yourself from the web page!

> 2. Also, In VideoWriter.Java file, vstream.addframe() takes AVFrame as
> an argument , not a Bufferred image ... can you please throw more light
> on this?

The version i linked to has a buffered image version of the same
function too. It's not very hard to convert to/from
bufferedimage/avframe, only a few lines of code which can easily be
found scattered through the source code.

> 3. i have a set of pictures, can I vary the frame rate and bit rate
> using JJMPEG?

I don't think you can change the bitrate from frame to frame, although
it might depend on the format and bitrate used. I very much doubt it
can be so fine-tuned though.

My guess is you can't change the frame delay in arbitrary ways either,
but again it may depend on the format and/or codec. When I wrote some
video i just kept writing the same image multiple times to fit whatever
rate I wanted to simulate. i.e. at 25fps write the same image 25 times
for a 1 second 'frame'. Maybe if you set the frame pts explicitly when
you write the frame out then libavcodec will do this for you though -
but I have not tried.

> 4. Which all video containers can i bind my images to ( mp4?)
> Hope, the list is not too long to reply ...

Should be able to do any of the formats supported by the FFmpeg build
you're running against. I haven't written many videos so I can't help
any more than the code i've published.

Also it's just called jjmpeg, not upper case, not that that is terribly
important.

Michael
Reply all
Reply to author
Forward
0 new messages