[Tex/LaTex] How to run VLC in a href (beamer)

beamerhyperref

I have a beamer presentation and I want to launch a video clicking on a picture

\documentclass{beamer}
\usepackage{multimedia}
\usepackage{graphicx}
\usepackage{hyperref}
...
\href{run:C:\\Program Files (x86)\\VideoLAN\\VLC\\vlc.exe getR.avi}{\includegraphics[width=1cm,height=1cm]{Rlogo.jpg}}

When I do this I see the Rlogo.jpg but when I click on it I get "Cannot open file"
How can I do this ?

EDIT:
Alex solution gave an error

Here is the code

\frame{ \frametitle{une petite vidéo ;-)}
\includemedia[
  addresource=getR.mp4,
  windowed=1024x768,
  flashvars={
    source=getR.mp4
   &autoPlay=true
   &scaleMode=letterbox
  }
]{\includegraphics[width=1cm,height=1cm]{RStudio.jpg}}{VPlayer.swf}
}

Here is the slide

the slide


Here is the result when I click

the error when I click


Here is my package version

what miktex tells me about media9

Best Answer

This doesn't exactly answer your question because VLC is not used.

With media9, a video can be configured to play in a floating window of arbitrary size rather than in an embedded fashion. The video must be either in the FLV or in the H.264 format, though. But this can be easily done using an online service or FFmpeg on the command line:

ffmpeg -i getR.avi -vcodec libx264 getR.mp4

or

ffmpeg -i getR.avi getR.flv

The video would be embedded as

\includemedia[
  addresource=getR.mp4,
  windowed=1024x768,
  flashvars={
    source=getR.mp4
   &autoPlay=true
   &scaleMode=letterbox
  }
]{\includegraphics[width=1cm,height=1cm]{Rlogo.jpg}}{VPlayer.swf}

You may want to experiment with the window size (option windowed).

The scaleMode=letterbox FlashVar ensures that the video is resized correctly, in case its aspect ratio doesn't match the one of the playback window.

Alternatively, scaleMode=none suppresses rescaling of the video and it will be shown at its natural size. No pixel interpolations will take place which otherwise might be the source of undesired artefacts.

Related Question