Page 1 of 1

adding to an mp4

Posted: 2015-04-01T08:41:10-07:00
by dclarkeatsmu
I am trying to create an mp4 from a sequence of PPM files using the command line:

convert -delay 4 -quality 75 *.ppm movie1.mp4

I find this to be an incredibly slow process and, as I frequently get more images after to add to my mpeg, I'd dearly love not to have to start the mpeg from scratch. So, for example, I may have 500 1000 x 750 pixel images in PPM format compressed into an mp4 using the above command line. When I get 100 more to add, I'd like to be able to just add the new 100 images, rather than have to create a whole new mp4 with 600 images. I've tried:

convert -delay 4 -quality 75 -adjoin *.ppm movie1.mp4
convert -delay 4 -quality 75 -append *.ppm movie1.mp4
convert -delay 4 -quality 75 -coalesce *.ppm movie1.mp4
convert -delay 4 -quality 75 -combine *.ppm movie1.mp4

and nothing seems to work. How does one append new PPM files to an existing mp4?

Thanks.

Re: adding to an mp4

Posted: 2015-04-01T09:27:10-07:00
by fmw42
I am not an expert on MP4 and MPEG videos, though I have created some. IM uses FFMPEG to process as a delegate library, but has limited functionality. Most if not all your commands relate to gif animations and not mp4 files. I would recommend you just use FFMEG to your processing independent of Imagemagick. It is lightning fast.

Re: adding to an mp4

Posted: 2015-04-01T12:05:55-07:00
by dclarkeatsmu
Thanks fmw42. In fact, it's about 20 times faster! I shake my head wondering hoe this can be, since ImageMagick uses ffmpeg as its mpeg decoder, so it spins wheels somewhere! My problem was trying to figure out the FFmpeg syntax from sites that assume I have far more knowledge and jargon than I do. Still, to the best of my abilities, I think the equivalent to

convert -delay 4 -quality 75 *.ppm movie1.mp4

is

ffmpeg -f image2 -pattern_type glob -framerate 24 -loglevel '8' -i '*.ppm' -metadata title=" " -y movie2.mp4

Sorta. Not sure how to effect the "quality" factor, and my movie2 is about 60% the size of my movie1. FYI anyone who cares!

Re: adding to an mp4

Posted: 2015-04-01T12:18:04-07:00
by fmw42
Yes, the documentation is daunting. I had to Google for specific issues and examples when I had to use.

Re: adding to an mp4

Posted: 2015-04-01T12:29:37-07:00
by snibgo
IM's "-verbose" will show the ffmpeg command that is used.

ffmpeg's quality is "-q", although setting a bitrate with "-b" is generally better.