problem with libvlc_media_new_path

*nix specific usage questions
bird12358
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Feb 2013 14:42

problem with libvlc_media_new_path

Postby bird12358 » 13 Apr 2015 14:04

Hello,

I have trouble with the deploiement of a example on my computer.

I use that code:

Code: Select all

m = libvlc_media_new_path(inst, "v4l2:///dev/video0"); /* Create a media player playing environement */ mp = libvlc_media_player_new_from_media (m); libvlc_media_player_play(mp);
When I launch the program on my first computer the video source works properly. But on my second computer I get that error:

Code: Select all

[0xae002948] filesystem access error: cannot open file /home/xxxxx/xxxx/v4l2:///dev/video0 (No such file or directory) [0xae002948] main access error: File reading failed [0xae002948] main access error: VLC could not open the file "/home/xxxxx/xxxx/v4l2:///dev/video0" (No such file or directory). [0x87d4d20] main input error: open of `file:///home/xxxxx/xxxx/%20%20%20v4l2%3A///dev/video0' failed [0x87d4d20] main input error: Your input can't be opened [0x87d4d20] main input error: VLC is unable to open the MRL 'file:///home//xxxxx/xxxx/%20%20%20v4l2%3A///dev/video0'. Check the log for details.
I don't understand why the program add "/home/xxxxx/xxxx/" before v4l2:///dev/video0 .

Can someone give me a hand?

Best regard.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: problem with libvlc_media_new_path

Postby Rémi Denis-Courmont » 13 Apr 2015 14:29

Please read the LibVLC Doxygen.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

bird12358
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Feb 2013 14:42

Re: problem with libvlc_media_new_path

Postby bird12358 » 14 Apr 2015 09:31

Thank you for the answer.

I looked at the documentation but I get:

Code: Select all

LIBVLC_API libvlc_media_t* libvlc_media_new_path ( libvlc_instance_t * p_instance, const char * path ) Create a media for a certain file path. See Also libvlc_media_release Parameters p_instance the instance path local filesystem path Returns the newly created media or NULL on error
path is the local filesystem path but I don't understand why on my firstcomputer where I compile the program the libvlc is well used but in the second computer the compiled program works wong?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: problem with libvlc_media_new_path

Postby Jean-Baptiste Kempf » 14 Apr 2015 23:48

v4l2:///dev/video0 is not a path, but a MRL.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

bird12358
Blank Cone
Blank Cone
Posts: 10
Joined: 03 Feb 2013 14:42

Re: problem with libvlc_media_new_path

Postby bird12358 » 16 Apr 2015 09:10

Thank you for the answer but I still dont understand why a path is added before v4l2:///dev/video0 ?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: problem with libvlc_media_new_path

Postby Jean-Baptiste Kempf » 20 Apr 2015 21:37

Because you called libvlc_media_new_path and not libvlc_media_new_location
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 5 guests