LibVLC_SampleCode_SDL - no codec is supported?

This forum is about all development around libVLC.
Domarius
Blank Cone
Blank Cone
Posts: 17
Joined: 28 Apr 2017 22:22

LibVLC_SampleCode_SDL - no codec is supported?

Postby Domarius » 17 Feb 2019 00:07

Just trying to get the code working from here https://wiki.videolan.org/LibVLC_SampleCode_SDL/ I am compiling on Ubuntu 18.04.1 LTS and have installed libsdl2-dev and libvlc-dev, and am linking with -lSDL2 -lvlc (I have also installed VLC itself since apparently on Linux you need to do that to make the plugins available).

Any video file I throw at it, it displays an error saying the codec isn't supported for that format - but I commented out the line that disables sound, and the sound does play at least. But the window remains black.

Here is the output I'm getting. If anyone can tell me how to enable logging, I'll do it. (I couldn't find out how from searching the net.)

I notice it keeps saying VLC_PLUGIN_PATH=(null), what can I do about that?

Code: Select all

$ ./test agro.mp4 VLC_PLUGIN_PATH=(null) [00007f7ed81153c0] main decoder error: Codec `h264' (H264 - MPEG-4 AVC (part 10)) is not supported. [00007f7ed81153c0] main decoder error: Codec not supported [00007f7ed81153c0] main decoder error: VLC could not decode the format "h264" (H264 - MPEG-4 AVC (part 10)) $ ./test test.mov VLC_PLUGIN_PATH=(null) [00007f22d833acf0] main decoder error: Codec `h264' (H264 - MPEG-4 AVC (part 10)) is not supported. [00007f22d833acf0] main decoder error: Codec not supported [00007f22d833acf0] main decoder error: VLC could not decode the format "h264" (H264 - MPEG-4 AVC (part 10)) $ ./test "bonus body language disc.avi" VLC_PLUGIN_PATH=(null) [00007f65f8027c50] main decoder error: Codec `mp4v' (MPEG-4 Video) is not supported. [00007f65f8027c50] main decoder error: Codec not supported [00007f65f8027c50] main decoder error: VLC could not decode the format "mp4v" (MPEG-4 Video)

mfkl
Developer
Developer
Posts: 739
Joined: 13 Jun 2017 10:41

Re: LibVLC_SampleCode_SDL - no codec is supported?

Postby mfkl » 17 Feb 2019 05:43

apt-get install vlc?
https://mfkl.github.io

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: LibVLC_SampleCode_SDL - no codec is supported?

Postby Jean-Baptiste Kempf » 17 Feb 2019 17:55

libavcodec missing?
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.

Domarius
Blank Cone
Blank Cone
Posts: 17
Joined: 28 Apr 2017 22:22

Re: LibVLC_SampleCode_SDL - no codec is supported?

Postby Domarius » 18 Feb 2019 07:37

apt-get install vlc?
Yes, installed. As stated, I already installed VLC, both through the Software Center, and the terminal as well (with that very command) just to be sure.
libavcodec missing?
Well libavcodec57 appears to be installed, after I used this command I found to determine what codecs are installed.

Code: Select all

domarius@Domarius-Ubuntu ~/$ aptitude search codec | egrep ^i i A chromium-codecs-ffmpeg-extra - Extra ffmpeg codecs for the Chromium Browser i A libavcodec57 - FFmpeg library with de/encoders for audio/video codecs - runtime files idA libcommons-codec-java - encoder and decoders such as Base64 and hexadecimal codec i A libkf5codecs-data - collection of methods to manipulate strings i A libkf5codecs5 - collection of methods to manipulate strings i A libopencv-imgcodecs3.2 - computer vision Image Codecs library
Tellingly, my Python version of this test program (using vlc.py) plays videos just fine - so clearly I must have the codecs installed correctly!

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: LibVLC_SampleCode_SDL - no codec is supported?

Postby Jean-Baptiste Kempf » 18 Feb 2019 15:05

vlc --list | grep avcodec
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.

Domarius
Blank Cone
Blank Cone
Posts: 17
Joined: 28 Apr 2017 22:22

Re: LibVLC_SampleCode_SDL - no codec is supported?

Postby Domarius » 18 Feb 2019 22:32

This is the output I get;

Code: Select all

domarius@Domarius-Ubuntu ~ $ vlc --list | grep avcodec VLC media player 3.0.4 Vetinari (revision 3.0.4-0-gf615db6332) avcodec FFmpeg audio/video decoder avcodec FFmpeg audio/video decoder avcodec FFmpeg audio/video decoder avcodec FFmpeg audio/video encoder vdpau_avcodec VDPAU video decoder
I don't think it's a missing codec that's the issue, because my Python version works.

Ok I've just done some more experimenting... I think I've finally narrowed down the problem as much as I can. New thread (third time lucky...)


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 29 guests