We have an archive of MP4 h264 multi-track videos.
When a user visits our site and requests to see a video through our site, we would like to send parameters such as filename or fileID and audio track ID to WOWZA.
Then WOWZA delivers the specified file and corresponding audio track.
Example:
a video has 3 audio tracks: track 1 = English, track 2 = French, track 3 = Spanish
The website visitor selects their preferred language and the player sends WOWZA the file ID and track ID to use. WOWZA then delivers the desired video and audio track.
This API is no really open. The underlying MediaReader API is kind of complicated. What exactly are you trying to accomplish? There may be some other way to do it.
I can’t really think of a way to enable this with VOD content. If it were live it would be a bit easier. With VOD we really don’t have the hooks intercept individual audio packets. The MediaReader handles the file in time slices. It does not have methods that deal with individual packets.
How large is the library? Seems like it would be quick to just fix the files and make them multi-track.
I might be wrong, but I dug around the server-side API and haven’t found anything. You can get a list of independent Wowza consultants by sending request to support@wowza.com.
Richard, is it possible to build a custom MediaReaderH264? The class is in wms-mediareader-h264.jar, but I don’t know if it’s possible to extend this class. I’d love to explore the possibility of selecting the channel within a track.
Fair enough, I guess. So, I’ll need to play a game of (hopefully not) 20 questions as a backup. I noticed there is a public method for MediaReaderH264.sendAudioTrakData(). How is the method utilized by WMS for real-time streaming? Would this be a likely method to overwrite and do my own manipulation of the retrieved audio sample during playback? Or would I overwrite another method such as MedaReaderH264.writePacket()? I think if I can grab the audio sample that is currently being read, I can manipulate the sample to select either the left or right channel using Xuggler.
Charlie, thanks for the reply. If you track back to the beginning of this thread, the original poster was asking about playing just the one channel of a stereo pair in a single audio track in Wowza. Richard was saying it’s not possible, and I have a client with a similar request (heck, it could even be my client that started the thread). The use is this: the client has a large library of encoded H.264 with one language on the left channel, and another language on the right channel. Converting the whole library of assets (number in the thousands) to a more proper dual audio track muxer is more than the client wants to undertake and/or avoid if possible.
Charlie, thanks for the reply. As I mentioned in my last post, the client has thousands of videos encoded this way (don’t ask me why it’s this way–that’s just the way someone decided to do it way back when). Time slices might be fine–I may not need access to individual packets. Have you used Xuggler with WMS? It’s pretty insane what you can do. I worked on a live stream frame grabber/analyzer that works at the server level using Xuggler. Can you tell me more about how sendAudioTrakData() and writePacket()? In general, I’m not familiar with the process that a mediareader goes through during a playback request?