Coder Social home page Coder Social logo

Comments (8)

tanersener avatar tanersener commented on June 12, 2024

There is a TRANSITION_DURATION variable in SCRIPT OPTIONS to control zoompan duration. Did you try that?

# SCRIPT OPTIONS - CAN BE MODIFIED
WIDTH=1280
HEIGHT=720
FPS=30
TRANSITION_DURATION=1
PHOTO_DURATION=2

from ffmpeg-video-slideshow-scripts.

kulykaldr avatar kulykaldr commented on June 12, 2024

maybe I asked the wrong question
but I need to set animation zoom for all slide duration what I set
If I set duration for slide for example 50sec, animate zoom duration only just about 20sec and then freeze
Thanks!

from ffmpeg-video-slideshow-scripts.

tanersener avatar tanersener commented on June 12, 2024

If you set TRANSITION_DURATION=20 and PHOTO_DURATION=30 then each slide will be shown for 50 seconds; it will zoom for 20 seconds and then freeze for 30 seconds. Isn't that what you asked for?

from ffmpeg-video-slideshow-scripts.

kulykaldr avatar kulykaldr commented on June 12, 2024

Isn't that what you asked for?
If I set transition duration = 20 and photo duration = 20
ffmpeg returns
Buffer queue overflow, dropping.78.2kbits/s speed=0.13x
and then
Error while filtering: Cannot allocate memoryme=00:00:19.66 bitrate=8637.4kbits/s speed=0.121x Failed to inject frame into filter network: Cannot allocate memory Error while processing the decoded data for stream #0:0
What I'm doing wrong?

from ffmpeg-video-slideshow-scripts.

tanersener avatar tanersener commented on June 12, 2024

Let me correct myself first. zoompan transitions use the following scene arrangement. In this flow, zoompan filter is applied to all three phases. This means that photo is always zoomed. So basically it is not possible to freeze photo at any point by changing variables under SCRIPT OPTIONS.

Scene Arrangement (for each photo):
- fade in photo for `TRANSITION_DURATION` seconds
- show photo for `PHOTO_DURATION` seconds
- fade out photo for for `TRANSITION_DURATION` seconds

Step #5 in the scripts must be updated to achieve that. It is possible to change the order of stages and apply zoom only during fade in but it is not easy to keep zoom ratio for the other stages. You can replace the last line with the following one and see what I mean.

FULL_SCRIPT+="[stream$((c+1))fadein]scale=${WIDTH}*5:-1,zoompan=z='min(pzoom+0.002,2)':d=1:${POSITION_FORMULA}:s=${WIDTH}x${HEIGHT}[stream$((c+1))fadeinandzoom];[stream$((c+1))fadeinandzoom][stream$((c+1))][stream$((c+1))fadeout]concat=n=3:v=1:a=0[stream$((c+1))panning];"

Error while filtering: Cannot allocate memoryme=00:00:19.66 bitrate=8637.4kbits/s speed=0.121x Failed to inject frame into filter network: Cannot allocate memory Error while processing the decoded data for stream #0:0
What I'm doing wrong?

zoompan transitions consume too much memory, if enough memory is not found, scripts fail with this error. You can try decreasing width, height and fps values.

from ffmpeg-video-slideshow-scripts.

tanersener avatar tanersener commented on June 12, 2024

I created a second zoompan transition called Zoom & Pan with Fade In/Out Transition #2 today. It is very close to your request; it applies zoompan filter only during fade in stage. You can try it if you didn't find a solution yet.

from ffmpeg-video-slideshow-scripts.

tanersener avatar tanersener commented on June 12, 2024

OK then.

from ffmpeg-video-slideshow-scripts.

kulykaldr avatar kulykaldr commented on June 12, 2024

Thanks, I'll try it.
I didn't see your answer. Sorry
You helped so much!

from ffmpeg-video-slideshow-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.