官方网站提供VLC通过添加--avformat-format=mxg
等选项,在https://wiki.videolan.org/MxPEG/中支持MxPEG编解码格式流式传输。
我在VLC for Mac OS上成功尝试了这一点。但不幸的是,它似乎无法在移动vlc工具包中使用。
这是我的代码
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];
结果是我可以听到音频,但屏幕是黑色的。 > <
有谁知道问题出在哪里或者有一些技巧可以解决它?任何回复将不胜感激。感谢。
谢谢@feepk的重播。我使用选项@"-vvvv"
和@"avformat-format=mxg"
参与了播放器实例。
日志结果是......
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
是的,这就是全部而且一无所有。不像显示更多细节的其他流媒体,它似乎成功播放,但只是没有视频部分。
但是,使用-vvvv
选项从VLC for Mac生成的日志相对完整。在这里删除一些日志消息。
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
...
我还尝试@"--ffmpeg-format=mxg"
用于移动版VLC,结果显示该选项不存在的消息。
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.
MxPEG不支持此版本的移动版vlc吗?还是一个bug?
答案 0 :(得分:0)
毕竟,我发现具有--avformat-format=mxg
选项的播放器确实可以在MOBOTIX摄像头上使用MxPEG编解码器。
我试过的相机有中间件问题。我转向他们的官方页面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并下载了MX-System-4.3.2.77中间件并安装了它。然后问题就解决了。我犯的错误是我应该尝试更多相机,并认为问题的可能性来自相机本身。
无论如何,从经验中学到了,并希望提供给大家参考。