Official site provides VLC has supported MxPEG codec format streaming in https://wiki.videolan.org/MxPEG/ by adding option like --avformat-format=mxg
.
I tried this successfully on VLC for Mac OS. But unfortunately, it seems not working in mobile vlc kit.
Here is my code
self.player = [[VLCMediaPlayer alloc] initWithOptions:@[@"--avformat-format=mxg"]];
self.player.media = [VLCMedia mediaWithURL:url]; // url of MxPEG streaming from mobotix camera live view
... // setting drawable and so on
[self.player play];
Result is that I can hear the audio, but the screen is black. > <
Does anyone know where the problem is or have some trick to work around with it? Any reply would be appreciated. Thanks.
Thanks @feepk 's replay. I inited the player instance with the options @"-vvvv"
and @"avformat-format=mxg"
.
The log result was...
2015-05-04 09:17:40.367 DScam[1800:38737] creating player instance with private library as options were given
hader program 1: WARNING: Output of vertex shader 'TexCoord1' not read by fragment shader
WARNING: Output of vertex shader 'TexCoord2' not read by fragment shader
Yes, that's all and nothing left. Not like the other streaming that showing more detail, it seems succeeded playing, but just without the video part.
However, the log produced from VLC for mac with -vvvv
option was relatively complete. Cut some log msg here.
10:15 $ /Applications/VLC.app/Contents/MacOS/VLC -vvvv --avformat-format=mxg http://admin:meinsm@10.13.1.145:80/control/faststream.jpg?stream=MxPEG&iframerefresh=1&jpheaderrefresh=1&fps=12
[1] 4124
[2] 4125
[3] 4126
VLC media player 2.2.0 Weatherwax (revision 2.2.0-rc2-290-g1f0f561)
[0000000100323ee8] core libvlc debug: VLC media player - 2.2.0 Weatherwax
[0000000100323ee8] core libvlc debug: Copyright © 1996-2015 the VideoLAN team
[0000000100323ee8] core libvlc debug: revision 2.2.0-rc2-290-g1f0f561
... // lots of log
[000000010071aed8] core input debug: Buffering 0%
[000000010071aed8] core input debug: Buffering 0%
[000000010071aed8] core input debug: Buffering 8%
[000000010071aed8] core input debug: Buffering 8%
[000000010071aed8] core input debug: Buffering 28%
[0000000100362dd8] core playlist debug: reusing audio output
[000000010071aed8] core input debug: Buffering 28%
[00000001003690c8] core audio output debug: VLC is looking for: 's16l' 8000 Hz Mono frame=1 samples/2 bytes
[000000010071aed8] core input debug: Buffering 43%
[00000001003690c8] auhal audio output debug: attempting to use device 0
[000000010071aed8] core input debug: Buffering 43%
[000000010071aed8] core input debug: Buffering 68%
[000000010071aed8] core input debug: Buffering 68%
[000000010071aed8] core input debug: Buffering 88%
[000000010071aed8] core input debug: Buffering 88%
[000000010071aed8] core input debug: Stream buffering done (1138 ms in 0 ms)
[00000001003690c8] auhal audio output debug: using default audio device 38
...
I also tried @"--ffmpeg-format=mxg"
for mobile VLC, the result shows the msg that the option is not existed.
2015-05-04 10:03:07.056 DScam[3751:85831] creating player instance with private library as options were given
Warning: option --ffmpeg-format no longer exists.
Is this version of mobile vlc not supported with MxPEG? or is it a bug?
After all, I found that player with --avformat-format=mxg
option can indeed work on MxPEG codec from MOBOTIX camera.
The camera I've tried had middle-ware problem. I turned to their official page https://www.mobotix.com/other/Support/Software-Downloads/Cameras/MOBOTIX-D24M,-M24M,-Q24M,-T24M,-D14Di,-S14,-V14D,-D25M,-i25,-c25,-M25M,-Q25M,-T25M,-D15Di,-M15,-S15-and-V15D-Cameras/MX-System-4.3.2.77 and downloaded the MX-System-4.3.2.77 middle ware and installed it. The problem was then solved. The mistake I made was that I should have tried more cameras and considered the possibility of problem came from camera itself.
Anyway, Learned from the experience and would like to provide it for everyone's reference.