Thursday, May 24, 2012

Unknown server tag 'asp:ScriptManager'.


<system.web>
    <pages>
        <controls>
            <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        </controls>
    </pages> 
</system.web>

Sunday, February 26, 2012

If your AVI do not open ( CvCapture* aviSrc = cvCaptureFromAVI(inputVideo); returns a zero pointer)

PS: If your AVI do not open ( CvCapture* aviSrc = cvCaptureFromAVI(inputVideo); returns a zero pointer), it´s probably because the file encoded in a way the openCV can´t read it. Here is the solution:
> Get a copy of GSpot to check the video codec.
> If the file is compressed but no corresponding VFW codec on your
system,
> then cvCaptureFromAVI can not read it.
> If the file is uncompressed, use mencoder to convert it
> to opencv readable format, like this:
> mencoder youravi.avi -ovc raw -vf format=i420 -o new.avi

Cvcapturefromavi Not Working

openCV will only play avi in i420 format. 

To test this try an avi that has been converted by mencoder to i420 format. 

Monday, August 15, 2011

Replace img_convert by swscale for ffmpeg


//        img_convert(&pFrameRGB, PIX_FMT_RGB24,
//        (AVPicture *)pFrame, pCodecCtx->pix_fmt,
//        pCodecCtx->width, pCodecCtx->height);

        static struct SwsContext *img_convert_ctx;
        int w = pCodecCtx->width;
        int h = pCodecCtx->height;
        img_convert_ctx = sws_getContext(w, h,
        pCodecCtx->pix_fmt,
        w, h, PIX_FMT_RGB24, SWS_BICUBIC,
        NULL, NULL, NULL);

        sws_scale(
        img_convert_ctx,pFrame->data, pFrame->linesize,0,
        pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize);

Sunday, August 14, 2011

Friday, August 12, 2011

How to close the cmd.exe progress in C#


currentCommand = programPath + "\\ShotSegmentation.exe " + videoPath + "\\" + currentVideoFile + " " + outputPath + "\\" + currentOutputFile;

                    //MessageBox.Show(currentCommand);

                    proc = new Process();
                    proc.StartInfo.CreateNoWindow = true;
                    proc.StartInfo.UseShellExecute = false;
                    proc.StartInfo.RedirectStandardOutput = true;

                    proc.StartInfo.RedirectStandardError = true;
                    proc.StartInfo.FileName = "cmd.exe";

                    proc.StartInfo.Arguments = "/C " + currentCommand;                  

                    proc.Start();
                    string output = proc.StandardOutput.ReadToEnd();
                    proc.WaitForExit();

Thursday, May 26, 2011

Solution to Skype crashing, version 5.3.0.111 in window 7 64bit

remove the file "shared.xml" in folder %userprofile%\AppData\Roaming\Skype and it's working!!!!