[MEncoder-users] Video from JPG Files Problem

Giacomo Comes comes at naic.edu
Fri Oct 27 17:19:31 CEST 2006


On Thu, Oct 26, 2006 at 07:38:17PM -0400, Matt Malone wrote:
> 
> My goal is to produce a video from a sequence of jpg files, where the video 
> is in any format that is so common that any basic windows user anywhere can 
> just click on it and it will show without having to go download some 
> (better) codec.   I would like it to be like 99% of videos/animations on 
> the web.
> 
> This would seem to be the very first thing anyone who has written an 
> analytical program would want to do to show their results as a video.   I 
> am astounded by how impossible it seems to be to accomplish my goal.  At 
> this point I would be happy to hear it is something simple I have forgotten.
> 
> I have downloaded and built MPlayer1.0pre8-3.3.6.  I am running on 
> Slackware Linux 10.4? using kernel 2.4.31.  The hardware is an old Pentium 
> III.
> 
> My jpgs were generated by sprintf(buf,'import -window framewindow 
> %05d.jpg\0',i); system(buf); -- hence numbered 00000.jpg, 00001.jpg etc -- 
> where framewindow is the name of the window that rendered the video frame 
> by frame and displayed it.  The frames are black lines on a white 
> background line drawings with a lot of white space.  The jpg files view 
> just fine in both irfanview (windows) and xv (linux).
> 
> I have been using a number of pre-written command lines posted on the web 
> for mencoder advertiizing that they do what I want.  I have also tried over 
> 100 variations.  Virtually all examples show how to make an mpeg4 file.  
> See my goal for why I want to use something far more universal than mpeg4.  
> So I have been trying to vary the command line to achive my goals.
> 
> I had 500 frames of 1190x739 pixels, black and white.  Mencoder was seg 
> faulting, as did an ffmpeg binary I downloaded in desparation from the web. 
> Then I noticed it was seg faulting in the 400's so I chopped out the last 
> 100 frames and it runs to completion now (one problem at a time).
> 
> The best (choke) files I get result from a command line like:
> 
> mencoder "mf://*.jpg" -mf type=jpg:fps=10 -o mov.mpg -ovc lavc -lavcopts 
> vcodec=mpeg1video -nosound
> 
> When I ftp it back to windows (binary of course), Windows Media Player 
> shows it with the lower half of the screen solid green and the upper half 
> bears only a small resemblance to a single frame with some clutter that 
> appears to change as the video "runs".
> 
> If someone could e-mail me a fool-proof command line that will produce a 
> video that is definitely viewable on any windows platform without 
> downloading a codec, that would be ideal.  If it does not work, there must 
> be something wrong with the way I built mencoder -- any thoughts would be 
> appreciated.
> 
> If someone wants a few frames to try it, see 
> http://209.151.133.226/video/00000.jpg etc for the first 10 frames.

This command will make a mpeg1 video stream playable with windows without installing
any codec.

mencoder -of rawvideo -ovc lavc -lavcopts vcodec=mpeg1video:vrc_buf_size=327:keyint=15:vmax_b_frames=2:aspect=4/3:vrc_maxrate=1152:vbitrate=1152 -o YYY.m1v mf://*.jpg -fps 10 -ofps 25 -vf scale=720:576,harddup

You have to scale down at least to DVD resolution otherwise the M$ crap player will 
not play it (at least the one that come with Win2000).

Side note. This command works with MPlayer 1.0pre8. Rc1 and SVN have a bug and the
command stops with: Floating point exception.
I will submit a proper bugreport about this soon.

Giacomo



More information about the MEncoder-users mailing list