LibVLC, Android and a weird video stream

This forum is about all development around libVLC.
MisterBlack
New Cone
New Cone
Posts: 2
Joined: 14 Nov 2018 00:10

LibVLC, Android and a weird video stream

Postby MisterBlack » 14 Nov 2018 16:09

I have a stream that I'm pulling from a security camera and trying to display it on an Android device using Xamarin as a framework (Working cross-platform).
I've run into an issue with one of the cameras, however, and I'm not entirely sure how to display the feed.

The camera is sending down the stream in h264 but VLC Player is not recognizing what demux to use and so it sits trying to load the stream until you tell it to use something along the lines of h26x in which case you get the following response in the log:

Code: Select all

main debug: creating demux: access='http' demux='h26x' location='webaddress/video.web?s=0x2cb56d36&camera=1704448&format=5' file='\\webaddress:4502\video.web' main debug: looking for demux module matching "h26x": 55 candidates h26x error: this doesn't look like a h264 ES stream, continuing anyway main debug: looking for packetizer module matching "any": 24 candidates main debug: using packetizer module "h264" main debug: using demux module "h26x"
And this will display the video feed just fine. Now I'm using LibVLCSharp for the project I'm trying to get working and it's having this issue again. I whipped up a quick console application and I got the black screen until I put in

Code: Select all

media.AddOption(":demux=h264");
in which case it worked just fine and happy afterwards, showing me my stream.

Now when I tried to do the same in the Android project I just get a black screen with no video feed. I did try adding

Code: Select all

var configuration = new MediaConfiguration(); configuration.EnableHardwareDecoding(); media.AddOption(configuration);
Which will show other feeds just fine but not this one. I am assuming that the Android VLC Library is having the same issue that the VLC Player was having in that it has no idea what format the stream coming down is in and so it can't properly display it but I have no idea where to even start looking to solve that.

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

Re: LibVLC, Android and a weird video stream

Postby mfkl » 15 Nov 2018 02:45

Hello,

Can you show full logs for android please?
Also full logs on VLC in the case it is working.

You are using

Code: Select all

media.AddOption(":demux=h264");
on Android as well, right?

This

Code: Select all

configuration.EnableHardwareDecoding();
won't help you regarding your issue but you can keep it anyway.
https://mfkl.github.io


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests