Hi,
I'm writing a small app for my network at home, using IIS 5.0 on Win2k. I have a shared directory of MP3 files, encoded at 320k. The idea is to allow browsing of the MP3 folders via HTTP, and when a file is selected for download, to automatically use dMC to create a lower-bitrate version of the file suitable for playing on a PocketPC.
The only real problem that I have is that when I call the AddFromToFiles() method, it hangs up. I've attached an example which causes the problem when the AddFromToFiles() call is uncommented. As long as that line is commented out, the test page displays fine.
Any suggestions as to what might be going wrong? I'm using dMC version 9a.
Mark
<%@ LANGUAGE="javascript" %>
<%
Response.Cachecontrol = "no-cache";
Response.Addheader( "pragma", "no-cache" );
Response.Expires = -1;
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<%
var objFileSys = Server.CreateObject( "Scripting.FileSystemObject" );
var strFileName = Request.QueryString("FileName");
var nBitrate = 128;
var dMC = Server.CreateObject("dMCScripting.Converter");
Response.Write( "Created dMC Converter<br>" );
var objMp3Settings = Server.CreateObject("dMCScripting.Mp3Settings");
Response.Write( "Created MP3 settings<br>" );
objMp3Settings.Set( nBitrate, 44100, 0, 0 );
Response.Write( "Set MP3 params<br>" );
dMC.VolumeNormalize = false;
dMC.PreserveTags = false;
dMC.DeleteSourceFiles = false;
dMC.ConvertToFolder = false;
Response.Write( "Set conversion params<br>" );
Response.Write( "Adding file for conversion: " + strFileName + " to " + Server.MapPath( "." ) + "squish" + "<br>" );
// dMC.AddFromToFiles( strFileName, Server.MapPath( "." ) + "squish" );
// dMC.GoConversion( "Mp3 (Blade)", true, true, true, true);
%>
</BODY>
</HTML>
<%
Response.End();
%>
I'm writing a small app for my network at home, using IIS 5.0 on Win2k. I have a shared directory of MP3 files, encoded at 320k. The idea is to allow browsing of the MP3 folders via HTTP, and when a file is selected for download, to automatically use dMC to create a lower-bitrate version of the file suitable for playing on a PocketPC.
The only real problem that I have is that when I call the AddFromToFiles() method, it hangs up. I've attached an example which causes the problem when the AddFromToFiles() call is uncommented. As long as that line is commented out, the test page displays fine.
Any suggestions as to what might be going wrong? I'm using dMC version 9a.
Mark
<%@ LANGUAGE="javascript" %>
<%
Response.Cachecontrol = "no-cache";
Response.Addheader( "pragma", "no-cache" );
Response.Expires = -1;
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
</HEAD>
<BODY>
<%
var objFileSys = Server.CreateObject( "Scripting.FileSystemObject" );
var strFileName = Request.QueryString("FileName");
var nBitrate = 128;
var dMC = Server.CreateObject("dMCScripting.Converter");
Response.Write( "Created dMC Converter<br>" );
var objMp3Settings = Server.CreateObject("dMCScripting.Mp3Settings");
Response.Write( "Created MP3 settings<br>" );
objMp3Settings.Set( nBitrate, 44100, 0, 0 );
Response.Write( "Set MP3 params<br>" );
dMC.VolumeNormalize = false;
dMC.PreserveTags = false;
dMC.DeleteSourceFiles = false;
dMC.ConvertToFolder = false;
Response.Write( "Set conversion params<br>" );
Response.Write( "Adding file for conversion: " + strFileName + " to " + Server.MapPath( "." ) + "squish" + "<br>" );
// dMC.AddFromToFiles( strFileName, Server.MapPath( "." ) + "squish" );
// dMC.GoConversion( "Mp3 (Blade)", true, true, true, true);
%>
</BODY>
</HTML>
<%
Response.End();
%>
Comment