I am developing vb.net Windows application for playing the video file.
I have added a video files in embedded resource in this way:
Project->Properties. Then select the "Resources" tab. Next Select "Add Resource"->"From Existing File".
I am able to play the one video,with following code
Dim FilePath = Path.Combine(Application.StartupPath, "My video.mp4")
If (Not File.Exists(FilePath)) Then
File.WriteAllBytes(FilePath, My.Resources.video1)
End If
AxWindowsMediaPlayer1.URL = FilePath
AxWindowsMediaPlayer1.Ctlcontrols.play()
The video is working fine , but problem is, application creates the video file in the bin folder every time.
You can see here...
My application's Current exe size in 200 MB, as I have added many videos into the resources. What the use of adding video into resources, if it going to produce new video file every time ?
I have did same thing with images, I have added images in resources which used in the app, but I don't req. to carry these images as well , it dont produce the image after running the app.
I can put the exe on any machine and app gets run with those images perfectly...
Is there any way to play the embedded video , from resource itself without creating the video file ?