MxPEG Codec Support (open source C++ libs provided)

Feature requests for VLC.
gcams
New Cone
New Cone
Posts: 5
Joined: 04 Feb 2012 16:29

MxPEG Codec Support (open source C++ libs provided)

Postby gcams » 04 Feb 2012 16:40

I'm wondering if there is any potential for VLC to incorporate support for the open source MxPEG codec provied by mobotix:

http://developer.mobotix.com/#cpp_lib

There are open source C++ libraries made freely available by Mobotix at the above address, and adding this support would allow VLC to be used as a streaming/recording tool for all Mobotix cameras (and would include support to retreive audio from the camera, embedded in the MXPEG stream).

Currently there are very few video tools that support MxPEG and instead, us Mobotix owners need to fall back on MJPEG, which does not provide the same efficiencys, frame rates and critically has no audio support.

I for one would be hugely grateful if this codec could be incorporated in VLC and would be happy to test the functionality of such. I know there is a large community of Mobotix camera users who would also make use of VLC, if it contained MxPEG support!

I'm not a developer, but I'm hoping the fact that Mobotix have provided the decoding libraries/source code, it would make implementing the codec relatively easy?

Many thanks to the VLC development team for consideration of the above.

Cheers,
Graham

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: MxPEG Codec Support (open source C++ libs provided)

Postby VLC_help » 05 Feb 2012 12:20

It would be better to integrate that to ffmpeg/avcodec.

gcams
New Cone
New Cone
Posts: 5
Joined: 04 Feb 2012 16:29

Re: MxPEG Codec Support (open source C++ libs provided)

Postby gcams » 05 Feb 2012 13:42

Thanks for the reply vlc_help. Looks like some work was done back last year to incorporate MxPEG support into ffmpeg based on this:

http://ffmpeg.org/pipermail/ffmpeg-deve ... 05099.html

But I can't seem to track down if it ever made it into the finished product (and if it's currently supported). If the patch in the link above has been promoted to the current stable release, does this mean that VLC should "just work" decoding an MxPEG stream, if I give it the URL to the Mobotix MxPEG stream? Or does something else need to happen first (between ffmpeg/avcodec) to allow VLC to make use of the MxPEG decoder in FFMPEG?

gcams
New Cone
New Cone
Posts: 5
Joined: 04 Feb 2012 16:29

Re: MxPEG Codec Support (open source C++ libs provided)

Postby gcams » 05 Feb 2012 13:45

Further to my post above, I just found this:

http://mailman.videolan.org/pipermail/v ... 83506.html

it looks like although ffmpeg does support MxPEG decoding, there is something missing in the works between VLC/ffmpeg to allow it to make use of the MxPEG decoding capabilities in ffmpeg.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Jean-Baptiste Kempf » 06 Feb 2012 17:42

There are some patches in the work.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

gcams
New Cone
New Cone
Posts: 5
Joined: 04 Feb 2012 16:29

Re: MxPEG Codec Support (open source C++ libs provided)

Postby gcams » 06 Feb 2012 23:11

There are some patches in the work.
Many thanks Jean-Baptiste, that is fantastic news!! :D

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Sébastien Escudier » 07 Feb 2012 10:45

I think the ffmpeg demux can only handle raw mxpeg files.
It won't work in "live" (the http stream from the Mobotix camera).

HerrPi
New Cone
New Cone
Posts: 3
Joined: 07 Feb 2012 15:09

Re: MxPEG Codec Support (open source C++ libs provided)

Postby HerrPi » 07 Feb 2012 15:36

This is a very interesting thread and I'd like to help you with the work to be done here.
Further to my post above, I just found this:
http://mailman.videolan.org/pipermail/v ... 83506.html
it looks like although ffmpeg does support MxPEG decoding, there is something missing in the works between VLC/ffmpeg to allow it to make use of the MxPEG decoding capabilities in ffmpeg.
It was I who asked this question. So yes, ffmpeg as well as the fork libav support MxPEG decoding by now. But you're right, there's still a missing link in the chain in order to work with VLC. This is also my goal!
There are some patches in the work.
This sounds fantastic indeed. So before I start digging deeper into the material of VLC, I'll just wait a bit. The subject seems to be quite current.
I think the ffmpeg demux can only handle raw mxpeg files.
It won't work in "live" (the http stream from the Mobotix camera).
This is not exactly true. Here are some of my results related to the topic. "A" means audio working, "V" means video working. This is also tested under Windows with the help of the appropriate cross-compiled command line versions of the tools.

LIBAV

play MxPEG livestream, A/V:

Code: Select all

avplay -f mxg "http://<ip>/control/faststream.jpg?stream=mxg" avplay -f mxg "http://<ip>/control/faststream.jpg?stream=MxPEG"
fetch livestream and transcode on the fly, A/V:

Code: Select all

avconv -f mxg -i "http://<ip>/control/faststream.jpg?stream=mxg" -f mpeg out.mpg
VLC: ("Media" -> "Open Network Stream" -> "Network URL")

this only gets a MJPEG stream, so only V:

Code: Select all

http://<ip>/control/faststream.jpg?stream=full
VLC is also able to directly transcode the above stream, e.g. into MPG, OGG, etc.

FFMPEG:

fetch MJPEG livestream and transcode on the fly, V:

Code: Select all

ffmpeg -f mjpeg -i "http://<ip>/control/faststream.jpg?stream=full" -f mpeg out.mpg
play MxPEG livestream, A/V:

Code: Select all

ffplay -f mxg "http://<ip>/control/faststream.jpg?stream=mxg" ffplay -f mxg "http://<ip>/control/faststream.jpg?stream=MxPEG"
And here's a command that fetches an MxPEG-Stream via LIBAV, transcodes it into MPEG and lets MPlayer play it, A/V:

Code: Select all

http_proxy= avconv -f mxg -i "http://admin:meinsm@10.9.53.86/control/faststream.jpg?stream=mxg" -f mpeg - | mplayer -
Last but not least, all of the named tools (except VLC of course, that's why we're talking here in the first place) are able to play back an already recorded MxPEG video clip. This was already said here in the thread. FFmpeg / libav integrated support for MxPEG video files some while ago (with the help of Anatoly Nenashev). I think MxPEG is recognized and activated by the file extension "MXG" / "mxg". So there is no problem playing an .mxg clip (A/V) by simple means without further command line arguments of ffplay / avplay. This is also possible under Windows.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Sébastien Escudier » 07 Feb 2012 15:53

HerrPi, thanks for the info, I'll have a look

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Sébastien Escudier » 16 Feb 2012 13:43

Unfortunately, I don't think it's possible to add live (http) mxpeg support easily.
We cannot use the ffmpeg demuxer directly with http stream.

So I can add the mxg file support, but the live support would need more work : we would need to write our own mxpeg demuxer.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Jean-Baptiste Kempf » 16 Feb 2012 14:12

Why is it so? We do flv over http correctly, don't we?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Sébastien Escudier » 21 Feb 2012 13:38

done, for vlc 2.0.1
Note :
files are correctly detected but live input is not auto-detected by ffmpeg, so you must add this option in vlc :
ffmpeg-format=mxg

HerrPi
New Cone
New Cone
Posts: 3
Joined: 07 Feb 2012 15:09

Re: MxPEG Codec Support (open source C++ libs provided)

Postby HerrPi » 23 Feb 2012 12:28

Thanks a lot for this work!

I'm not completely through, though. I just downloaded the latest nightly Windows build (http://nightlies.videolan.org/build/win ... 20223-0403) and tried to load an MXG clip file I had previously recorded (I used the GUI version). It didn't load. I also couldn't read any suspicious error or warning message. The only warning that was output was "direct3d warning: trying surface pixel format: YV12", but I don't think this is a critical one. The regular debug messages show "Buffering 0%" for quite some time.
Further, the windows stayed black.
It's about the same behaviour with live stream.

Am I doing something wrong? Can you send me a clip file that's working for you?

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Sébastien Escudier » 23 Feb 2012 13:07

I tried the windows build and I have the same bug.

It works fine for me on linux, and I don't know why...

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Sébastien Escudier » 24 Feb 2012 15:40

I found the bug, a patch is on the way.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Sébastien Escudier » 28 Feb 2012 15:56

done

alexschomb
New Cone
New Cone
Posts: 1
Joined: 04 Mar 2012 02:32
Operating System: Mac
Location: Aachen, Germany

Re: MxPEG Codec Support (open source C++ libs provided)

Postby alexschomb » 04 Mar 2012 02:44

Awesome, I've been waiting for this to happen for years! Thanks for the great work! Does that mean we can now watch live audio MXPEG streams on Mac and Linux systems? (no need for the ActiveX plugin and all?)
files are correctly detected but live input is not auto-detected by ffmpeg, so you must add this option in vlc :
ffmpeg-format=mxg
As a sidenote I think I found out what Sébastien meant concerning the "option in vlc", which was unclear to me at first. It works as supposed when I start the latest nightly build (Mac 64bit) from commandline appending the following (without quotes) "--ffmpeg-format=mxg". Here is an example:

Code: Select all

$ VLC.app/Contents/MacOS/VLC --ffmpeg-format=mxg "http://IP:PORT/control/faststream.jpg?stream=MxPEG"
Sadly though I'm having connection problems and therefor the sound is making no fun at all, but at least something comes through. I'm going to try this out from the LAN soon.

Edit: My connection seems to be better now and I can watch the live-stream fluently with full audio output. Awesome :)
Last edited by alexschomb on 05 Mar 2012 15:23, edited 2 times in total.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Sébastien Escudier » 05 Mar 2012 09:08


gcams
New Cone
New Cone
Posts: 5
Joined: 04 Feb 2012 16:29

Re: MxPEG Codec Support (open source C++ libs provided)

Postby gcams » 07 Mar 2012 18:21

This is absolutely awesome guys! A huge thank you to EVERYBODY who has contributed to this! I've just downloaded the latest nightly build and tested, and it's working beautifully. Thanks again all!!

PS: I'm going to post a link to the VideoLan MxPeg WIKI in the Mobotix forums, to make everybody there aware of all the hard work that has gone on here.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Jean-Baptiste Kempf » 07 Mar 2012 18:24

PS: I'm going to post a link to the VideoLan MxPeg WIKI in the Mobotix forums, to make everybody there aware of all the hard work that has gone on here.
Cool. 2.0.1 is on the way.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

pbirkoff
New Cone
New Cone
Posts: 3
Joined: 01 Oct 2012 11:47

Re: MxPEG Codec Support (open source C++ libs provided)

Postby pbirkoff » 02 Oct 2012 12:36

Maybe it's me, but I've tried this and it doesn't work. When I open the stream, nothing happens in VLC Media Player. Any suggestions?

Edit: It finally worked, but aparently the stream only starts after a couple of minutes, showing the images of the start. So there seems to be a big delay. Also, there is no audio. Any suggestions?

mll
New Cone
New Cone
Posts: 2
Joined: 27 Jan 2013 00:35

Re: MxPEG Codec Support (open source C++ libs provided)

Postby mll » 27 Jan 2013 01:27

Re: Mxg file conversion

VLC has no problem reading/playing test .mxg file, but struggles with 'convert/save' fuction to create .mp4 or .mov files. Receive this error message: http://www.tejashummer.com/VLC_error.JPG. Must be a 'keystroke' problem on my part, as VLC seems to have no problem with reading/playing .mxg file. Thanks very much for any
suggestions on remedy. All the best. ... MLL

varna2
New Cone
New Cone
Posts: 1
Joined: 02 Feb 2013 15:44

Re: MxPEG Codec Support (open source C++ libs provided)

Postby varna2 » 02 Feb 2013 15:49

Hello,

I face ~10-20 seconds delay (lag) when comparing real-video with video-on-screen. This makes it not possible to use video for monitoring/security applications. Is this normal or do I have some configuation issues?

Windows 7 64bit, VLC 2.0.5, starting command:
vlc.exe --ffmpeg-format=mxg "http://1.2.3.4/control/faststream.jpg?stream=MxPEG"

Thank you

tekkfreakz
New Cone
New Cone
Posts: 4
Joined: 18 Jun 2013 19:24

Re: MxPEG Codec Support (open source C++ libs provided)

Postby tekkfreakz » 18 Jun 2013 20:28

http://82.157.120.176/cgi-bin/faststream.jpg?stream not working vlc 2.01-2.02- 2.03-2.04-2.05-2.06-2.07
http://82.157.120.176/cgi-bin/faststream.jpg?stream vlc 1.1.11 yes working
vlc 2.07 how do I run ?

Ludrax
Big Cone-huna
Big Cone-huna
Posts: 568
Joined: 07 Jul 2010 14:28

Re: MxPEG Codec Support (open source C++ libs provided)

Postby Ludrax » 19 Jun 2013 14:44

Code: Select all

ps warning: garbage at input, trying to resync...
An' if ain't broke, then don't try to fix it...


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: No registered users and 5 guests