Skip to content
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

Expose latest generated timelapse as "latest.mp4" #1366

Open
henrikeri opened this issue Jun 27, 2024 · 13 comments
Open

Expose latest generated timelapse as "latest.mp4" #1366

henrikeri opened this issue Jun 27, 2024 · 13 comments

Comments

@henrikeri
Copy link

Hi Aaron,

It is possible relatively easily to expose the latest timelapse as "latest.mp4" similar to the latest photo? I expose the photo on a separate web page and would like to add the video as well if there is an easy way for indi-allsky to put it as the name above in a folder. I use this to show the data to non-tech-savvy users whom one could not expect to be able to open it from the timelapse menu after entering user names and passwords :)

Best regards,
Henrik

@aaronwmorris
Copy link
Owner

Merged #1368 . This uses the "watch timelapse" view to show the latest timelapse if no ID is specified:

https://hostname/indi-allsky/watch_timelapse

@henrikeri
Copy link
Author

henrikeri commented Jun 28, 2024

Thanks Aaron this is awesome
Is there a meaningful way to access this server side? I am exposing this on a separate webpage to my non-tech users.

I had a look at the folder structure and there does not seem to be an easy way to implement it wihout implementing server side parsing of the folders.

@aaronwmorris
Copy link
Owner

Querying the database is how that view does it. What programming language would you want to do this in?

@henrikeri
Copy link
Author

@aaronwmorris I hacked together a bash script that finds the last changed folder and file and combines it to one with ffmpeg. Works for now so I'll close this.

@aaronwmorris
Copy link
Owner

Let me know if you want me to write something in python, it should be pretty simple

@henrikeri
Copy link
Author

@aaronwmorris any chance we could add an option to generate a timelapse of the last 24h and store it as yesterday.mp4? The bash script seems to be misbehaving a bit :-/

@henrikeri henrikeri reopened this Aug 19, 2024
@aaronwmorris
Copy link
Owner

Would you want midnight-to-midnight or noon-to-noon?

@henrikeri
Copy link
Author

I would prefer noon-to-noon, but why not let the user set the time from a dropdown? Then it will not have to be picked up again if someone wants midnight-to-midnight or similar

@aaronwmorris
Copy link
Owner

aaronwmorris commented Aug 20, 2024

I just developed the mini-timelapse generator that does just that. I also just submitted a change to increase the available window for the mini-timelapse generator.

If you update to the latest code, find the midpoint for the video you want to create (say like at midnight) and select a window of 12 hours before and 12 hours after, set a FPS, name, and generate.

@henrikeri
Copy link
Author

I cannot seem to find where you configure the mini panorama, I only find where you view them. Is it not yet in the main branch? Will it be able to run automatically in the background?

@aaronwmorris
Copy link
Owner

Sorry, I meant to add this. It is in the Image viewer. The original intent of the Mini-Timelapse generator is picking an event you want to showcase, generating a video with frames before and after the event. However, with the extended time options, you could pick midnight as the image and add 12-hours before and after the event for a full 24-hour timelapse.

@henrikeri
Copy link
Author

henrikeri commented Aug 22, 2024

Tested it now, it creates a time lapse that works somewhat, it seems when the duration in any direction goes into the next or previous day, it cuts off at 2359 (noon -> noon)

Also is it a large work/any way to run this on a schedule to generate daily with a known file name? I use this outside of indi-allsky. I am ok triggering it from the terminal if reqd.

@aaronwmorris
Copy link
Owner

There's nothing in the code that would limit the time to before or after noon.

Ultimately, it would probably be easier to write an external script that generates a timelapse. The trouble is dealing with timestamps on the command line. Let me sit with this for a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants