poor quality .mpeg from a high quality .png

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
ebe
Posts: 2
Joined: 2012-04-05T08:39:57-07:00
Authentication code: 8675308

poor quality .mpeg from a high quality .png

Post by ebe »

Hello,

I am trying to convert .png pictures on .mpeg movie. I succeed doing that, the film begin in high quality only for a time corresponding to the first 10 pictures :( .
Then the quality become very poor.
The command line I've done :
convert -adjoin -quality 100 imageFs_Vz_2_0??.png -quality 100 movie.miff
convert -quality 100 -delay 5 movie.miff -quality 100 movie.mpeg

The .png pictures has all the same quality.

Have you any idea why this change of quality in the video ?

Thank you :)
ebe
Posts: 2
Joined: 2012-04-05T08:39:57-07:00
Authentication code: 8675308

Re: poor quality .mpeg from a high quality .png

Post by ebe »

I solved my problem by doing .mpeg from only 5 .png (I have 200 .png)
Then I concatenate all the .mpeg (40 .mpeg files) files :
cat film*.mpeg > film_inter.mpeg
Then, to avoid "a breakdown in the sync between video and sound" (http://www.arsgeek.com/2006/08/07/how-t ... mpg-files/)
mencoder -forceidx -oac copy -ovc copy film_inter.mpeg -o film_final.mpeg

Maybe there is a better solution ?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: poor quality .mpeg from a high quality .png

Post by anthony »

Thank you for the link. Most informative, and I am sure others will find it useful.

I am not exactly certain as why you get a sudden drop in video quality. IM itself uses a special purpose (and hidden) 'delegate' command using the "ffmpeg" program to generate the mpg viedo file from a sequence of JPEG images...

Code: Select all

  ffmpeg  -v -1 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -g 300 -i "%M%%d.jpg" "%u.%m" 2>"%Z"

However note that while Imagemagick can generate video sequences (generally using delegate comamnds like the above), and is often used in video processing, (cross fades, titles, credits, etc) it's focus is not primarly video, but individual image processing.

However please feel free for more comments, hints and tips, for generating video from single images, as I am sure people are interested. I know I am.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply