Hi everybody,

i try to generate an MPEG that is suitable for a background menu for a DVD.

So i used a Perl script to generate some pictures:

#! /usr/bin/perl -w

use GD;

my $n = 25;

for(my $i = 0; $i < $n; $i++) {
  my $img = GD::Image->new(720, 576);
  my $white = $img->colorAllocate(255, 255, 255);
  my $black = $img->colorAllocate(0, 0, 0);

#  $img->transparent($white);
  $img->rectangle(10, 10, 10+2*$i, 10+3*$i, $black);

  save_png(sprintf("pic/img%02i.png", $i), $img);
}

sub save_png {
  my ($fname, $im) = @_;

  local *FH;

  open FH, "> $fname" or die "can't write-open '$fname'\n";
  binmode FH;
  print FH $im->png();
  close FH;
}

Then i used "mogrify *" on all the images. before that i got
some complaints from png2yuv:

png2yuv -v 2 -f 25.00 -I t -L 1 -n 24 -j pic/img%02d.png > menu.yuv
   INFO: [png2yuv] Parsing & checking input files.
--DEBUG: [png2yuv] Analyzing pic/img00.png to get the right pic params
   INFO: [png2yuv] Image dimensions are 720x576
   INFO: [png2yuv] Movie frame rate is:  25.000000 frames/second
   INFO: [png2yuv] Interlaced frames, top field first.
   INFO: [png2yuv] Frame size:  720 x 576
   INFO: [png2yuv] Now generating YUV4MPEG stream.
**ERROR: [png2yuv] mpegz: UNKNOWN COLOR FORMAT 3 in PNG transformation !

So after mogrifying the pictures i can create a YUV stream.

png2yuv -v 2 -f 25.00 -I t -L 1 -n 24 -j pic/img%02d.png > menu.yuv
... lots of debug stuff ...


But when i use MPlayer to show the stream i get lots of garbage output.
In the output i can see the generated pictures, but they are heavily
distorted and garbage is added.


Can anybody tell me what is going wrong?

Do i use incorrect parameters?


Best regards,
Torsten.


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to