Reputation: 45
Is there a way - in a one liner - where I do not have to use ffmpeg to calculate the duration of the whole video before i render ..
I would like something like:
ffmpeg -i ny_video_no_logo.mp4 -i ~/Pictures/home_logo_roed_new.png -filter_complex "[0:v][1:v]overlay=main_w-overlay_w-10:main_h-overlay_h-10:enable='between(t,5.50,FULl_LENGTH - 10)'" -codec:a copy out.mp4
I there a simple way like the "main_w" to get the video length inserted - I am using a non existing variable FULL_LENGTH
in the above?
Or do i have to make a ffmpeg -i
and extract the time from this?
Upvotes: 0
Views: 94
Reputation: 38652
No, that's not possible. You have to get the duration first, and then calculate it yourself.
The issue is that ffmpeg would first have to read the file to get the metadata, then read it a gain. This is typically not an issue where the duration is known from the container context – but I can see how from a software engineering standpoint it might require a bit of rewriting.
Relevant tickets (there are probably more):
Upvotes: 2