So to start out with, I having figured out how to animate a number of still frames into a video, like this:
avconv -f image2 -i %06d.png -r 24 -qscale 1 aniron.avi
I have a bunch of files in the directory named 000000.png, 000001.png, 000002.png. I am able to make a video of sufficiently high quality this way. However, efforts to add an audio track by putting "-i aniron.mp3" and a few other options have failed thus far. I always get this:
avconv version 0.8.5-4:0.8.5-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav
developers
built on Jan 24 2013 18:03:14 with gcc 4.6.3
[mp3 @ 0x8623aa0] max_analyze_duration reached
[mp3 @ 0x8623aa0] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'aniron.mp3':
Metadata:
encoder : Lavf52.64.2
TDTG : 2012-07-28T18:05:36
Duration: 00:07:11.46, start: 0.000000, bitrate: 191 kb/s
Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 192 kb/s
Input #1, image2, from '%06d.png':
Duration: 00:07:09.88, start: 0.000000, bitrate: N/A
Stream #1.0: Video: png, rgb24, 1920x1080, 25 fps, 25 tbr, 25 tbn, 25 tbc
File 'aniron.avi' already exists. Overwrite ? [y/N] y
Incompatible pixel format 'rgb24' for codec 'mpeg4', auto-selecting format 'yuv420p'
[buffer @ 0x8629500] w:1920 h:1080 pixfmt:rgb24
[avsink @ 0x8657d60] auto-inserting filter 'auto-inserted scaler 0' between the
filter 'src' and the filter 'out'
[scale @ 0x8634940] w:1920 h:1080 fmt:rgb24 -> w:1920 h:1080 fmt:yuv420p flags:0x4
Incompatible sample format 's16' for codec 'ac3', auto-selecting format 'flt'
[ac3 @ 0x86438e0] invalid bit rate
Output #0, avi, to 'aniron.avi':
Metadata:
encoder : Lavf52.64.2
TDTG : 2012-07-28T18:05:36
Stream #0.0: Video: mpeg4, yuv420p, 1920x1080, q=2-31, 200 kb/s, 90k tbn, 24 tbc
Stream #0.1: Audio: ac3, 44100 Hz, stereo, flt, 200 kb/s
Stream mapping:
Stream #1:0 -> #0:0 (png -> mpeg4)
Stream #0:0 -> #0:1 (mp3 -> ac3)
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such
as bit_rate, rate, width or height
I may just end up doing this in Kdenvlive but this is bugging me.
-c:a copy
after-i somefile.mp3
it should re-use the MP3 input rather than transcoding it.