User Tools

Site Tools


multi-broadcasting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
multi-broadcasting [2017/08/21 14:40]
palakis Update and rewrite part 2 and part 3 to present tense
multi-broadcasting [2019/01/25 08:00] (current)
palakis
Line 2: Line 2:
 Google Summer of Code project by Stéphane Lepin Google Summer of Code project by Stéphane Lepin
  
-**Current State**: ​final coding period+**Current State** ​(as of 2019-01-25)Multi-broadcasting released in 2.1, Opus encoding merged (likely released in the upcoming 2.3), finishing touches on the FDK-AAC encoder
  
 ==== Project description ==== ==== Project description ====
Line 10: Line 10:
  
 ==== Relevant source code ==== ==== Relevant source code ====
-  * Multi-broadcasting:​ [[https://​github.com/​mixxxdj/​mixxx/​pull/​1300|PR #1300 on Mixxx'​s repository]] +  ​* **Multi-broadcasting:​ [[https://​github.com/​mixxxdj/​mixxx/​pull/​1300|Mixx PR #1300 on GitHub]]** 
-    ​Preferences UI works (still with some interaction bugs though), audio engine side works without known problems. +  ​* ​**Opus encoder: [[https://​github.com/​mixxxdj/​mixxx/​pull/​1386|Mixxx PR #1386 on GitHub]]** 
-      ​Changes made to SoundDeviceNetwork may need additional review +  ​* **AAC/HE-AAC encoder using fdk-aac: [[https://​github.com/​mixxxdj/​mixxx/​pull/​1387|Mixxx PR #1387 on GitHub]]** 
-    Left to do: fix preferences UI bugs and add a Status window outside the Preferences window +    * Live Broadcasting implemented with [[https://​launchpad.net/​~palakis/​+archive/​ubuntu/​libshout-aac|a version of libshout]] modified for AAC streaming
-  ​* Opus encoder: [[https://​github.com/​Palakis/​mixxx/​pull/​3|Internal ​PR #on my fork of Mixxx]] +
-    ​Works without major bugs, both in Recording and Live Broadcasting +
-    ​Left to do: needs a clean way to size the internal FIFO frame buffer, or get rid of it by telling the engine how many samples to pass on every encoding call +
-  * AAC/HE-AAC encoder using fdk-aac: [[https://​github.com/​Palakis/​mixxx/​pull/​4|Internal ​PR #on my fork of Mixxx]] +
-    * Works without major bugs (tested in Recording)+
     * Finds a dynamically-loadable libfdk-aac automatically. Windows version can even find and use B.U.T.T'​s ("​Broadcast Using This Tool" by Daniel Nöthen) version of the library.     * Finds a dynamically-loadable libfdk-aac automatically. Windows version can even find and use B.U.T.T'​s ("​Broadcast Using This Tool" by Daniel Nöthen) version of the library.
     * Supports AAC-LC (a.k.a traditional AAC), HE-AAC and HE-AACv2     * Supports AAC-LC (a.k.a traditional AAC), HE-AAC and HE-AACv2
     * Left to do:     * Left to do:
-      * Same as Opus: needs a clean way to size the internal FIFO frame buffer, or get rid of it by telling the engine how many samples to pass on every encoding call 
-      * Live Broadcasting integration:​ update libshout (Icecast/​Shoutcast library used by Mixxx) to support AAC streams 
       * Add options for VBR recording       * Add options for VBR recording
       * Add track metadata       * Add track metadata
Line 68: Line 61:
    * SoundDeviceNetwork (audio engine part responsible for Live Broadcasting) now handles several outputs    * SoundDeviceNetwork (audio engine part responsible for Live Broadcasting) now handles several outputs
    * Management of ShoutConnection instances is done by a refactored BroadcastManager. ​    * Management of ShoutConnection instances is done by a refactored BroadcastManager. ​
-    * Has an internal list of ShoutOutput ​instances, kept in sync with BroadcastSettings'​ profiles using signals and slots+    * Has an internal list of ShoutConnection ​instances, kept in sync with BroadcastSettings'​ profiles using signals and slots
     * Manages output workers in EngineNetworkStream (which has been reworked to have several output workers and a seperate input worker)     * Manages output workers in EngineNetworkStream (which has been reworked to have several output workers and a seperate input worker)
   * The Live Broadcasting settings UI has been updated (see description above)   * The Live Broadcasting settings UI has been updated (see description above)
Line 81: Line 74:
     * Show state of each connection in the profile list     * Show state of each connection in the profile list
   * Error reporting: show an error message when one or more active connections failed to connect   * Error reporting: show an error message when one or more active connections failed to connect
-  * Addition: Live Broadcasting Status dialog (a read-only list of each output connection) 
  
 === Broadcasting profiles: secure password storage === === Broadcasting profiles: secure password storage ===
Line 204: Line 196:
  
 Week 7's work is for the Preferences UI. Testing is already possible with the current UI, and the first WIP of the new UI will allow for testing on several streaming outputs. Week 7's work is for the Preferences UI. Testing is already possible with the current UI, and the first WIP of the new UI will allow for testing on several streaming outputs.
 +// EDIT: bad idea.//
  
 === Week 7 and 8: July 10 - July 23 === === Week 7 and 8: July 10 - July 23 ===
Line 234: Line 227:
  
 === Week 12: August 14 - August 18 === === Week 12: August 14 - August 18 ===
-//Writing ​in progresspublishing ASAP//+Opus, AAC and HE-AAC encoders are now a reality in Mixxx! These encoders are on the project'​s wishlist and much awaited by users. But in the process, other aspects mentioned in the previous report were slightly overlooked... 
 + 
 +The Opus encoder uses libopus for encoding, and the resulting encoded data in muxed into an Ogg stream using libogg. 
 +Opus streams embed in Ogg need a special "​OpusHead"​ header packet sent to make the stream recognized as Opus data, and a "​OpusTags"​ packet to provide stream/track comments (artist/title metadata) to players ​in a format identical to Vorbis comments. No library exists to generate instance of these two packetsbut fortunately the structure is easy to understand and simple enough to implement with bit manipulations. 
 + 
 +Each Opus frame has a fixed frame size in milliseconds,​ defined by the user or developer among a set of possible values. This means the encoder requires a specific amount of frames to be passed to it, no less, no more. Whether in Live Broadcasting or Recording uses, the engine provides way too much samples that the encoder can't process in one go, so a FIFO buffer is used to store samples and get a specific number of samples from it on each encoder call. 
 +The same situation happens in the AAC encoder, with one difference: the frame size/sample count is not configurable by the user. 
 + 
 +The AAC encoder uses libfdk-aac and the resulting encoded data doesn'​t need additional muxing or specific headers (these aspects are handled by libfdk-aac, depending on encoder configuation). Mixxx'​s encoder implementation currently supports AAC-LC (traditional plain AAC), HE-AAC (previously AAC+) and HE-AAC v2. 
 + 
 +The AAC encoder doesn'​t require libfdk-aac when compiling and distributing Mixxx. Instead, the external library is loaded at run-time (a process called dynamic loading) from a known name and location. This behaviour is similar to Mixxx'​s use of libmp3lame for MP3 encoding. The library can be placed in Mixxx'​s installation folder or searched for in potential locations (including finding it in B.U.T.T'​s installation folder on Windows if installed in AppData)
  
 === Final week: August 21 - August 27 === === Final week: August 21 - August 27 ===
-//​Work ​in progress//+Here it is. 
 +Three months and more than 170 (and counting) commits later, the official final coding period for the Google Summer of Code is over. Remaining engine issues ​in multi-broadcasting and, to a lesser extent, the fdk-aac and Opus encoders have been fixed. 
 +Actual work is not over yet! Discussion is still going on regarding some few specific details of the new Live Broadcasting user experience and takes place in the GitHub Pull Request for multi-broadcasting. 
 + 
 +It's been an honor as well as a great pleasure to work on Mixxx during GSoC. In the process, I got better at C++ and with Qt and had a glimpse at what an audio engine looks like. Once the work on multi-broadcasting is done, I'd be happy to contribute other features to Mixx outside of GSoC. 
 +Thanks to the Mixxx Team (and Daniel, my mentor) for letting me be part of this adventure!
multi-broadcasting.1503340857.txt.gz · Last modified: 2017/08/21 14:40 by palakis