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.
adding to an mp4
-
- Posts: 2
- Joined: 2015-04-01T08:34:45-07:00
- Authentication code: 6789
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: adding to an mp4
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.
-
- Posts: 2
- Joined: 2015-04-01T08:34:45-07:00
- Authentication code: 6789
Re: adding to an mp4
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!
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!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: adding to an mp4
Yes, the documentation is daunting. I had to Google for specific issues and examples when I had to use.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: adding to an mp4
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.
ffmpeg's quality is "-q", although setting a bitrate with "-b" is generally better.
snibgo's IM pages: im.snibgo.com