>
>
> "Neil Smith [MVP Digital Media]" wrote:
>
> > On Fri, 6 Jul 2007 05:00:02 -0700, heebie
> > <heebie[ at ]discussions.microsoft.com> wrote:
> >
> > >
> > >
> > >"Neil Smith [MVP Digital Media]" wrote:
> > >
> > >> On Thu, 5 Jul 2007 11:48:02 -0700, heebie
> > >> <heebie[ at ]discussions.microsoft.com> wrote:
> > >>
> > >> >Hi
> > >> >
> > >> >If I embed a windows media control in my web page, and create a playlist of
> > >> >two items to play: the first advertising, and the second the main feature; is
> > >> >there any way to make the first item rotate between a set of say four
> > >> >adverts. So each time the control was loaded a different advert would be
> > >> >played at the beginning?
> > >>
> > >>
> > >> Just dynamically generate your ASX file from a database and scripting
> > >> language such as C#, Perl or PHP. It's a simple enough structure that
> > >> you can just use string building rather than bother with an XML parser
> > >>
> > >> The ASX playlist syntax is here :
> > >>
http://msdn2.microsoft.com/en-us/library/ms910265.aspx> > >>
> > >> A typical example of usage might be
> > >>
http://www.wdvl.com/Multimedia/Windows_Media/media3_1.html> >
> > >I think the ASX solution you pointed to was great. However, I just need to
> > >clarify a few things.
> > >
> > >Firstly, say I uploaded a video every day and I wanted advertising before
> > >each one. In my asx file the second entry would point to my main content
> > >(.wmv or whatever) but what would I point the first entry to? Another asx
> > >file which would dynamically select one video out of four?
> >
> > There's no need to create a second ASX, you should be able to use your
> > scripting language to create the ASX on the fly, it's only a text
> > string really. So each time the ASX was requested, you would write a
> > random ad URL from your (4) ads.
> >
> > In PHP for example, you would typically write a line which did
> >
> > $ad_list = array(
> > 0 => 'advert-1.wmv',
> > 1 => 'second_advert.wmv',
> > 2 => 'my_3rd_ad.wmv',
> > 3 => 'buy_our_stuff.wmv'
> > );
> >
> > $random_index = rand(0,3);
> > $ad_base_url = '
http://yourserver.com/video/ads/';> > $media_base_url = '
http://yourserver.com/video/';> > $random_ad = $ad_base_url . $ad_list[$random_index];
> >
> > $asx_content = '<asx version="3.0">
> > <entry>
> > <param name="showwhilebuffering" value="true" />
> > <param name="prebuffer" value="true" />
> > <ref href="' . $random_ad . '" />
> > </entry>
> > <entry>
> > <title>Markers Discussion</title>
> > <param name="prebuffer" value="true" />
> > <ref href="' . $media_base_url . 'feature_1.wmv" />
> > </entry>
> > </asx>';
> >
> >
> > >Secondly, I uploaded a test at
http://www.heebie.co.uk/video/video.html .
> > >Why do the controls disappear after a second, and how come my advertising
> > >banner isn't showing (or does that only work with the stand alone player?)
> >
> >
> > Well a couple of things there :
> >
> > Countdown_Yellow.wmv and TheEnd_Yellow.wmv are 2500kbps videos.
> >
> > You shouldn't be over 150-250kbps for online use ever, as your viewers
> > are gonna be waiting a really long time on a 384kbps DSL connection
> > for example. Re-encode those down to about 250kbps for a 320x240 video
> > size.
> >
> > The second thing is, yes the ad banner is a function of the standalone
> > player version 7-11 embedding code although you're using media player
> > 6.4 activeX. So people with more modern machines simply won't see it.
> >
> > That image videobanner.gif doesn't exist anyway under
> > /videos/videobanner.gif URL (404 error) although the logo image
> > videobann.gif does, and is displayed in WMP6.4
> >
> > Remember that any relative URLs in the ASX will be relative to the
> > location of the asx file, not to the site root.
> >
> > You could reasonably rotate that banner image within the page for each
> > page view, using a similar script to the one used to build the ASX
> > playlist
> >
> > HTH
> > Cheers - Neil
> > ------------------------------------------------
> > Digital Media MVP : 2004-2007
> >
http://mvp.support.microsoft.com/mvpfaqs> >
>
> Thanks very much for another informative answer. In the ideal situation, my
> users would put a script at the top of their page which would automatically
> add advertising to any windows media embed control on that page. I don't want
> them to create a new php (asx, php, whatever it may be) every time they embed
> a new movie. It's a shame you can't create playlists on the fly with the
> embed control.
>
> Thanks again for your time. I really appreciate it.