-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix playing back audio files & reading music metadata #1240
Conversation
Extended album information with release lebel if available. Make use of music-metadata module (musicmetadata appears to be no longer maintained)
Updated to music-metadata in order to recognize MIME-type: audio/x-flac
Would be great if one can review this proposal. |
Bug was caused by an interoperability between then-read-stream and readable-stream.
…ing. Will allow slightly faster reading of music-metadata.
Playing Opus audio and demonstrating visualization of its metadata: |
Adjust the label element width to 120px to be able to fit in the text: 'Comments'. Adjust the font-weight of the comments & format value to 'normal'.
@codealchemist: can you please review my commits? |
Recreated a torrent using the same test file, but stripped of all metadata: |
Just to be on the same page, it is not something new I am introducing here. Although I did add additional fields in the player page, I believe it fixes and improves existing functionality. As far as I have seen nothing was unit tested yet. Given this context, I think it is a bit odd to require unit test prior to merge, but I do fully understand it is desired The music-metadata is heavily unit tested, also the ogg file which was causing a problems has been added as a unit test. But what you are looking for is probably some extension of the I don't mind to look into it, problem is that I did not manage get the tests running. |
@DiegoRBaquero: I am one step further with the test-integration. At least I can run the |
@DiegoRBaquero : I noticed βTorrent can you use a boost as well in audio playback functionality 😉 |
@codealchemist can you please generate the darwin screenshots for me. I tried to generate the OSX screenshots for the integration tests on VIrtualBox. I did not succeed. I set the resolution to 2304x1440, which I think is equivalent to the 2016 12" Macbook. I guess there is some (retina) scaling factor into play which causes my screen dumps from OSX to be to small. I can add the transparency parts; if you just push the failed images, that would be great. |
Works for me now. @Borewit What would you want to include in BTorrent? The streaming is pretty much restricted to the native browser functionality. |
@DiegoRBaquero, in a couple of days I will open an issue on your repo with some ideas. |
Also, related to unfinished MP3 files: when the file finishes downloading it's not refreshing its metadata, which is available if I go back to the list and play it again. |
Just tested reading that incomplete MP3 file with
|
@Borewit, BTW, this is really cool: Nice integration and great coverage ;) |
This is looking really promising. |
In some cases this is required to calculate the duration.
@feross: Can you please merge this one? |
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.
There are still some cases where a blank screen is shown for a period of time until metadata is successfully downloaded, but it's not that bad and I think I can easily add a fix to display the file name while metadata is being downloaded.
// otherwise stream | ||
: mm.parseStream(file.createReadStream(), file.name, options) | ||
|
||
onMetaData |
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.
For MP3 files it seems like this promise is not resolved until the whole file is downloaded.
But the ID3 tags are already available.
Forcing onMetaData
to be mm.parseFile(path.join(torrent.path, file.path), options)
properly loads metadata on tested files.
We might need to check how ID3 tags are being read from the file.
I think we could load them before the full file is downloaded, at least on same cases.
Also, we might want to add a loading indication if we need to wait for the whole file to be downloaded to update the metadata.
Probable we can show the file name and an indication that metadata is being loading.
Cheers!
Fantastic news, finally merged yeah!! Thank you so much @codealchemist. |
@feross we need a new release |
I think we should wait until #1361 gets reviewed and merged before a new release. Thanks @DiegoRBaquero ! |
Will wait until #1361 is merged before doing a new release. Does someone want to take a stab at PR'ing the changelog for the next version? |
I'll take the stab at it. |
Replaced musicmetadata with music-metadata module. The original one appears to be no longer maintained.
Fixes bug #1320, playing back audio files broken: caused by stream incompatibility between musicmetadata & readable-stream.
Should be faster, more stable is able to read more metadata and format information.
Supports additional audio formats and metadata tag headers.
Added audio format & some release information to the lay screen.
You could also use the library to retrieve album art from the audio files.