When I use LibVLCSharp in a C# WPF project to play short audio or video (mp3/mp4 of a few seconds), the playback is incomplete. It will automatically pause just before the end of full playback. I didn't find any relevant solution, including official. This troubles me! My Codeļ¼
` _libVLC = new LibVLC();
using (var media = new Media(_libVLC, new Uri("https://resen.oneclass.cn/ai/202310/conversion_1696831409386.mp3"))) parent.VideoView.MediaPlayer.Play(media);`
The vlc log output is:
main Debug: no stream_filter modules matched
main Debug: looking for stream_directory module matching "any": 1 candidates
main Debug: no stream_directory modules matched
main Debug: attachment of directory-extractor failed for file:///C:/Users/bigq5/Desktop/conversion_1696831409386.mp3
main Debug: looking for stream_filter module matching "record": 24 candidates
main Debug: using stream_filter module "record"
main Debug: creating demux: access='file' demux='any' location='/C:/Users/bigq5/Desktop/conversion_1696831409386.mp3' file='C:\Users\bigq5\Desktop\conversion_1696831409386.mp3'
main Debug: looking for demux module matching "any": 55 candidates
es Debug: detected format mpga
main Debug: looking for packetizer module matching "any": 25 candidates
main Debug: using packetizer module "mpegaudio"
mpegaudio Debug: MPGA channels:1 samplerate:24000 bitrate:160
main Debug: selecting program id=0
main Debug: using demux module "es"
main Debug: looking for a subtitle file in C:\Users\bigq5\Desktop\
main Debug: looking for audio decoder module matching "any": 23 candidates
mpg123 Debug: mpga->f32l, bits per sample: 32
main Debug: using audio decoder module "mpg123"
main Debug: looking for meta reader module matching "any": 2 candidates
lua Debug: Trying Lua scripts in C:\Users\bigq5\AppData\Roaming\vlc\lua\meta\reader
lua Debug: Trying Lua scripts in F:\ENJavaSpace\OneClassMix\OneClassMix\bin\Debug\libvlc\win-x86\lua\meta\reader
lua Debug: Trying Lua playlist script F:\ENJavaSpace\OneClassMix\OneClassMix\bin\Debug\libvlc\win-x86\lua\meta\reader\filename.luac
main Debug: no meta reader modules matched
main Debug: `file:///C:/Users/bigq5/Desktop/conversion_1696831409386.mp3' successfully opened
main Debug: Buffering 0%
main Debug: Buffering 2%
main Debug: Buffering 4%
main Debug: Buffering 7%
main Debug: Buffering 12%
main Debug: Buffering 9%
main Debug: Buffering 14%
main Debug: Buffering 16%
main Debug: Buffering 19%
main Debug: Buffering 21%
main Debug: reusing audio output
directsound Debug: Opening DirectSound Audio Output
main Debug: Buffering 24%
main Debug: Buffering 26%
main Debug: Buffering 28%
main Debug: Buffering 31%
main Debug: Buffering 36%
main Debug: Buffering 33%
main Debug: Buffering 38%
main Debug: Buffering 40%
main Debug: Buffering 43%
main Debug: Buffering 45%
main Debug: Buffering 48%
main Debug: Buffering 50%
main Debug: Buffering 52%
main Debug: Buffering 55%
main Debug: Buffering 57%
main Debug: Buffering 60%
main Debug: Buffering 62%
main Debug: Buffering 64%
main Debug: Buffering 67%
main Debug: Buffering 69%
main Debug: Buffering 74%
main Debug: Buffering 72%
main Debug: Buffering 76%
main Debug: Buffering 81%
main Debug: Buffering 79%
main Debug: Buffering 84%
main Debug: Buffering 86%
main Debug: Buffering 88%
main Debug: Buffering 91%
main Debug: Buffering 93%
main Debug: Buffering 96%
main Debug: Buffering 98%
main Debug: Stream buffering done (1008 ms in 15 ms)
directsound Debug: Windows speaker config: Quad and stream has 1 channels, using 1 channels
main Debug: output 'f32l' 24000 Hz Stereo frame=1 samples/8 bytes
main Debug: looking for audio volume module matching "any": 2 candidates
main Debug: using audio volume module "float_mixer"
main Debug: input 'f32l' 24000 Hz Mono frame=1 samples/4 bytes
main Debug: looking for audio filter module matching "scaletempo": 16 candidates
scaletempo Debug: format: 24000 rate, 1 nch, 4 bps, fl32
scaletempo Debug: params: 30 stride, 0.200 overlap, 14 search
scaletempo Debug: 1.000 scale, 720.000 stride_in, 720 stride_out, 576 standing, 144 overlap, 336 search, 1200 queue, fl32 mode
main Debug: using audio filter module "scaletempo"
main Debug: conversion: 'f32l'->'f32l' 24000 Hz->24000 Hz Mono->Mono
main Debug: conversion pipeline complete
main Debug: conversion: 'f32l'->'f32l' 24000 Hz->24000 Hz Mono->Stereo
main Debug: looking for audio converter module matching "any": 8 candidates
main Debug: using audio converter module "trivial"
main Debug: conversion pipeline complete
main Debug: looking for audio resampler module matching "any": 3 candidates
main Debug: using audio resampler module "samplerate"
main Debug: Decoder wait done in 33 ms
main Debug: EOF reached
main Debug: pausing at EOF (pause after each)
main Debug: toggling resume
I tried to use the latest official version v3.8.1.0 and its examples to verify, but the playback was also incomplete. I guess this problem only occurs with very short media files.
For local files
For network streams