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
Generate Audio Derivatives from WAV Files #2035
Conversation
aafe785
to
9939804
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking about the the audio files we're bringing in via bags, which have vendor-created mp3s. They have files with the pcdm use codes for preservation master
and intermediate
. This derivative service is running on original file
. So are we just relying on this convention to keep from creating derivatives on those objects? It seems not well documented at the least.
I'm not entirely sure we didn't define original_file
to return preservation_master
, actually. So that's something to check. @jrgriffiniii ?
|
||
def create_derivatives | ||
progress = ActiveEncode::Base.create(file_object.disk_path, outputs: ffmpeg_outputs) | ||
sleep(1 / 1000 * 50) until progress.reload.completed? || progress.failed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to poll at a sub-millisecond frequency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 50ms. Sleep is in seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I was assuming the *
had precedence over /
— could this be 50 / 1000
for readability?
29637d7
to
b9efb52
Compare
@HackMasterA |
I guess for now we should document? It seemed like the plan was to bring those resources over to scanned resources. I'm not sure what our long-term plan should be. It seems like something that should be more explicit than it is / will be. I'll try to think about it more. |
@HackMasterA Alright, added a few comments at the top. |
nice warnings! 😄 |
let(:storage_adapter) { Valkyrie.config.storage_adapter } | ||
let(:persister) { adapter.persister } | ||
let(:query_service) { adapter.query_service } | ||
let(:file) { fixture_file_upload("files/audio_file.wav", "audio/x-wav") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tpendragon how did you get this mime type to work without using run_real_characterization: true
?
No description provided.