[Libav-user] Encoding PNG images to MOV video

Arthur Muller muller at vki.com
Wed Mar 9 00:23:02 CET 2016


Hello,

I have a series of png images. I read them, convert each of them to RGB24,
then fill a frame with the data to create a .mov quicktime file. It all
works.

Each png image is about 200K in size. Each image is 1536x856 pixels. This
means that uncompressed, each image is about 4MB.

My resulting mov file is about 10MB. Clearly, some compression took place.
However, if I use the command line ffmpeg to generate the file using

ffmpeg -framerate 10 -i image%02d.png -c:v qtrle output.mov

then the resulting file is only 1.3Mb. Below is the output from the ffmpeg
command. 

My question: how do I configure libav through the API to also generate such
a small, good-quality file?

Thanks.

-Arthur

ffmpeg version 3.0 Copyright (c) 2000-2016 the FFmpeg developers

  built with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)

  configuration: --enable-libopenh264

  libavutil      55. 17.103 / 55. 17.103

  libavcodec     57. 24.102 / 57. 24.102

  libavformat    57. 25.100 / 57. 25.100

  libavdevice    57.  0.101 / 57.  0.101

  libavfilter     6. 31.100 /  6. 31.100

  libswscale      4.  0.100 /  4.  0.100

  libswresample   2.  0.101 /  2.  0.101

Input #0, image2, from 'image%02d.png':

  Duration: 00:00:01.80, start: 0.000000, bitrate: N/A

    Stream #0:0: Video: png, rgb24(pc), 1536x856, 10 fps, 10 tbr, 10 tbn, 10
tbc

Output #0, mov, to 'output.mov':

  Metadata:

    encoder         : Lavf57.25.100

    Stream #0:0: Video: qtrle (rle  / 0x20656C72), rgb24, 1536x856, q=2-31,
200 kb/s, 10 fps, 10240 tbn, 10 tbc

    Metadata:

      encoder         : Lavc57.24.102 qtrle

Stream mapping:

  Stream #0:0 -> #0:0 (png (native) -> qtrle (native))

Press [q] to stop, [?] for help

frame=   18 fps= 17 q=-0.0 Lsize=    1276kB time=00:00:01.80
bitrate=5808.1kbits/s speed=1.72x

video:1275kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.064166%

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160308/fd934147/attachment.html>


More information about the Libav-user mailing list