[FFmpeg-user] make a slideshow out of images and embed videos in it

atticus mail-login+ffmpeg at protonmail.com
Tue Apr 7 01:23:45 EEST 2020


Hi,
I'm trying to make a slideshow of a few images (to test it, later it will be
many images) and concatenate the output with a normal video file afterwards
(this is the troubling point).

What I'm doing:
first step: create the slideshow:
ffmpeg -safe 0 -f concat -i tmpQuer -f lavfi -i
anullsrc=channel_layout=stereo:sample_rate=44100 -vsync vfr -pix_fmt yuv420p
-vf fps=25 -c:a aac -shortest -r 25 output.mkv

with a file tmpQuer:
file ./quer1.JPG
duration 2
file ./quer2.JPG
duration 2
file ./quer3.JPG
duration 2
file ./quer3.JPG


second step: concatenate
ffmpeg -r 25 -safe 0 -f concat -i tmpVid -c:v h264 -c:a aac -r 25 out.mkv

with a file tmpVid:
file ./output.mkv
file ./video2.MTS



Now if I run the command to concatenate the slideshow with the normal video
ffmpeg tries to encode a very long output file (over 20 minutes, when I
abort) even though the input files only have a duration of less than 15
seconds in total. Therefore I thing it might be an issue with the framrerate
(even tough I think both, the slideshow and the normal video have a
framerate of 25 fps).



In addition see these two outputs:
$ ffmpeg -i output.mkv
Input #0, matroska,webm, from 'output.mkv':
  Metadata:
    ENCODER         : Lavf58.29.100
  Duration: 00:00:06.08, start: 0.000000, bitrate: 14027 kb/s
    Stream #0:0: Video: h264 (High), yuv420p(progressive), 5184x3888, 25
fps, 25 tbr, 1k tbn, 50 tbc (default)
    Metadata:
      ENCODER         : Lavc58.54.100 libx264
      DURATION        : 00:00:06.063000000
    Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp (default)
    Metadata:
      ENCODER         : Lavc58.54.100 aac
      DURATION        : 00:00:06.083000000
At least one output file must be specified

and

$ ffmpeg -i video2.MTS
Input #0, mpegts, from 'video2.MTS':
  Duration: 00:00:08.34, start: 1.458667, bitrate: 8995 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B),
yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn,
50 tbc
    Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
stereo, fltp, 136 kb/s
At least one output file must be specified



I'm already becoming a little desperate since I keep saying to me this
should be working but actually it isn't and I cannot find why (found nothing
on this in any forums I searched and nowhere else)
So any help is appreciated!

Thanks in advance and with best wishes



--
Sent from: http://www.ffmpeg-archive.org/


More information about the ffmpeg-user mailing list