Reputation: 2724
I've managed to set up and get VideoLanDotNet working in my winform application. Following the sample program I am able to get my project to open up a specified video I want to play. However, when I try to hard code in the file I want to open, my VLC player debug file says the following:
filesystem debug: opening file C:\Test Video\UFC 127'
C:\Test Video\UFC 127'
filesystem debug: opening file
filesystem error: cannot open file C:\Test Video\UFC 127 (No such file or directory)
filesystem error: cannot open file C:\Test Video\UFC 127 (No such file or directory)
main error: File reading failed
main error: File reading failed
main error: VLC could not open the file "C:\Test Video\UFC 127". (No such file or directory)
main error: VLC could not open the file "C:\Test Video\UFC 127". (No such file or directory)
main debug: no access module matching "file" could be loaded
main debug: no access module matching "file" could be loaded
main debug: TIMER module_need() : 5.145 ms - Total 5.145 ms / 1 intvls (Avg 5.145 ms)
main debug: TIMER module_need() : 5.145 ms - Total 5.145 ms / 1 intvls (Avg 5.145 ms)
main error: open of file:///C:/Test%20Video/UFC%20127' failed
file:///C:/Test%20Video/UFC%20127' failed
main error: open of
main error: Your input can't be opened
main error: Your input can't be opened
main error: VLC is unable to open the MRL 'file:///C:/Test%20Video/UFC%20127'. Check the log for details.
main error: VLC is unable to open the MRL 'file:///C:/Test%20Video/UFC%20127'. Check the log for details.
However, my file does exist, though I don't know why my vlc player is looking for file:///C:/Test%20Video/UFC%20127 as the location is C:\Test Video\UFC 127:
Now, when I use the following code:
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
{
// location of video to play
var media = new LocationMedia(openFileDialog.FileName);
vlcControl.Media = media;
}
I can manually go to the file I want to play and it opens fine.
But. when I take out:
var media = new LocationMedia(openFileDialog.FileName);
vlcControl.Media = media;
And change it to:
var media = new PathMedia("C:\\Test Video\\UFC 127");
vlcControl.Media = media;
That is when I get the error and my video not playing.
Does anyone know what I'm doing wrong? I've searched the entire VideoLanDotNet discussion posts but can't find anything to help me with this.
Upvotes: 1
Views: 2778
Reputation: 11
I think you forgot the fileextension of your video. The WindowsExplorer hide it, but you must enter it in your code. Look in the Fileproperties for the full path with the extension.
Upvotes: 1