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

store mp3 preview files (fixes #66) #73

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

store mp3 preview files (fixes #66) #73

wants to merge 4 commits into from

Conversation

ngokevin
Copy link
Contributor

@ngokevin ngokevin commented Jan 30, 2019

For reliable cross-browser audio previews and to support BeatSaver Viewer on platforms such as Safari/iOS. Went with MP3 over AAC due to Firefox support.

I guess optimally, these things would be done using a task queue, but I think the upload frequency is enough to do it on demand.

Using an exec / shell call-out vs php-ffmpeg because want to do it in background to not hold up the HTTP response.

@ngokevin
Copy link
Contributor Author

ngokevin commented Feb 1, 2019

Is anyone open to check this out? Much appreciated!

Copy link
Collaborator

@Assistant Assistant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to use a dynamic name that matches the current song name rather than a static preview.mp3?
i.e., songName.ogg -> songName.mp3.
Ideally iterating over each difficulty and performing the operation on each if that same ogg file hasn't been converted already.

@ngokevin
Copy link
Contributor Author

ngokevin commented Feb 4, 2019

Done! I store it as their original filenames and handles per difficulty.

Copy link
Collaborator

@Assistant Assistant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lolPants could you take a look at it as well?

@luludotdev luludotdev self-requested a review February 4, 2019 17:04
@luludotdev
Copy link
Collaborator

I'll check it out later today

@ngokevin
Copy link
Contributor Author

ngokevin commented Feb 5, 2019

@Assistant Also, are you handling the script for retroactive conversions?

@Assistant
Copy link
Collaborator

I can handle it, however I can't promise I'll be fast since I have a lot on my plate currently. If you want to help with it, that'd be welcome too.

@ngokevin
Copy link
Contributor Author

ngokevin commented Feb 5, 2019

Sure. What kind of environment is it? Do I just need to write a script that manually runs in the storage directory?

@luludotdev luludotdev changed the base branch from master to develop February 5, 2019 22:26
@ngokevin
Copy link
Contributor Author

ngokevin commented Feb 6, 2019

So good to go? I can write like a Node script that does the conversions in a queue if that sounds good.

@ngokevin
Copy link
Contributor Author

Sorry to bump this (also thanks for testing the spaces in paths!). Anything else to do after the PR gets approved?

@sinfuljosh
Copy link

Since this is still a thing.... has anyone thought about using https://github.com/brion/ogv.js/

It’s the same setup Wikipedia uses to play ogg files one iOS

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

Successfully merging this pull request may close these issues.

4 participants