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

📱 Vertical Snippets & Films #69

Open
phileastv opened this issue Mar 7, 2023 · 18 comments
Open

📱 Vertical Snippets & Films #69

phileastv opened this issue Mar 7, 2023 · 18 comments
Labels
enhancement New feature or request

Comments

@phileastv
Copy link

Hi !

First of all, thanks for your amazing work on One Second Diary.

I was really frustrated by the-equivalent-paid-proprietary-app, which had a lot of bugs, and recently increased prices. So when I saw this open-source alternative, my decision was taken : I have to make the step.

My issue is that I was used to capture all my snippets with vertical videos, it felt just more instinctive to me.

So this is where this issue leads to : I think it would be nice to have the possibility to configure the app so to create vertical (9:16) snippets and films.

What would you think about the fesability and utility of this ? 😌

@KyleKun
Copy link
Owner

KyleKun commented Mar 7, 2023

Hey, thanks for your kind words 😊

It surely is possible, but there are some drawbacks and I wonder if it's really worth the implementation effort because of the following reasons:

  1. No backward compatibility. All the videos recorded/uploaded in portrait are transformed into landscape videos at the moment you save them. That means we don't have a way to restore the original video unless there is some cropping/zooming processing to create a vertical video out of the horizontal one, but I wonder what the quality will look like.

  2. The reason videos are processed at the moment they are saved is to make exporting super fast: is uses ffmpeg concat filter, which requires all videos to have the same parameters (orientation, codec, streams, etc). Since all videos are already processed before the moment of exporting, the Create Movie functionality simply generates a txt file declaring all the selected videos and executes the concatenation command. Not processing vertical videos beforehand means we wouldn't be able to keep this approach, making the movie creation significantly slower. I am against this because the app is intended for long-term: compiling 1000 videos should be done in 2-3min maximum imo, so that's what I strived for with this implementation decision.

So, in order to keep both the "all orientation" export fast and make a new "vertical only" export, we would need to save both the vertical and horizontal version of the video, and add a checkbox Vertical only in the export screen, so we know we should use only the vertical videos. But is it really worth the extra storage usage since it would only benefit mobile visualization? (After all, it would essentially look the same watching on PC).

Maybe there's a better way to handle this that I am not seeing. What are your thoughts on it?

@phileastv
Copy link
Author

Hey @KyleKun 👋

Thanks for your quick and detailed answer about this issue.

I understand now better how the app works. I agree that your approach is the best in the long term use.

It is sure that having the option to create a movie with both vertical and horizontal snippets would require a larger architecture. And I'm not even talking of the lost of quality in a final movie containing both 16:9 and 9:16 snippets in one movie (black bars, lost in quality because of the zooming ...).

But in the end, most of people will only record in vertical, or horizontal. Not both.

So I think having the option to configure the app so it creates vertical snippets & movies only would already be a huge game changer.

Here's how that could work :

1 - When first launching the app, the user would have a "Vertical Mode" checkbook. When ticked, the app would prevent the user that if they let this checkbook on, they could only import and export vertical videos.

2 - When saving snippets, if the "Vertical Mode" is activated, create 9:16 files.

3 - Before executing the concat command, add a verification that all the snippets are in the same format. Just in case.

4 - In the setting, there would be a greyed out "Vertical Mode" checkbox, which let the user know that this format is active. When clicking it, we could add a Alert Dialog which explains that it is not possible to create both vertical and horizontal movies, and suggesting the user to reset the app if they want to change it.

In the future, we could even add the option to switch from vertical mode to horizontal by re-encoding all 9:16 files into 16:9 ones.

I think that would be a good start and would benefit a lot of users who capture all their snippets in this format.

Because I've already been interested in development on fluttter, I'll try to see if I can free up some time in the next few weeks to propose a pull request, if you agree of course.

What would you think of this ? I look forward to hearing your feedback on this principle or if you have better ideas.

@KyleKun
Copy link
Owner

KyleKun commented Mar 18, 2023

Hey @phileastv, thanks for the suggestions! It gave me some insights in how to approach it better.

1 - I think this won't be needed in app first launch, just a checkbox in the settings should suffice.
2 - Agreed.
3 - Won't be needed in this approach I thought.
4 - Agreed.

Basically, I think we can create an "admin profile" called something like default_portrait in the same routines we create the app folders, so this will be taken care automatically.

The Portrait Mode checkbox in the settings, if enabled, will store the videos inside that dedicated folder. We can do the check for orientation on the save function, preventing landscape uploads and informing that if wanted, it should be done outside Portrait Mode (using default folder for storing the videos). This way we ensure only portrait videos in this mode, and keep the default method (mixed orientation) working as it is now. Movie creation will still be fast since we know all videos are in portrait.

The implementation effort will be:

  • Create the specific editing for portrait videos (all the ffmpeg stuff, like position of date and locale that will change, no resizing is needed, etc);
  • Also allow Profiles inside the Portrait Mode (separated from the Profiles we have now);
  • Perform the extra checks before saving to ensure it's a portrait video;
  • Adapt the movie creation routine to use that folder if Portrait Mode is enabled.

What do you think of it?

Because I've already been interested in development on fluttter, I'll try to see if I can free up some time in the next few weeks to propose a pull request, if you agree of course.

And for sure, it'll be a pleasure to review and help out, feel free to do so 😊

@KyleKun KyleKun added the enhancement New feature or request label Mar 18, 2023
@phileastv
Copy link
Author

Hi !

Thanks a lot for your message.

I think were going somewhere with this ! Having the option to create Vertical profies, separated from horizontal ones is a perfect idea to keep things organised.

I started cloning the project and tried to create the vertical profiles page, but I had a bit of trouble figuring out how to organize it so that it would persist in the application's memory. Unfortunately I think this is a bit beyond my development skills, (although it probably shouldn't be that complicated!).

@KyleKun
Copy link
Owner

KyleKun commented Apr 18, 2023

Hi !

Thanks a lot for your message.

I think were going somewhere with this ! Having the option to create Vertical profies, separated from horizontal ones is a perfect idea to keep things organised.

I started cloning the project and tried to create the vertical profiles page, but I had a bit of trouble figuring out how to organize it so that it would persist in the application's memory. Unfortunately I think this is a bit beyond my development skills, (although it probably shouldn't be that complicated!).

Tbh the code is not that much organized so don't worry, even I get lost sometimes 😅
The video is saved "automatically" when we execute the ffmpeg command passing the storage path, you can start understanding by taking a look here.

@EmileRolley
Copy link

Hi, where are you with this feature @phileastv? I just discovered the project (thanks @KyleKun <3) and I'm really looking into having a way to compile the videos into a vertical mode!

@phileastv
Copy link
Author

Hey @EmileRolley,

I've been trying to make progress on this, but it requires creating a separate type of profile only for vertical snippets, and it's a bit beyond my very limited dev skills. So I put it aside as I don't have much time to devote to it.

@Hkllopp
Copy link

Hkllopp commented Sep 12, 2023

Hey !
I also come from 1SE app and found this amazing project that i want to use and support !
Unfortunately, I also take all of my snippets vertically so I won't be able to use this app until this feature is included.
I also won't be able to help coding it because I don't know android at all but I had an implementation idea in order to avoid the "vertical configuration checkbox".

Isn't it possible to store every video in horizontal format (exactly the same as now), but when you're creating your daily snippet, you can choose to rotate the horizontal snippet to make it vertical (or the other way around) ? It would be stored exactly the same as a "native" horizontal one.
Unfortunately, it adds two more (light) functions : being able to render the date and subtitles vertically when rotating a vertical (maybe ask the user beforehand) and then being able to rotate the full movie during the rendering.
I know this is not an optimal way of implementing it, but it seems to be a nice (and light) workaround. It also let the user take both vertical and horizontal snippets (even if I think nobody does that).
What do you think ?

@KyleKun
Copy link
Owner

KyleKun commented Sep 14, 2023

Hey @Hkllopp , thanks!
I gave it some more thought and agree it's better to store both versions of the videos by default after all. Will very likely implement this until the end of the year, as it's been requested by many people.

@Hkllopp
Copy link

Hkllopp commented Nov 20, 2023

Hey !
It's really cool that contributors are coming to work on the project right now. It gets bigger and bigger !
Do you think you'll be able to implement this feature for the end of the year ? Not wanting to pressure you in any way, I just would like to know if there are any updates on this :)

@KyleKun
Copy link
Owner

KyleKun commented Nov 20, 2023

Hey !
It's really cool that contributors are coming to work on the project right now. It gets bigger and bigger !
Do you think you'll be able to implement this feature for the end of the year ? Not wanting to pressure you in any way, I just would like to know if there are any updates on this :)

Hey, yeah, I'm working on some other projects this month but this feature is my top 1 priority for December.

@Hkllopp
Copy link

Hkllopp commented Nov 20, 2023

So cool, thanks !

@phileastv
Copy link
Author

Hi @KyleKun !

Have you had the time to work on this issue ? Because I really want to enter my 2023 vertical snippets for 2024, I gave a second shot at trying to develop this feature by myself and made some progress.

For the moment, I added the option to create "Vertical Profiles" in the "Profiles" pages. When you create a profile, there is a toggle to enable "Vertical Mode" on this profile. If you do so, the folder will save as yourprofilename_vertical on the storage. Every profile retrieved with this name will have the an isVertical value applied to it.

I am now trying to put this logic on the snippet page and save the snippets as 1080x1920 files when you have a Vertical Profile selected.

Would you be interrested in me making a pull request with thoses changes ? I'm not a professional developer so my code must not be perfect, but if it can save you time implementing this feature that would be great !

@KyleKun
Copy link
Owner

KyleKun commented Dec 15, 2023

Hi @KyleKun !

Have you had the time to work on this issue ? Because I really want to enter my 2023 vertical snippets for 2024, I gave a second shot at trying to develop this feature by myself and made some progress.

For the moment, I added the option to create "Vertical Profiles" in the "Profiles" pages. When you create a profile, there is a toggle to enable "Vertical Mode" on this profile. If you do so, the folder will save as yourprofilename_vertical on the storage. Every profile retrieved with this name will have the an isVertical value applied to it.

I am now trying to put this logic on the snippet page and save the snippets as 1080x1920 files when you have a Vertical Profile selected.

Would you be interrested in me making a pull request with thoses changes ? I'm not a professional developer so my code must not be perfect, but if it can save you time implementing this feature that would be great !

Hey, that's nice to hear! You can open the PR and I'll expand on it this weekend, or at least use it as a reference. And no worries, the feature will be ready before 2024 :)

@phileastv
Copy link
Author

Great ! I just added my pull request here. Maybe I will have the time to work more on it next week #113

@KyleKun
Copy link
Owner

KyleKun commented Dec 31, 2023

Sorry guys for it not being exactly before 2024, but I tested the PR thoroughly and am making some changes, so probably tomorrow I'll be releasing the apk here (thanks a lot @phileastv !). Just keep on recording vertical videos and you will be able to add them through the calendar after Playstore update is available. Happy 2024!!

@Hkllopp
Copy link

Hkllopp commented Jan 1, 2024

Don't worry :)
Happy new year 🥳

@Alarty
Copy link

Alarty commented Feb 10, 2024

Hi guys,
I really love this app and was stunned to see that it is open-source.
I'm glad to see this feature is prioritized and tackled.
I'm not a good programmer, but I could be a beta tester if you need !

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

No branches or pull requests

5 participants