Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: Adding multiple captions to a WMV file

HTVi
TV Discussion Newsgroups

Adding multiple captions to a WMV file
Joseph Taylor 5/14/2007 10:34:00 AM
Hi,

Does anyone know how to synchronise multiple SAMI files with a WMV file
server-side (WSX!!)? What I mean is that I have a sever-side playlist
ouputting various video clips in one language and I need to display subtitles
in other languages. the subtitle files (SAMI) need to be synchronised with
the clip so when a clip changes, the SAMI changes?

First Solution tried - Copy the video file in 23 languages and embedding the
content of the SAMI as script commands every file. Then schedule 23
publishing points - one for every language. Issue CPU intensive, too many
publishing points to manage.

Second Solution tried - Using AJAX to referesh media player to point to a
dynamically generate ASX that pulls-in the WSX publishing point and the SAMI
file URL when new clip requested. Not very good synchronisation and when
player refereshed, the clip is somehow split in half - top part showing new
clip and bottom clip is showing old clip. It catches up at the end. Not sure
if hardware issue but I have a latest spec machine.

Third solution tried - Tried to use Windows Media Format SDK to see if I can
embed the content of 23 SAMI files inside the WMV file. But cannot find a
simple way to do this. Also not sure how the WMP playback player will handle
this and if a user is able to change subtitles by changing the captionining
language.

Anyone has any suggestions?

Joseph

Re: Adding multiple captions to a WMV file
"Neil Smith [MVP Digital Media]" <neil[ at ]nospam.com> 5/14/2007 6:11:53 PM
On Mon, 14 May 2007 03:34:00 -0700, Joseph Taylor <Joseph
Taylor[ at ]discussions.microsoft.com> wrote:

[Quoted Text]
>Hi,
>
>Does anyone know how to synchronise multiple SAMI files with a WMV file
>server-side (WSX!!)? What I mean is that I have a sever-side playlist
>ouputting various video clips in one language and I need to display subtitles
>in other languages. the subtitle files (SAMI) need to be synchronised with
>the clip so when a clip changes, the SAMI changes?



It should be pretty simple - because you deliver a ~single~ SAMI file,
with all the captions inside. Each caption is distinguished from other
language-variants by the CLASS attribute on the <p> elements.

See the section 'Class and Localization' in this document
http://msdn2.microsoft.com/en-us/library/ms971327.aspx

It should then be clear that a sequence of timed elements like the
example lower down in the document (under the list of supported HTML
elements) would be providing switching based on the Class attribute

<Sync Start=2500>
<P Class=ENCC> If English (ENCC) is selected this line is
displayed,
<P Class=FRCC> but this line is not displayed.
</Sync>

Make sure to have corresponding Class declarations in the CSS part of
the document (inside the <head /> tags).

The ''Embedded Player Control Sample' section in that document shows
how to use SAMILang attribute to switch between captions you've
provided in the sample above.

HTH
Cheers - Neil

------------------------------------------------
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Re: Adding multiple captions to a WMV file
Joseph Taylor 5/15/2007 7:45:02 AM
Hi Neil,

Thanks for your reply. I understand the SAMI File specification and that you
can have more than one language in the SAMI File. My real issue is to pull
the correct SAMI file when the next clip changes in the WSX playlist.

The WSX generates new WSX playlists dynamically, i.e. the scheduled WSX
playlist has a reference to an ASPX page that generates a new WSX which will
include the video clip that is supposed to play at that requested time.

The issue is WSX files cannot have SAMI file references so the
synchornisation can only happen client-side via ASX. Even if I generate the
ASX file dynamically, the SAMI file will not change when the next clip
changes.

Joseph

"Neil Smith [MVP Digital Media]" wrote:

[Quoted Text]
> On Mon, 14 May 2007 03:34:00 -0700, Joseph Taylor <Joseph
> Taylor[ at ]discussions.microsoft.com> wrote:
>
> >Hi,
> >
> >Does anyone know how to synchronise multiple SAMI files with a WMV file
> >server-side (WSX!!)? What I mean is that I have a sever-side playlist
> >ouputting various video clips in one language and I need to display subtitles
> >in other languages. the subtitle files (SAMI) need to be synchronised with
> >the clip so when a clip changes, the SAMI changes?
>
>
>
> It should be pretty simple - because you deliver a ~single~ SAMI file,
> with all the captions inside. Each caption is distinguished from other
> language-variants by the CLASS attribute on the <p> elements.
>
> See the section 'Class and Localization' in this document
> http://msdn2.microsoft.com/en-us/library/ms971327.aspx
>
> It should then be clear that a sequence of timed elements like the
> example lower down in the document (under the list of supported HTML
> elements) would be providing switching based on the Class attribute
>
> <Sync Start=2500>
> <P Class=ENCC> If English (ENCC) is selected this line is
> displayed,
> <P Class=FRCC> but this line is not displayed.
> </Sync>
>
> Make sure to have corresponding Class declarations in the CSS part of
> the document (inside the <head /> tags).
>
> The ''Embedded Player Control Sample' section in that document shows
> how to use SAMILang attribute to switch between captions you've
> provided in the sample above.
>
> HTH
> Cheers - Neil
>
> ------------------------------------------------
> Digital Media MVP : 2004-2007
> http://mvp.support.microsoft.com/mvpfaqs
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen