problems w/ asfrecorder

Scott I. Remick scott at sremick.net
Sun Mar 7 22:40:44 PST 2004


I'm trying to use net/asfrecorder to capture a stream, and am having some
difficulties.

My adventure started here:
http://www.vh1.com/artists/az/guster/artist.jhtml

My goal is the "Careful" video. If you click on it, you get a popup box
that would normally play the video via a plug-in. The box uses Javascript
to disable the right-click context menus, so I had to turn that off to get
the ASX URL from the page source:

http://www.vh1.com/sitewide/mediaplayer/asxmaker.asx?clipids=1614624&s1=az&s2=guster&adPth=/asm/adsetup/artists/az/&x=x.asx

If you look at that ASX file, you find what should be the main ASF file
between two promo clips:

mms://a1979.v0534a.c534.g.vm.akamaistream.net/7/1979/534/v001/mtvnshrdstor.download.akamai.com/8646/_!/mtvi/bands/g/guster/careful_full_320.asf?auth=caCbUdBckcqcYcKawb6dhdqaBdMa9aib0aw-bata2r-dHa-BFLynE&aifp=ver_03"></ref>
	
ASFrecorder would choke on that though with "unknown content-type" because
it was handing out the vnd.ms.wms-hdr.asfv1 MIME type. So I patched
asfrecorder.c to add that MIME type to the list of "prerecorded content"
MIME types. asfrecorder got a bit further, then complained again about
application/x-mms-framed so I added that to the list too. The relevant
part of the source now looked like:

                /* Determine whether this is live content or not */
                if ((!stricmp(ContentType, "application/octet-stream")) ||
                    (!stricmp(ContentType, "application/vnd.ms.wms-hdr.asfv1")) ||
                    (!stricmp(ContentType, "application/x-mms-framed")) )
                {
                    if (strstr(Features, "broadcast"))
                    {
                        hi->contenttype = live_content;                     
                    }
                    else
                    {
                        hi->contenttype = prerecorded_content;
                    }
                }


At that point I could save the stream and got a 28MB file. However mplayer
doesn't detect the video stream:

ASF file format detected.
============ ASF Stream group == START ===
 object size = 74
 stream count=[0x8][8]
   stream id=[0x1][1]
   max bitrate=[0xcdb7][52663]
   stream id=[0x2][2]
   max bitrate=[0xd2b8][53944]
   stream id=[0x3][3]
   max bitrate=[0xcf25][53029]
   stream id=[0x4][4]
   max bitrate=[0x1ba16][113174]
   stream id=[0x5][5]
   max bitrate=[0xcf25][53029]
   stream id=[0x6][6]
   max bitrate=[0x400d0][262352]
   stream id=[0x7][7]
   max bitrate=[0xcf25][53029]
   stream id=[0x8][8]
   max bitrate=[0x6ff75][458613]
============ ASF Stream group == END ===
ASF: No video stream found.

The audio plays fine.

I feel I've gotten so close... what step(s) have I missed? Thanks




More information about the freebsd-multimedia mailing list