2. It would be nice to have an expression for a lookup table, for example

lookup(x, y0, y1, y2, ... , z)

   Evaluate x, and if the result is 0 return y0, if the result is 1
   return y1, and so on, else if the result is out of range return z.



I found a workaround for a lookup table. The following example makes a slideshow where each picture is shown 1 second (25 frames), except the 3rd picture is shown 3 seconds (25+50 frames) and the 5th picture is shown 5 seconds (25+100 frames).

ffmpeg -start_number 400 -i IMG_%%4d.jpg ^
-vf "zoompan=d=25+'if(eq(in,3),50,0)'+'if(eq(in,5),100,0)'" ^
-c:v mpeg4 -s 1800x1200 -b:v 5M -q:v 2 test.mp4

Maybe it's useful to add this example to the documentation of the zoompan filter.

Michael

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

Reply via email to