Coder Social home page Coder Social logo

Comments (4)

EricClaeys avatar EricClaeys commented on June 3, 2024

@flewid, you should be able to add that line to the KEOGRAM_EXTRA_PARAMETERS setting so you don't have to change the timelapse.sh file.

If I understand this correctly, the user needs to provide 3 pieces of info:

  1. Name of music file.
  2. Length of fade in time in seconds or 0 to have no fade in. This number must be less than the length of the video and ideally less than half the video length.
  3. Length of fade out. Same comments as above.

The 57 and 63 in your example could be automatically determined based on the length of the video. Do you know what happens if the audio is shorter than the video? Does it loop?

We probably won't add this to the WebUI but could add it to the documentation, possibly as a FAQ item, and include the code to determine the video length.

Do you know how to add audio AFTER the video is created? If that's possible then a module could be written to do that. We are eventually going to turn all the post capture work (e.g., stretching, cropping, timelapse, keogram, etc into modules.

from allsky.

flewid avatar flewid commented on June 3, 2024

@EricClaeys Thanks for checking it out!

I do not think adding to the keogram would work? I experimented a bunch and it seems the 'order matters' in terms of the ffmpeg command. The command must be BEFORE the video generation stuff on that line in timelapse.sh. But I could be wrong?

For your questions

  1. yes this sounds right, however, I now have thought about this some more, and it might be cool to pick from a 'pool' of mp3's so each video gets a random song attached to it, if the directory only has one mp3, they all get the same, if it has 5 then it randomly chooses one to use.

  2. yes, this sounds right to me. I think most people would want music the whole way through, but, you're right, some people might want to start it 'at night time only' or even have different music for day and night (but now i'm just getting crazy).

  3. correct

  4. if the audio is shorter than the video, there is a looping parameter for ffmpeg, but the way this is setup it will just stop. I have not tried the looping as the MP3's i'm using are minutes long.

Makes sense about a FAQ entry for sure!

Yes, you can add audio AFTER the video's been created, however, this would be processing twice so I figured this was kind of redundant, and also causes more strain on the box but I see where you're going with the module inclusion for sure.

I'm not much of a programmer, but I can help with whatever's needed on this for testing etc.

Thanks!

from allsky.

EricClaeys avatar EricClaeys commented on June 3, 2024

@flewid, you are probably right that the music parameters need to go earlier on the command line than ${TIMELAPSE_EXTRA_PARAMETERS} which is at the end.

Thinking out loud...
If there was a new setting for Music Parameters Script that pointed to a user-supplied script that output the parameters, that script could be run prior to ffmpeg, and its output put on the ffmpeg command line in the correct place. Some information would be passed to the script such as the length of the video in seconds and whether or not it was a mini or daily timelapse.
The script could output the same parameters every time, or use different music files everytime, or anything the user wanted.

Do you think that would work?

from allsky.

flewid avatar flewid commented on June 3, 2024

Yep, I tried various spots in the command and definitely has to be either the first command, or the second position where I have it.

I like that idea for a checkbox + form field for 'user script' for this - that could be used for many other things as well too eh?

from allsky.

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.