LibVLCSharp Streaming not working
Posted: 21 Feb 2023 12:37
Hi,
I have implemented LibVLCSharp inside WPF application to show Raspberry Pi Camera streaming and I'm having problems only in one Platform.
VLC application is workwing correctly in same PC. What kind of problem could be happening here.
Here is the code whitch i'm using to initilize libvlc
Thanks for your help. With regards,
I have implemented LibVLCSharp inside WPF application to show Raspberry Pi Camera streaming and I'm having problems only in one Platform.
I have enabled VLC internal logging to debug and I have seen something strange comparing to a PC whitch works properly. I can see the messages zd candidates and I supose that maybe the problem.Intel Pentium CPU N4200 1.10 Ghz
4GB RAM
64 bit operating system
Windows 10 Enterprise 2016 LTSB (10.0, build 14393)
DirectX version: DirectX 12
VLC application is workwing correctly in same PC. What kind of problem could be happening here.
Here is the code whitch i'm using to initilize libvlc
Code: Select all
private static string[] LIBVLC_OPTIONS_NORMAL = { "--no-snapshot-preview", "--no-osd" };
private static string[] LIBVLC_OPTIONS_ROTATED = { "--no-snapshot-preview", "--no-osd", "--video-filter=transform", "--transform-type=180" };
private void InitializeLibVlc()
{
CreateMedia();
_mediaPlayer = new MediaPlayer(_media);
_mediaPlayer.AspectRatio = "16:9";
_mediaPlayer.SetVideoTitleDisplay(Position.Disable, 0);
AssociatedObject.MediaPlayer = _mediaPlayer;
}
private void CreateMedia()
{
_libVLC?.Dispose();
_media?.Dispose();
_libVLC = new LibVLC(enableDebugLogs: true, rotated ? LIBVLC_OPTIONS_ROTATED : LIBVLC_OPTIONS_NORMAL);
_libVLC.Log += _libVLC_Log;
_media = new Media(_libVLC, new Uri(_streamURL));
}
private void _libVLC_Log(object sender, LogEventArgs e)
{
_logService.Write(CameraModule.LIBVLC_LOG, e.FormattedLog, LogCategory.Debug);
}
private void Play()
{
_mediaPlayer.Play();
}
Code: Select all
main Debug: VLC media player - 3.0.17.4 Vetinari
main Debug: revision 3.0.17.4-0-gc650ce1a4e
main Debug: Copyright © 1996-2022 the VideoLAN team
main Debug: configured with /builds/videolan/vlc/extras/package/win32/../../../configure '--enable-update-check' '--enable-lua' '--enable-faad' '--enable-flac' '--enable-theora' '--enable-avcodec' '--enable-merge-ffmpeg' '--enable-dca' '--enable-mpc' '--enable-libass' '--enable-schroedinger' '--enable-realrtsp' '--enable-live555' '--enable-shout' '--enable-goom' '--enable-sse' '--enable-mmx' '--enable-libcddb' '--enable-zvbi' '--disable-telx' '--enable-nls' '--host=x86_64-w64-mingw32' '--with-contrib=../contrib/x86_64-w64-mingw32' '--with-breakpad=https://win.crashes.videolan.org' '--enable-qt' '--enable-skins2' '--enable-dvdread' '--enable-caca' 'host_alias=x86_64-w64-mingw32' 'CFLAGS= ' 'CXXFLAGS= ' 'PKG_CONFIG=pkg-config' 'PKG_CONFIG_LIBDIR=/usr/x86_64-w64-mingw32/lib/pkgconfig:/usr/lib/x86_64-w64-mingw32/pkgconfig'
main Debug: creating audio output
main Debug: looking for audio output module matching "any": zd candidates
mmdevice Error: cannot initialize COM (error 0x80010106)
directsound Debug: found 2 devices
main Debug: using audio output module "directsound"
main Debug: keeping audio output
main Debug: Creating an input for 'stream.mjpg'
main Debug: using timeshift granularity of 50 MiB
main Debug: using timeshift path: C:\Users\Console\AppData\Local\Temp
main Debug: `http://XX.XX.XX.XX:8000/stream.mjpg' gives access `http' demux `any' path `XX.XX.XX.XX:8000/stream.mjpg'
main Debug: creating demux: access='http' demux='any' location='XX.XX.XX.XX:8000/stream.mjpg' file='\\XX.XX.XX.XX:8000\stream.mjpg'
main Debug: looking for access_demux module matching "http": zd candidates
main Debug: no access_demux modules matched
main Debug: creating access: http://XX.XX.XX.XX:8000/stream.mjpg
main Debug: (path: \\XX.XX.XX.XX:8000\stream.mjpg)
main Debug: looking for access module matching "http": zd candidates
http Debug: resolving XX.XX.XX.XX ...
http Debug: outgoing request:
main Debug: using access module "access"
main Debug: looking for stream_filter module matching "prefetch,cache_block": zd candidates
prefetch Debug: using zu bytes buffer, zu bytes read
main Debug: using stream_filter module "prefetch"
main Debug: looking for stream_filter module matching "any": zd candidates
main Debug: no stream_filter modules matched
main Debug: looking for stream_directory module matching "any": zd candidates
main Debug: no stream_directory modules matched
main Debug: attachment of directory-extractor failed for http://XX.XX.XX.XX:8000/stream.mjpg
main Debug: looking for stream_filter module matching "record": zd candidates
main Debug: using stream_filter module "record"
main Debug: creating demux: access='http' demux='any' location='XX.XX.XX.XX:8000/stream.mjpg' file='\\XX.XX.XX.XX:8000\stream.mjpg'
main Debug: looking for demux module matching "any": zd candidates
main Debug: looking for xml reader module matching "any": zd candidates
main Debug: using xml reader module "xml"
webvtt Debug: subtitle demux discarded
ts Debug: TS module discarded (lost sync)
mod Debug: MOD validation failed (ext=mjpg)
mjpeg Debug: discard MIME header: Content-Length: 29664
main Debug: selecting program id=0
main Debug: using demux module "mjpeg"
main Debug: looking for video decoder module matching "any": zd candidates
avcodec Debug: using ffmpeg Lavc58.134.100
avcodec Debug: CPU flags: 0x000813db
avcodec Debug: allowing 5 thread(s) for decoding
avcodec Debug: codec (mjpeg) started
main Debug: using video decoder module "avcodec"
main Debug: looking for meta reader module matching "any": zd candidates
lua Debug: Trying Lua scripts in C:\Users\Console\AppData\Roaming\vlc\lua\meta\reader
lua Debug: Trying Lua scripts in C:\Program Files (x86)\....\libvlc\win-x64\lua\meta\reader
lua Debug: Trying Lua playlist script C:\Program Files (x86)\....\libvlc\win-x64\lua\meta\reader\filename.luac
main Debug: no meta reader modules matched