title: cvCreateFileCapture returns a null value
body: <p>On execution the following code always shows <code>No video found</code>.</p>
  
  <p>It is entering the loop as well since I checked it by putting a test message. Although,  the program is running fine without any errors but I am not getting the desired video output. </p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;opencv2/highgui/highgui.hpp&gt;
  int main()
  {
      cvNamedWindow("Example2",CV_WINDOW_AUTOSIZE);
      CvCapture* capture1 = cvCreateFileCapture("~/home/abhimanyu/sample_video.mp4");
      if(capture1 == NULL)
      printf("No video found");   
      IplImage* frame;
      while(1)
      {
          frame = cvQueryFrame(capture1);
          if(!frame) break;
          cvShowImage("Example2",frame);
          char c = cvWaitKey(33);
          if(c == 27) break;
  
          printf("Inside the loop\n");
      }
  
      cvReleaseCapture(&amp;capture1);
      cvDestroyWindow("Example2"); 
      enter code here
      return EXIT_SUCCESS;
  }
  </code></pre>