[MEncoder-users] making a video with photos

Alexandre Almeida a.c.alexandre at live.com
Wed Jun 25 21:56:56 CEST 2008


Hi!
I'm new here, this is my first post...
Well, today I was reading the on-line documentation of the mencoder and then I decided to try to build a small video using a tip in the end of the documentation. This is the link:
 
http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html#EXAMPLES%20OF%20MENCODER%20USAGE
 
and this is the tip:
mencoder "mf://*.jpg" -mf fps=25 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4
well, I have a directory with 7 pictures:
 
linux-8ky4:/zzz-especiais # ls
foto1.jpg  foto2.jpg  foto3.jpg  foto4.jpg  foto5.jpg  foto6.jpg  foto7.jpg
 
And so I Typed:
linux-8ky4:/zzz-especiais # mencoder "mf://*.jpg" -mf fps=25 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4
 
And this was the result:
 
MEncoder 1.0rc2-SUSE Linux 10.3 (i686)-Packman-4.2.1 (C) 2000-2007 MPlayer TeamCPU: Intel(R) Celeron(R) CPU 2.26GHz (Family: 15, Model: 4, Stepping: 1)CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1Compiled with runtime CPU detection.
Exiting... (No output file specified, please see the -o option.)
 
and then I put the -o option at the end...
 
linux-8ky4:/zzz-especiais # mencoder "mf://*.jpg" -mf fps=25 -ovc lavc -lavcopts vcodec=mpeg4 -o output.avi
 
MEncoder 1.0rc2-SUSE Linux 10.3 (i686)-Packman-4.2.1 (C) 2000-2007 MPlayer TeamCPU: Intel(R) Celeron(R) CPU 2.26GHz (Family: 15, Model: 4, Stepping: 1)CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1Compiled with runtime CPU detection.success: format: 16  data: 0x0 - 0x0MF file format detected.[mf] search expr: *.jpg[mf] number of files: 7 (28)[demux_mf] file type was not set! trying 'type=jpg'...VIDEO:  [IJPG]  0x0  24bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)[V] filefmt:16  fourcc:0x47504A49  size:0x0  fps:25.00  ftime:=0.0400
No video encoder (-ovc) selected. Select one (see -ovc help).
Exiting...
 
no video encoder? Let's put this at the end too... 
 
linux-8ky4:/zzz-especiais # mencoder "mf://*.jpg" -mf fps=25 -lavcopts vcodec=mpeg4 -o output.avi -ovc lavc
 
MEncoder 1.0rc2-SUSE Linux 10.3 (i686)-Packman-4.2.1 (C) 2000-2007 MPlayer TeamCPU: Intel(R) Celeron(R) CPU 2.26GHz (Family: 15, Model: 4, Stepping: 1)CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1Compiled with runtime CPU detection.success: format: 16  data: 0x0 - 0x0MF file format detected.[mf] search expr: *.jpg[mf] number of files: 7 (28)[demux_mf] file type was not set! trying 'type=jpg'...VIDEO:  [IJPG]  0x0  24bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)[V] filefmt:16  fourcc:0x47504A49  size:0x0  fps:25.00  ftime:=0.0400Opening video filter: [expand osd=1]Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1==========================================================================Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec familySelected video codec: [ffmjpeg] vfm: ffmpeg (FFmpeg MJPEG decoder)==========================================================================VDec: vo config request - 480 x 640 (preferred colorspace: Planar YV12)VDec: using Planar YV12 as output csp (no 3)Movie-Aspect is 0.75:1 - prescaling to correct movie aspect.videocodec: libavcodec (480x640 fourcc=34504d46 [FMP4])New_Face failed. Maybe the font path is wrong.Please supply the text font file (~/.mplayer/subfont.ttf).subtitle font: load_sub_face failed.Writing header...ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.Writing header...ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.VDec: vo config request - 500 x 333 (preferred colorspace: Planar YV12)VDec: using Planar YV12 as output csp (no 3)Movie-Aspect is 0.75:1 - prescaling to correct movie aspect.
New video file has different resolution or colorspace than the previous one.FATAL: Cannot initialize video driver.Why do we get NULL??
Exiting...
 
why? I don't know...
 
linux-8ky4:/zzz-especiais # ls
 
foto1.jpg  foto3.jpg  foto5.jpg  foto7.jpgfoto2.jpg  foto4.jpg  foto6.jpg  output.avi
 
It seems that it worked, but...
 
linux-8ky4:/zzz-especiais # mplayer output.avi
 
MPlayer 1.0rc2-SUSE Linux 10.3 (i686)-Packman-4.2.1 (C) 2000-2007 MPlayer TeamCPU: Intel(R) Celeron(R) CPU 2.26GHz (Family: 15, Model: 4, Stepping: 1)CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1Compiled with runtime CPU detection.Can't open joystick device /dev/input/js0: No such file or directoryCan't init input joystickmplayer: could not connect to socketmplayer: No such file or directoryFailed to open LIRC support. You will not be able to use your remote control.
Playing output.avi.AVI file format detected.[aviheader] Video stream found, -vid 0AVI: No audio stream found -> no sound.Could not determine number of frames (for absolute seek).VIDEO:  [FMP4]  480x640  24bpp  25.000 fps  -17179870.0 kbps (-2097152.0 kbyte/s)Clip info: Software: MEncoder 1.0rc2-SUSE Linux 10.3 (i686)-Packman-4.2.1==========================================================================Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec familySelected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)==========================================================================Audio: no soundStarting playback...VDec: vo config request - 480 x 640 (preferred colorspace: Planar YV12)VDec: using Planar YV12 as output csp (no 0)Movie-Aspect is 0.75:1 - prescaling to correct movie aspect.VO: [xv] 480x640 => 480x640 Planar YV12V:   0.0   2/  2 ??% ??% ??,?% 0 0
Exiting... (End of file)
linux-8ky4:/zzz-especiais #    
 And here is why the video doesn't work: no lenght. Here is a link to a sccreenshot of the resulting video:http://img108.imageshack.us/img108/1262/screenshotyw9.jpgAny help?Alexandre.              
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


More information about the MEncoder-users mailing list