On Thu, Nov 26, 2009 at 10:45 PM, MajorProgamming <[email protected]>wrote:
> That's great info to know. But I more specifically wanted to get the > runtime of the file (i.e. in hours, minutes, seconds). Any way to do > that? > Very likely most times though variable bitrates, faking descriptives, custom setups may trick us. Experimental can work, at least (re)sample, Nyquist theorem good theoretical background. Some os fork the actual file instead of getting descriptives. In short many ways supporting we can. > > On Nov 26, 2:37 am, Niklas Rosencrantz <[email protected]> wrote: > > On Thu, Nov 26, 2009 at 5:14 AM, MajorProgamming <[email protected]> > wrote: > > > > > Is there any way to somehow fetch an external MP3 file (i.e. from > > > another website), and then calculate the length of the MP3 file. > > > > > I don't need the actual data of the file, I just want the length of it > > > (time it runs). > > > > > Keep in mind that these files can be as big as 25MB... > > > > > Thanks, > > > > Hello, > > Good question guaranteed to depend on host config (could be custom or > > fake descriptions) while one mentioned way is use HTTP HEAD > > #Call HTTP HEAD in Python > > import httplib > > conn=httplib.HTTPConnection("www.abc.com") > > conn.request("HEAD", "/dir/file1.mp3") > > res=conn.getresponse() > > fileSize=res.getheader('content-length') > > #or res.getheaders() for all headers > > conn.close() > > -- > > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
