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

Add kb/s for videos in details #712

Closed
whyboris opened this issue Nov 27, 2021 · 10 comments
Closed

Add kb/s for videos in details #712

whyboris opened this issue Nov 27, 2021 · 10 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@whyboris
Copy link
Owner

Seems easy to add, may be useful to some 🤔

@whyboris whyboris added the good first issue Good for newcomers label Nov 27, 2021
@jozefkopcak
Copy link
Contributor

Hello, could I be assigned to this issue? :)

@jozefkopcak
Copy link
Contributor

Hello Boris, I'm a bit lost in the project. I have inserted "bitrate" to ImageElement interface and have made function getBitrate in main-support.ts. I am struggling with what to do next, I can't find where exactly to use it now to make it show in video details. Could you help me? :)

@whyboris
Copy link
Owner Author

You're doing great! I'm glad you were able to get the bitrate from the FFprobe output 🎉

The last part should be rather straight-forward 🤞
Once the bitrate is part of the ImageElement - you just have to display it:
https://github.com/whyboris/Video-Hub-App/blob/main/src/app/components/meta/meta.component.html#L37
Add a line there and it should show up for every details view 😎

@jozefkopcak
Copy link
Contributor

jozefkopcak commented Dec 13, 2021

image

I think i got it, my formula for calculating bitrate was ((fileSize/1000)/duration). Do u want it like that? Or should i change it to ((fileSize/1024)/duration)? In the end, I rounded it up, so it looks better.

@whyboris
Copy link
Owner Author

Looks great 😍

Rounding up is a great idea. Calculation I'm unsure whether 1000 or 1024 is the right approach - I wonder if Windows does it correctly (when you right-click on video, go to details and see the bitrate). But don't sweat it too much, I could double-check later too 👌

I wonder if it's most-common nowadays to have bitrates of closer to 5,000 - so maybe mb/s rather than kb/s is better? 🤔

@jozefkopcak
Copy link
Contributor

jozefkopcak commented Dec 13, 2021

image

(my windows is in my native language, dont get too scared :D )
So, windows shows in video details, that bitrate is 1205 kbps which converted to kb/s is 150.6, rounded up is 151 kb/s.

image

So that means, my calculations should be okay :D

If you want mb/s, it's not a problem. I know, when you have like 60GB Blurays, it can be a bit too many numbers :D

@jozefkopcak
Copy link
Contributor

image

This is what I got now :) Should I create pull request, so you can take a look? :)

@whyboris
Copy link
Owner Author

Looks beautiful! I bet I'll accept the PR with no requests for modification 😉 🤝 😁

@whyboris
Copy link
Owner Author

Thank you for the PR 🙇 #714 -- looking forward to merging soon 😁

@whyboris
Copy link
Owner Author

Thank you @jozefkopcak for adding this feature to Video Hub App 🎉
I appreciate it 😊

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

No branches or pull requests

2 participants