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

Extract needed info from media files, and don't require to enter it. #5

Closed
MechanisM opened this issue Oct 26, 2016 · 7 comments
Closed

Comments

@MechanisM
Copy link

MechanisM commented Oct 26, 2016

It is not so hard to read media info from files like mp4 and mp3, so, why should I enter video title, duration(and calculate seconds)? It is also possible to extract Thumbnail.
eyeD3 or smth like this can be used for reading/writing tags.
Should I use custom media model to make it happen?

@m1kola
Copy link
Contributor

m1kola commented Oct 26, 2016

Pull requests are always welcome ;)

@MechanisM
Copy link
Author

MechanisM commented Oct 26, 2016

Okay, I'll take a look into it. Btw, it would be nice to also have ability to see video thumbnails in admin list(like we can see photo thumbnails) and some default "empty thumbnail" with wagtail logo.

@tomatohater
Copy link

@MechanisM @m1kola

Sniffing mp3/4's is not terribly difficult, but a general purpose solution capable of handling most formats/codecs is much messier and likely requires heavier (and possibly platform specific) libraries like ffmpeg, opencv, mediainfo, etc.

I'm happy to add this functionality and create a PR, but only if there is consensus on supported formats.

@thenewguy
Copy link
Collaborator

This is really outside the scope of wagtailmedia. There are several ways to solve this and no clear "best" due to the many cases to consider. That doesn't mean there shouldn't be an nice package for it, just that it should probably be at a higher level than wagtailmedia.

It is a better fit for a custom media model as of now. We are working to improve the pain points that make this difficult but I am going to close this issue. If there is anything in particular you've run into, please share.

@Scotchester
Copy link
Collaborator

Sorry to resurrect an old closed issue, but I thought it might be better than a new issue for asking this question:

What were the considerations that led to making duration required in the first place? It doesn't seem to be required in practice, at least for our use case of using HTML audio and video elements, as demonstrated in the README.

@thenewguy
Copy link
Collaborator

@Scotchester that decision was before me

@zerolab
Copy link
Member

zerolab commented Aug 13, 2020

By the looks of it, that comes from one of the original commits 4 years ago. Having been recently bitten by it in a demo, happy for a PR that makes that optional

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

No branches or pull requests

6 participants