-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENHANCEMENT] Add music to generated videos #3547
Comments
@flewid, you should be able to add that line to the KEOGRAM_EXTRA_PARAMETERS setting so you don't have to change the If I understand this correctly, the user needs to provide 3 pieces of info:
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. |
@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
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! |
@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... Do you think that would work? |
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? |
I thought it'd be cool to have music over the generated videos to make them a bit more fun to watch, so I played around with this and came up with the following method.
I'm sure this isn't right, so I did not create a PR or anything, I think we'd in reality want something like this;
Anyway, here's what's working for me;
First, copy your mp3 to your allsky box as 'music.mp3' then, ssh to your allsky box and do the following
then edit the timelapse script
nano ~/allsky/scripts/timelapse.sh
at line 249, which looks like
-i "${SEQUENCE_DIR}/%04d.${EXTENSION}" \
add this following it on the next line
-i "${ALLSKY_HOME}/music/music.mp3" -af "afade=in:st=0:d=5,afade=out:st=57:d=5" -t 63 \
now just wait until the next morning and check out your video, with sound!
What this does is;
The text was updated successfully, but these errors were encountered: