[MEncoder-users] Problem with generating video from image files
Torbjörn Rathsman
tormann at telia.com
Sun Dec 18 17:45:29 CET 2011
> -----Ursprungligt meddelande-----
> Från: mencoder-users-bounces at mplayerhq.hu
> [mailto:mencoder-users-bounces at mplayerhq.hu]För Reimar Döffinger
> Skickat: den 18 december 2011 12:12
> Till: MEncoder usage discussions
> Ämne: Re: [MEncoder-users] Problem with generating video from image
> files
>
>
> On Sun, Dec 18, 2011 at 12:01:48PM +0100, Torbjörn Rathsman wrote:
> >
> >
> > > -----Ursprungligt meddelande-----
> > > Från: mencoder-users-bounces at mplayerhq.hu
> > > [mailto:mencoder-users-bounces at mplayerhq.hu]För Lobster
> > > Skickat: den 18 december 2011 06:45
> > > Till: MEncoder usage discussions
> > > Ämne: Re: [MEncoder-users] Problem with generating video from image
> > > files
> > >
> > >
> > > On 18/12/2011 9:04 a.m., Torbjörn Rathsman wrote:
> > > > I am trying to create a video file from a set of image file
> using the
> > > > following command:
> > > >
> > > > mencoder mf://../frames/%d.png -mf fps=25 -o
> ../video/new-video.avi -ovc
> > > > lavc -lavcopts
> > > >
> > > vcodec=mpeg4:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:v
> > > max_b_fram
> > > > es=2:vb_strategy=1:precmp=2:subcmp=2:preme=2:qns=2:vbitrate=30000000
> > > >
> > > > After it comes to a completly black frame it says
> > > >
> > > > "The selected video_out device is incompatible with this codec."
> > > >
> > > > and aborts without generating a valid video file. If I
> remove the black
> > > > frame, everything works fine. How should I deal with this?
> > >
> > > It sounds to me like that black frame has been created with different
> > > colour settings
> > > than the other frames, or some thing similar.
> > >
> > > if I was you I would compare the colour depth and mode of the
> black png
> > > compared
> > > to the other ones, and then try to make the black png with the same
> > > settings as the
> > > other png's.
> > >
> >
> > This frame was 1 bit per pixel black/white while the other was
> rgb24. What I
> > am doing is the following
> >
> > mogrify -resize x720 ..\frames\*.png
> > mogrify -crop 1280x720+128+0 ..\frames\*.png
> > mencoder mf://../frames/%%d.png -mf fps=25 -o
> ../video/new-video.avi -ovc
> > lavc -lavcopts
> >
> vcodec=mpeg4:mbd=2:mv0:trell:v4mv:cbp:last_pred=3:predia=2:dia=2:v
> max_b_fram
> > es=2:vb_strategy=1:precmp=2:subcmp=2:preme=2:qns=2:vbitrate=30000000
> >
> > It looks like mogrify changes color type to save space when it
> can. However,
> > I guess I could do the resample and crop in the mencoder command. How?
> > First the frame should be resampled to a height of 720 pixels. Then the
> > width should be cropped to 1280 pixels preserving the center of
> the image.
>
> -vf scale=-1:720,crop=1280:720
> as a starting point (not sure about the -1).
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
I solved it with
-vf scale=-3:720,crop=1280:720
More information about the MEncoder-users
mailing list