Coder Social home page Coder Social logo

Comments (5)

transitive-bullshit avatar transitive-bullshit commented on June 3, 2024

The concat is working as intended given your description.

Transitions mean that they take up time in the output video equal to half of both of the input videos they're transitioning between, so they require the output video to be less time than the sum of the input videos.

Let me know if this doesn't make sense -- it unfortunately seems to be a common question, but there's really no other way it could work since portions of the output video combine parts of multiple input videos.

from ffmpeg-gl-transition.

 avatar commented on June 3, 2024

@transitive-bullshit Look at any video editor; transitions either add to the duration of the video or happen inside the end of 'Clip A' and start of 'Clip B', not affecting the duration.

I've never seen behavior like this package before. I thought the point of it was to avoid filter graph monkey business when trying to do something simple. Look at concat.sh, man.

./ffmpeg \
  -i media/0.mp4 \
  -i media/1.mp4 \
  -i media/2.mp4 \
  -filter_complex " \
    [0:v]split[v000][v010]; \
    [1:v]split[v100][v110]; \
    [2:v]split[v200][v210]; \
    [v000]trim=0:3[v001]; \
    [v010]trim=3:4[v011t]; \
    [v011t]setpts=PTS-STARTPTS[v011]; \
    [v100]trim=0:3[v101]; \
    [v110]trim=3:4[v111t]; \
    [v111t]setpts=PTS-STARTPTS[v111]; \
    [v200]trim=0:3[v201]; \
    [v210]trim=3:4[v211t]; \
    [v211t]setpts=PTS-STARTPTS[v211]; \
    [v011][v101]gltransition=duration=1:source=./crosswarp.glsl[vt0]; \
    [v111][v201]gltransition=duration=1[vt1]; \
    [v001][vt0][vt1][v211]concat=n=4[outv]" \
  -map "[outv]" \
  -c:v libx264 -profile:v baseline -preset slow -movflags faststart -pix_fmt yuv420p \
  -y out.mp4

This is what was expected when installing:

./ffmpeg \
  -i media/0.mp4 \
  -i media/1.mp4 \
  -i media/2.mp4 \
  -filter_complex " \
   [0:v][1:v]gltransition=duration=1[vt1]; \
   [vt1][2:v]gltransition=duration=1[outv]; \
  -map "[outv]" \
  -c:v libx264 -profile:v baseline -preset slow -movflags faststart -pix_fmt yuv420p \
  -y out.mp4

from ffmpeg-gl-transition.

 avatar commented on June 3, 2024

@transitive-bullshit Actually, this demo does it correctly (12 sec, not 10): https://github.com/transitive-bullshit/ffmpeg-concat/blob/master/media/example.mp4

If that package let me apply ffmpeg filters on the input videos and specify custom inputs instead of just files, I'd use it in a heartbeat, it would make things 100x simpler.

from ffmpeg-gl-transition.

 avatar commented on June 3, 2024

I am strapped for time so I'll be using ffmpeg-concat. Thanks for making these @transitive-bullshit , please send me an e-mail address so I can paypal.

from ffmpeg-gl-transition.

transitive-bullshit avatar transitive-bullshit commented on June 3, 2024

@swlemp I'm glad that ffmpeg-concat worked for your use case.

Feel free to send any donations to [email protected] -- it's definitely much appreciated 🙏

Thanks!

from ffmpeg-gl-transition.

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.