show an image with FFplay for 5 seconds
Hello, is it possible to show an image with FFplay for 5 seconds, and then exit? I did try this command in a Windows batch file, but it doesn't stop after 5 seconds. I drag and drop the image on the batch file: ffplay -autoexit -loop 0 -t 5 %1 Michael
On Fri, Jul 1, 2022 at 9:03 AM Michael Koch <astroelectronic@t-online.de> wrote:
Hello,
is it possible to show an image with FFplay for 5 seconds, and then exit? I did try this command in a Windows batch file, but it doesn't stop after 5 seconds. I drag and drop the image on the batch file:
ffplay -autoexit -loop 0 -t 5 %1
Michael
Definitely not a bacth file expert (have not run Windows sine the 90's), but under linux, you could start the video in a background thread, then a while loop checking the time. After the time you wish is elapsed, exit the loop, which in turn would stop any child processes as well (the ffplay process). I assum MS - especially now that they have a bash emulator, etc can do this as well.
Am 01.07.2022 um 16:03 schrieb Michael Koch:
Hello,
is it possible to show an image with FFplay for 5 seconds, and then exit? I did try this command in a Windows batch file, but it doesn't stop after 5 seconds. I drag and drop the image on the batch file:
ffplay -autoexit -loop 0 -t 5 %1
A workaround with -loop 125 works. The problem in my first command line seems to be that -loop 0 has a higher priority than -t 5. Shouldn't the -t option have higher priority? Michael
participants (2)
-
Greg Oliver -
Michael Koch