Skip to main content

Combining audio and video on-the-fly

3 replies [Last post]
zohan29
Offline
Joined: 2009-12-20
Points: 0

Hi,

Imagine we have a BD disc with some hundreds of video clips and some thousands of audio clips (stored as M2TS streams, not as sound.bdmv, compression is essential).

How do we combine and play back arbitrary (random) video with arbitrary audio?

Yet I've came to the following algorithm:
1) dynamically generate a playlist (.mpls) file that points to the chosen video and refers to an out-of-mux audio stream of our choice;
2) store it (.mpls) to VFS;
3) restart title to make this new playlist available;
4) play it.

Is it portable enough? do all the modern devices provide VFS? does BluRay support out-of-mux audio stored on disc, or do we have to copy audio to VFS, too?

Thanks!
Zohan

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joe Rice

Afraid the audio will need to be on VFS too, unless you author as a browsable slideshow, in which case you can play from two clips at a time from disc, but won't really have much sync between audio and video.

All players on the market since 11/2007 must support local storage, but many require that the user provide an SD card or USB drive in order for VFS updates to be possible. To cut down on costs a lot of players don't ship with any local storage, including many popular models.

Cheers,
Joe

On Dec 23, 2009, at 5:49 AM, bd-j-dev@mobileandembedded.org wrote:

> Hi,
>
> Imagine we have a BD disc with some hundreds of video clips and some thousands of audio clips (stored as M2TS streams, not as sound.bdmv, compression is essential).
>
> How do we combine and play back arbitrary (random) video with arbitrary audio?
>
> Yet I've came to the following algorithm:
> 1) dynamically generate a playlist (.mpls) file that points to the chosen video and refers to an out-of-mux audio stream of our choice;
> 2) store it (.mpls) to VFS;
> 3) restart title to make this new playlist available;
> 4) play it.
>
> Is it portable enough? do all the modern devices provide VFS? does BluRay support out-of-mux audio stored on disc, or do we have to copy audio to VFS, too?
>
> Thanks!
> Zohan
> [Message sent by forum member 'zohan29' (29e8c6f5@mail.ru)]
>
> http://forums.java.net/jive/thread.jspa?messageID=377164
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net

zohan29
Offline
Joined: 2009-12-20
Points: 0

> Afraid the audio will need to be on VFS too, unless
> you author as a browsable slideshow, in which case
> you can play from two clips at a time from disc, but
> won't really have much sync between audio and video.

Thanks Joe,

Audio/video sync is not required here at all. "As a browsable slideshow" - you mean, developing in pure HDMV? Then, how do we achieve randomness (dynamic programmatic choice of audio/video combination)?

Joe Rice

I believe you could still accomplish what you want with dynamically generated PlayLists reflecting the clip IDs determined, but the audio clips would need to be in a browsable slideshow subpath, and both audio and video clips would need to meet encoding constraints for browsable slideshow. (Essentially, the TS_Recording_Rate is limited to 10Mbps for one of the clips and 2Mbps for the other. Typically 10Mbps is used for video and 2Mbps for audio, although we did it other way 'round for the Neil Young discs in order to use 192kHz LPCM audio).

There are some physical layout constraints on clips used in slideshows - off the top of my head I recall that clips in such PlayLists must all be on the same layer, but I don't immediately remember if there are also jump distance constraints in the spec.

Cheers,
Joe

On Dec 23, 2009, at 9:28 AM, bd-j-dev@mobileandembedded.org wrote:

>> Afraid the audio will need to be on VFS too, unless
>> you author as a browsable slideshow, in which case
>> you can play from two clips at a time from disc, but
>> won't really have much sync between audio and video.
>
> Thanks Joe,
>
> Audio/video sync is not required here at all. "As a browsable slideshow" - you mean, developing in pure HDMV? Then, how do we achieve randomness (dynamic programmatic choice of audio/video combination)?
> [Message sent by forum member 'zohan29' (29e8c6f5@mail.ru)]
>
> http://forums.java.net/jive/thread.jspa?messageID=377208
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
> For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bd-j-dev-unsubscribe@hdcookbook.dev.java.net
For additional commands, e-mail: bd-j-dev-help@hdcookbook.dev.java.net