Code Monkey home page Code Monkey logo

Comments (6)

luthfiampas avatar luthfiampas commented on June 6, 2024

I'm not sure whether or not the problem occurs while calculating frame count. But I can confirm that CALCULATED_FRAME_COUNT variable is always empty/null.

from ffmpeg-video-slideshow-scripts.

tanersener avatar tanersener commented on June 6, 2024

These scripts are bash scripts. Some of the functions used inside them are not available in other terminals. How do you run them under Windows, do you have a bash terminal?

This is the error. end_frame shouldn't be -30.

'trim' with args 'start_frame=0:end_frame=-30'

from ffmpeg-video-slideshow-scripts.

luthfiampas avatar luthfiampas commented on June 6, 2024

I'm using git bash window.

from ffmpeg-video-slideshow-scripts.

tanersener avatar tanersener commented on June 6, 2024

Do you have another bash emulator in your machine?

It looks like the bash implementation in git for windows does not support some of the expressions used in the video scrips. The problem is, on Windows, there does not exist a standard bash terminal. There are different implementations and it is hard to test & support all of them. And, I don't want to modify the scripts to support a specific Windows bash implementation.

So, I'll suggest using another bash terminal if you can. If you don't want to try or it does not help, I'll refund the amount to your account.

from ffmpeg-video-slideshow-scripts.

luthfiampas avatar luthfiampas commented on June 6, 2024

No problem, I solved the issue by utilizing ffprobe to calculate number of frames. I don't know if this is the correct approach. Grabbing number of frames from .mf.counter file just doesn't works for me.

# TODO
# calculated frames count/(original FPS/desired fps)
CALCULATED_FRAME_COUNT=`ffprobe -v error -count_frames -select_streams v:0 -show_entries stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 ${FILE}`

from ffmpeg-video-slideshow-scripts.

tanersener avatar tanersener commented on June 6, 2024

Well, not exactly. Each input video has a frame rate (A), and the scripts have a target frame rate (B). CALCULATED_FRAME_COUNT is used to calculate B.

Unfortunately your workaround calculates A using ffprobe and assigns it to B. If A and B is the same for your files then you won't have any issues. But if they're not then your slideshow may not run smoothly. You may see dropped frames during transitions.

I'll suggest using the original approach by updating that section about /tmp/.mf.counter and replacing it with a Windows compatible path, something like c:\temp\mf.counter.

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.