Question - Adding Media Types? #80
-
|
I want to play m4b files (audiobooks). These are just mp4's with the m4b extension. Using MfPlayer I if I open a .m4b causes an error with the message 'An error has occurred (hr: -1072875836)' Of course, if I rename the file to an a .mp4 everything works a treat (but I don't wanna re-name the file every time someone opens it of course) So - I basically wanna add a media-type audio/mp4 for m4b (or force file.xyz to use audio/mp4 for example) Possibly I need to use a different example / component to handle this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi, This error is generated by Media Foundation:
Possible solution: By default .m4b is not supported by Media Foundation. See here Regards Tony. |
Beta Was this translation helpful? Give feedback.
-
|
Well, given that as a starting point I got a little further. Played with registry and copied some keys from .m4a to .m4b which now means that Windows Media Player can play an m4b. However, as I intend to add a lot of metadata to the m4b anyway I'm going to need a working copy whatever happens so I guess there's no harm in making my working copy a m4a ... |
Beta Was this translation helpful? Give feedback.
Hi,
This error is generated by Media Foundation:
MF_E_UNSUPPORTED_BYTESTREAM_TYPE mferror.h
Possible solution:
What you can try is to add code in your application that renames the file to yourfile.mp4 before opening.
Then load the file and when done rename it back to youfile.m4b.
By default .m4b is not supported by Media Foundation. See here
Regards Tony.