I'm trying to use JMF to make a video using multiple jpg images.
These images are also saved using ImageIO
of Java itself.
Unfortunately, I cannot find a code sample or a working code/class to accomplish make the video using JMF.
There was a JpegImagesToMovie.java class here: http://www.oracle.com/technetwork/java/javase/documentation/jpegimagestomovie-176885.html but that link seems broken.
Can someone please post a working code, or tell me some other way of making videos with java and a different class?
I think a working code on this page might help others like me in future.
BTW, I also tried to use ffmpeg to compile the video, but that says similar to:
image2 codec not found
When we use java ImageIO to make jpg images, are they not compatible with ffmpeg codecs?
java command:
ImageIO.write(capture, "jpg", new File( uploadPath, filename));
This is the ffmpeg error:
ffmpeg.exe -f image2 -i pic\s%d.jpeg -vcodec mpeg2video vid\video.mpg
FFmpeg version SVN-r7760, Copyright (c) 2000-2006 Fabrice Bellard, et al.
configuration: --enable-memalign-hack --enable-gpl --cpu=i686 --enable-swscaler --enable-pthreads --enable-avisynth --enable-mp3lame --enable-xvid --enable-x264 --enable-libnut --enable-libogg --enable-vorbis --enable-libtheora --enable-faad --enable-faac --enable-libgsm --enable-dts --enable-a52 --enable-amr_nb --enable-amr_wb
libavutil version: 49.2.0
libavcodec version: 51.29.0
libavformat version: 51.8.0
built on Jan 29 2007 19:58:47, gcc: 3.4.6
[image2 @ 00931554]Could not find codec parameters (Video: mjpeg)
pic\sd.jpeg: could not find codec parameters