Add an option to create a new MediaFoundationReader from stream
See original GitHub issueI’m using your amazing library in UWP and I would love if the new MediaFoundationReader()
constructor would accept also preferably a stream (or bytes or buffer) instead of a file path only, in this way I’ll be able to use it directly with no need to copy the file to an app folder or ask for a broader filesystem permission, hopefully it’s possible.
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
NAudio proper way to stream MediaFoundationReader
I've tried to see if there was any way to determine if there was data enough in the buffer and avoid reading the...
Read more >Mediafoundationreader stream file by url with naudio ...
successfully stream file from URL but now i want calculate total time of file just like in media player . and when the...
Read more >Sound Code: 2012
MediaFoundationReader this implements WaveStream and basically allows you to play anything that Media Foundation can play. This means MP3, AAC, ...
Read more >How to Encode MP3s with NAudio MediaFoundationEncoder
The first step is to make sure Media Foundation is initialised. This requires a call to MediaFoundation.Startup() . You only need to do...
Read more >Create WAV stream in memory [16503] - NAudio
using (MediaFoundationReader reader = new MediaFoundationReader(audioFileURL)) ... where I create stream with WAV header and then add the data to the stream ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Not until I searched the reference of MFCreateMFByteStreamOnStreamEx did I realize there’s already something called StreamMediaFoundationReader… So it’s just unnecessary to write our own wrappers…
In MediaFoundationReader.cs the original CreateReader function uses MFCreateSourceReaderFromURL to read files. And MFCreateSourceReaderFromByteStream is the stream version. Here’s the code I used:
I don’t know how to calculate the BPM. But maybe you can check this out https://github.com/stengerh/foo_bpm