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 special case for mp3 filelike object #2477

Merged
merged 1 commit into from
Jun 14, 2022
Merged

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented Jun 13, 2022

Loading and querying file-like object is not possible to use the fallback
mechanism introduced in #2419 because file-like objects are not seekable.

This commit add special case handling to mp3.

For filelike object mp3 input, it was required to pass format="mp3"
because libsox did not auto detect the format.

With the transition of mp3 handling from libsox to ffmpeg, the logic
is to let the ffmpeg handle it without waiting for libsox to fail,
if the format="mp3"

@facebook-github-bot
Copy link
Contributor

@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@mthrok mthrok marked this pull request as ready for review June 14, 2022 00:38
Loading and querying file-like object is not possible to use the fallback
mechanism introduced in pytorch#2419 because file-like objects are not seekable.

This commit add special case handling to mp3.

For filelike object mp3 input, it was required to pass `format="mp3"`
because libsox did not auto detect the format.

With the transition of mp3 handling from libsox to ffmpeg, the logic
is to let the ffmpeg handle it without waiting for libsox to fail,
if the `format="mp3"`
@mthrok mthrok changed the base branch from main to release/0.12 June 14, 2022 01:27
@mthrok
Copy link
Collaborator Author

mthrok commented Jun 14, 2022

Landing this directly on release/0.12 as fbcode is having issue S275706 and won't let land on master. Will follow-up with main branch.

@mthrok mthrok merged commit fc73770 into pytorch:release/0.12 Jun 14, 2022
@mthrok mthrok deleted the mp3 branch June 14, 2022 03:30
facebook-github-bot pushed a commit that referenced this pull request Jun 16, 2022
Summary:
Loading and querying file-like object is not possible to use the fallback
mechanism introduced in #2419 because file-like objects are not seekable.

This commit add special case handling to mp3.

For filelike object mp3 input, it was required to pass `format="mp3"`
because libsox did not auto detect the format.

With the transition of mp3 handling from libsox to ffmpeg, the logic
is to let the ffmpeg handle it without waiting for libsox to fail,
if the `format="mp3"`

Note: This is back port of #2477.

Pull Request resolved: #2478

Reviewed By: carolineechen

Differential Revision: D37177123

Pulled By: mthrok

fbshipit-source-id: 997eead01c0ad1f04ffa0daa1039302a75f62b63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants