Closed Bug 932516 Opened 11 years ago Closed 6 years ago

Implement MP3 support in Media Source Extensions API

Categories

(Core :: Audio/Video: Playback, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1169485

People

(Reporter: yury, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Whiteboard: [Shumway:P1])

We need playback of the incrementally loading sound from swf file or network 
(currently we are planing to support only MP3 data). I opened discussion about adding progressive MP3 support decoding to Web Audio [1], however it was suggested to use MSE [2] by multiple people.

MP3 format is not covered in the MSE spec. But looking at the MSE bugs [3], I found bugs 22371 and 23441 that will move list of the formats from the MSE specification. So, I hope, MP3 can be one of the formats.

If there will be a problem with adding raw MP3 stream to the MSE 
supported formats, I was thinking to extend fMP4 format with MP3 track 
type. (It's also useful to extended fMP4 with VP6 codec support -- but 
that's a different topic) The Flash network stream sends data without 
the container wrapper -- just raw audio packets. So I can just wrap MP3 
data with fMP4 container structure and feed that to the MSE. I plan to 
do that anyway with the H.264/AAC packets received from the RTMP stream, 
wrap them with fMP4 data and send to the MSE/video element.


  [1] http://lists.w3.org/Archives/Public/public-audio/2013JanMar/0111.html
  [2] 
https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
  [3] https://www.w3.org/Bugs/Public/
I've already added experimental MP3 support to Chromium behind a flag. I was planning on publishing a bytestream format specification for what I have implemented once I've finished creating the bytestream format registry proposed by https://www.w3.org/Bugs/Public/show_bug.cgi?id=23441 .
Whiteboard: [shumway] → [Shumway:P1]
Blocks: MSE
No longer depends on: MSE
Depends on: 933552
I'll add audio/mpeg to the list of supported MIME types in bug 933552.  There'll be more work required as the rest of the implementation progresses (e.g. support for stream parsing), but bug 933552 will at least allow the existing functionality to be used with MP3, which may be enough for Shumway's purposes.
FYI: The byte stream specification for MPEG containers has now been published:

https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/mpeg-audio-byte-stream-format.html

As of Chrome 36, we've enabled it by default for audio/aac and audio/mpeg.  Feel free to contact either Aaron or I if you have any questions.  Good luck with your implementation!
Yury, do we need MSE for the files in comment 4? If so, do I assume correctly that using MSE for playing back MP3s in Shumway works?
Flags: needinfo?(ydelendik)
As a web developer, I'd certainly be surprised if MSE did _not_ support the same codecs that the MediaElements do.
This would be helpful for third party developers trying to implement their own playback mechanisms of encrypted content without paying the EME toll to every single CDM vendor.
(In reply to Nick Desaulniers [:\n] from comment #7)
> This would be helpful for third party developers trying to implement their
> own playback mechanisms of encrypted content without paying the EME toll to
> every single CDM vendor.

MP3 inside MP4 is supported.
I'm working with Yury [0] to see if we can live pack an mp3 stream in an mp4 container for use with our MSE implementation.

[0] https://github.com/yurydelendik/rtmp.js/issues/1
Flags: needinfo?(ydelendik)
Blocks: shumway-1.0
No longer blocks: shumway-m4
Depends on: 1169485
Component: Audio/Video → Audio/Video: Playback
¡Hola Anthony!

Ended up here from https://twitter.com/yannickc/status/890610202906574850 and asked in #media where ng suggested to ni? kentuckyfriedtakahe so here we are.

Has this fall through the cracks?

Maybe this should be re-prioritized now as this would be needed by Deezer and maybe others in the post-Flash era?

If not, kindly just disregard this =)

¡Gracias!
Alex
Flags: needinfo?(ajones)
We support MP3 inside MP4 but have no intention of supporting additional containers in MSE.
Flags: needinfo?(ajones)
(In reply to alex_mayorga from comment #10)
> ¡Hola Anthony!
> 
> Ended up here from https://twitter.com/yannickc/status/890610202906574850
> and asked in #media where ng suggested to ni? kentuckyfriedtakahe so here we
> are.
> 
> Has this fall through the cracks?
> 
> Maybe this should be re-prioritized now as this would be needed by Deezer
> and maybe others in the post-Flash era?
> 
> If not, kindly just disregard this =)
> 
> ¡Gracias!
> Alex


I think you're right. P5 definitely isn't right
Priority: P5 → --
duplicate of 1169485 has it has a patch for it should we ever revisit this case
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.