[FFmpeg-user] Create webm, m4v and swf slideshow of images

Pascal purrie at gmail.com
Sun Jun 9 20:51:12 CEST 2013


Hi Carl,


> Before I start testing:
> Could you confirm that the following shows a length
> of 2:17 ?
> $ ffmpeg -i ./Red\ Balloon.mp3 -f null -

Input #0, mp3, from './Red Balloon.mp3':
   Metadata:
     title           : Red Balloon
     artist          : Frances England
     album_artist    : Frances England
     TCM             : Frances England
     album           : Mind of My Own
     track           : 4/15
     encoded_by      : iTunes 10.1.1.4
     genre           : Children's Music
     date            : 2010
   Duration: 00:02:17.57, start: 0.000000, bitrate: 160 kb/s
     Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 160 kb/s



> And is the problem reproducible with -vcodec mpeg4 ?

No that codec works just fine:

[image2 @ 0x3dacea0] max_analyze_duration 5000000 reached at 5000000 
microseconds
Input #0, image2, from '*.jpg':
   Duration: 00:01:45.00, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: mjpeg, yuvj444p, 800x800 [SAR 72:72 DAR 1:1], 
0.20 fps, 1 tbr, 0.20 tbn, 0.20 tbc
[mp3 @ 0x3dae960] max_analyze_duration 5000000 reached at 5015510 
microseconds
[mp3 @ 0x3dae960] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from './Red Balloon.mp3':
   Metadata:
     title           : Red Balloon
     artist          : Frances England
     album_artist    : Frances England
     TCM             : Frances England
     album           : Mind of My Own
     track           : 4/15
     encoded_by      : iTunes 10.1.1.4
     genre           : Children's Music
     date            : 2010
   Duration: 00:02:17.57, start: 0.000000, bitrate: 160 kb/s
     Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 160 kb/s
Output #0, mp4, to 'out.mp4':
   Metadata:
     encoder         : Lavf55.8.102
     Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 800x800 
[SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 16384 tbn, 0.20 tbc
     Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 
44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (mjpeg -> mpeg4)
   Stream #1:0 -> #0:1 (mp3 -> libvo_aacenc)
Press [q] to stop, [?] for help
overread, skip -7 enddists: -6 -6  1730kB time=00:01:05.00 bitrate= 
218.0kbits/s
overread, skip -6 enddists: -4 -4  2438kB time=00:01:35.00 bitrate= 
210.3kbits/s
frame=   29 fps= 12 q=1.6 Lsize=    4268kB time=00:02:25.00 bitrate= 
241.1kbits/s
video:2095kB audio:2149kB subtitle:0 global headers:0kB muxing overhead 
0.588774%


File is 02:25 so 8 seconds longer than the music.



> Why don't you specify an output frame rate if vpx
> does not support 1/ 5?
> ffmpeg -f image2 ... -s 800x800 -r 15 out.webm

-r 15 does not seem to do the trick:

[image2 @ 0x3dacea0] max_analyze_duration 5000000 reached at 5000000 
microseconds
Input #0, image2, from '*.jpg':
   Duration: 00:01:45.00, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: mjpeg, yuvj444p, 800x800 [SAR 72:72 DAR 1:1], 
0.20 fps, 1 tbr, 0.20 tbn, 0.20 tbc
[mp3 @ 0x3dae960] max_analyze_duration 5000000 reached at 5015510 
microseconds
[mp3 @ 0x3dae960] Estimating duration from bitrate, this may be inaccurate
Input #1, mp3, from './Red Balloon.mp3':
   Metadata:
     title           : Red Balloon
     artist          : Frances England
     album_artist    : Frances England
     TCM             : Frances England
     album           : Mind of My Own
     track           : 4/15
     encoded_by      : iTunes 10.1.1.4
     genre           : Children's Music
     date            : 2010
   Duration: 00:02:17.57, start: 0.000000, bitrate: 160 kb/s
     Stream #1:0: Audio: mp3, 44100 Hz, stereo, s16p, 160 kb/s
Output #0, mp4, to 'out.mp4':
   Metadata:
     encoder         : Lavf55.8.102
     Stream #0:0: Video: mpeg4 ( [0][0][0] / 0x0020), yuv420p, 800x800 
[SAR 1:1 DAR 1:1], q=2-31, 200 kb/s, 16384 tbn, 0.20 tbc
     Stream #0:1: Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 
44100 Hz, stereo, s16, 128 kb/s
Stream mapping:
   Stream #0:0 -> #0:0 (mjpeg -> mpeg4)
   Stream #1:0 -> #0:1 (mp3 -> libvo_aacenc)
Press [q] to stop, [?] for help
overread, skip -7 enddists: -6 -6  1730kB time=00:01:05.00 bitrate= 
218.0kbits/s
overread, skip -6 enddists: -4 -4  2438kB time=00:01:35.00 bitrate= 
210.3kbits/s
frame=   29 fps= 12 q=1.6 Lsize=    4268kB time=00:02:25.00 bitrate= 
241.1kbits/s
video:2095kB audio:2149kB subtitle:0 global headers:0kB muxing overhead 
0.588774%


Video length is the same as the mp3 file. But images are shown directly 
after eachother without delay.


-- 
Groet,
Pascal



More information about the ffmpeg-user mailing list