title: How to take snapshot in libVLC without showing the Media Player
body: <p>I am trying to take snapshot from VLC player using libVLC. But whenever I run the following code, a window opens showing the video streaming and I don't want to open the media player window while doing that. I am taking the video input from an IP camera using RTSP link. Is there a way where I can achieve my goal by keeping the media player window hidden?</p>
  
  <p>Here is my code that I've done till now.</p>
  
  <pre><code>    m = libvlc_media_new_location(inst, "IP/camera/rtsp/link");
      mp = libvlc_media_player_new_from_media(m);
      libvlc_media_player_play(mp);
      while (1) {
          Sleep(500);
          const char* image_path = "E:\\frames\\image.jpg";
          int result = libvlc_video_take_snapshot(mp, 0, image_path, 0, 0);
      }
  
      libvlc_media_player_stop(mp);
      libvlc_media_player_release(mp);
      libvlc_release(inst);
  </code></pre>