Loki Software to Open Source SDL Motion JPEG Library
Loki Games has announced that they will be undertaking their 3rd Open Source project, the SDL Motion JPEG Library. SMJPEG creates and displays full motion video with a non-proprietary format created by Loki. It was developed while porting Railroad Tycoon II: Gold Edition. Check out their website for more details. Suffice to say that "among its many benefits, SMJPEG allows for arbitrary video sizes and frame-rates, user-tuneable compression levels,
and facilities for frame-skipping and time synchronization," according to Loki.
This is good news. I've been hoping that better multimedia support would come for Linux, and the proprietry "standards" in use don't help. Maybe this will help us join the multimedia world in style...
Is this similar to the motion jpeg codec (NOT the same as MPEG) used widely as a high quality high bitrate format for captured digital video?
If so, it's quite useful for local playback and editing, and provides very high quality, since each frame is basically just a jpeg. But without any attempt at delta compression, it results in stonking bitrates.
Very useful for editing though.
On further reading this looks more like an MPEG format, since it is based on MPEG 1 code. That would be a pity, since MPEG 1 fills its niche badly, while motion JPEG filss its niche well. However, I can see why a games company would want an MPEG (low bitrate/low quality) format more than a high bit rate high quality format.
-----
Last time I encountered motion JPEG (a few years back), it consisted of stringing JPEG pictures after each other (plus a soundtrack).
Makes skipping to random points MUCH easier than with MPEG, but makes the files 10 times bigger, because you don't do inter-frame compression the way MPEG does.
I couldn't tell from the press release whether it was the same thing or something entirely different.
Nice move!
Simple things should be simple, complex things should be possible.
According to Linuxgames the source code has already been released.
SMJPEG documentation
SMJPEG source code
BlueSky
now, if only we could get a gpl'd quicktime implementation...
ajit
I've recently tried out Loki's latest Myth II demo , and it's one of the best games ever written for Linux. I was amazed and shocked, but the best thing about this game is not the game itself, but the fact how smooth and playable it is under Linux/XFree86. I never thought that such level of control and performance was possible in X. Myth II grabs the whole screen intelligently and goes into full screen mode without any flicker. Mouse movement cannot not move you out of focus, only exit brings you back to 'normal X'. Still the game has the performance of native SVGALib apps. I wish Loki good luck - both in their Open Source, and game-porting projects. They really have proved that Linux can be an excellent gaming platform.
--Coke
Anybody in-the-know technically out there that can give us a blow-by-blow of how SMJPEG compares to Smacker, the current "standard" for video in games?
...
I'm curious as to why they decided to develop their own codec (which has got to be more than a couple of nights' coca cola-frenzied hacking) instead of going with the tried-and-true. Smacker licenses only cost around $1K last I knew
SlicedBread 2.0 -- the greatest thing since SlicedBread!
Perhaps this kind of development is the way forward for businesses wishing to start developing on Linux. Obviously many of them wish to protect their source code, but they could release libraries they've developed (or extended) that aren't directly related to their main product.
Nice one Loki.
This falls squarely in the "rumor" catagory, but at NAB99 about a truly "crossplatform" version of QuickTime, and he very carefully worded it as "we would NOT see a Linux version of QuickTime before the OS X Consumer version was out".
I forget when OS X Consumer is out... Spring maybe?? That *doesn't* mean a Linux version will be out then, what I heard implied was we might get a clearer picture..
Basically the issue for those that don't know is, OS X Consumer is a UNIX BSD-based ("the other Linux" as someone put it, although it's technically innaccurate) implementation, and since OS X is commercial that will be "competing" for mindshare. Releasing a QuickTime for Linux before OS X would kind of steal Apple's thunder... QuickTime is one of the few world-class technologies they have left that can be sold, and great QT support IS still a basis for buying a Mac for some people.
I see both sides of this, and it is frustrating not to have a robust and well-supported video system in Linux. It's not *entirely* Apple's fault as some would state.. I don't see Red Hat and SuSE funding some GPL'd alternative (which without compatible codecs is moot anyhow). Apple doesn't "owe" the any platform a player - they owe their stockowners results. Anyways, It's fantastic to see some free good work out there.... thanks LOKI! I don't think a company should "own" a video delivery system any more than a phone (or cable...) company should have a monopoly .
The FIRST person I talked to at Apple's booth said "if I wanted QuickTime on UNIX I'd have to buy OS X". Great.. does OS X run Linux binaries? Oh, wait, they quietly smothered OS X for Intel (remember?). "Der...":-/
What I like most about libs such as SDL is that they are *cross platform* -- I can develop my things from the comfort of my linux environment and cross compile to win32 if I need to. I'm afraid that for the time being, developing things for both platforms (i.e. not only linux) is the way to go, even for huge linux fans such as myself :-)
- Talence
I plan to plan / Dutch course in The Hague
Glancing over the documentation, it would appear this is a sequence of JPEG pictures rather than the MPEG1 compression. Nifty. Simpler, too.
It looks like we're seeing a minor trend for companies that make their profits off OSS code and/or OSS users to "give a little back" in terms of open-sourcing some of their own creations. Let's hope these smallish companies can establish a new ethos for the profession, in opposition to the "can't let go" mentality of the established vendors.
Sheesh, evil *and* a jerk. -- Jade
Quicktime supports arbitrary video sizes, arbitrary frame rate, compression levels, synchronization, seeking, and presumably is only patented at the codec level. It costs a lot less that writing your own library from scratch. It's the standard for DV and it's been open sourced for 9 months, just not by a slashdot sponsor.
>The audio chunks should be encoded one frame >ahead of the video chunks
Don't do this. Instead encode one second of audio data ahead of the first second of video data.
Of course, Loki would be less than worthless as a company if they open sourced their games (well, unless they used something similar to the NPL rather than the GPL.. and they wonder why its mainly Netscape that does the development work for Mozilla..?), although they are already a step ahead of id Software (even though I do so love Wolfenstein/Doom/Quake).
I've been thinking a lot about the pros and cons of commercial vs. free software.. and I believe that games (excepting rather simple ones) should probably remain the domain of commercial programming. Of course, I believe that games should remain reasonably low cost, but then again, I might be sort of biased since I'm designing the layout and other nifty things that will form the foundation for a 3D fully interactive RPG using anime-style graphics (am I nuts or what?).. Well, ones hopes, at least.
And, back to the point, perhaps? Since games of all sorts use stylized characters that the designers and/or companies would like to keep a hold of, GPLing such programs would not be the most productive thing in the world toward this end. Not to mention the fact that these things are strictly entertainment, not any kind of means to an end, besides killing boredom. Reusable tools (like the libraries Loki develops in the course of producting their games) and simple games should remain the focus of this arena.
~ Kish
From a purely cynical point of view... do Loki specialise in bringing 'Myth'-type games from the Windows platform in particular?
If the boot were on my foot, I would concentrate my efforts on code to convert games written for Windows to this SMJPEG or SMPEG-based platform... then let the developer community perfect the rendering code. If they are doing this for a number of different games, they minimise their time-to-market, and I feel that the market for linux games is going to be a large one (my HDD gets shot of Windows as soon as there are a decent number available).
Having said this, I heartily applaud what Loki have done, and I wish them every success, if only for making the leap of faith.
"Wise men talk because they have something to say; fools, because they have to say something" - Plato
I just want applaud those commited to creating open source multimedia stuff for Linux.
Other stuff coming....
Though it won't be open source as far as I know, a company in Germany called Main Concepts is currently developing a low cost Video Editing system for both Windows and Linux. They are also developing(or already developed) a software only DV codec that should have generally higher quality than MJPEG with lower bit rate requirements (basically about 25Mb or 3MB per second throughput). DV, unlike MJPEG is lossless. The great thing will be the ability to encode/decode DV video without the requirement to be attached to a 1394 device. The company is very commited to the Linux platform.
Please no Flames, just putting out some info.
http://www.mainconcepts.com
This is wonderful news!
I have inherited a box full of 8mm, Super8mm, 35mm slides and photographs dating back as far as the 1940's. My aim is to scan and encode each film and store them on CD or DVD before they deteriorate. Part of the process is designing and building an 8mm/Super8 film scanner (which I can do). The other aspect is figuring out how to store them efficiently.
I am assuming that since these are JPEGS, I should be able to manipulate them (i.e. color enhance, etc.) and save an important aspect of family history.
I've been using Quicktime 4 Linux for almost a year without any problems. It supports motion JPEG, PNG, RAW, YUV, and audio just fine. It's output is compatible with all the Linux video software. If you want a list of files to edit just run 'dechunk' and it creates the individual JPEG files. Why should I switch to SML?
As M-JPEG makes each frame accessible independent from the others, try something like MPEG-I or MPEG-II, otherwise file sizes will be huge. Make sure that you get a standard video file format (I'm not sure about Lokis code) or you will have problems viewing the films in the future. Having to convert them every ten years or so using lossy video codecs also will result in quality becoming poorer and poorer, so MPEG xy may be the way to go. I'd avoid proprietary stuff like QuickTime / Sorenson - although the codecs are great, compatible players might not be available in the future. The exact format will depend on how much disk space you're willing to provide for the storage of a minute of film.
OK, so Loki's games are non-free (but that's to be expected), but not only do they enable us to play top games (CivCTP is wonderful) ported professionally to Linux (the games feel like the "real thing"), but they keep on giving code to the Free Software Community. IMHO they are a good thing, and I'm happy to support them by bying games.
"At least you know where you are with Microsoft." "True. I just wish I'd brought a paddle." http://www.debian.org
I think some clarification is needed: Loki has shown that Linux can be a viable gaming platform, but I wouldn't call it an excellent one. Performance under X on a continuously multitasking system simply doesn't leave as much CPU time as going into windoze and hogging the entire system.
Note: I am not saying Linux is bad. I'm just saying that Linux is not as suited for gaming as other platforms. Of course, this should be common knowledge around here... and if it is, then heck, why the hell am I typing this anyway?
I got your QuickTime for Linux right here
Perhaps. Your best bet would probably be to configure and run a customized runlevel, optimized for gaming. This would probably shut down most services, excess VCs and the like, but possibly keep network and multi-user facilities in tact (in case the game clobbers the IO interface and you have to ssh in to reset the box. Unusual, but possible with both svgalib and X.
:-)
Myself, I find games run excellently under Linux in its normal configuration, but them I'm spoiled with a fast CPU and lots of memory -- it takes something like Windows 98 or NT to really slow it down.
The Future of Human Evolution: Autonomy
Linux Media Labs offers MJPEG hardware for Linux and I want to comment on some widespread misconceptions about MJPEG vs. MPEG performance.
Full rate, broadcast quality signal (D1) at 720x480@30frames/sec with 4:2:2 color (2 bytes/pixel) has a data rate of 20 MByte/sec. Now, with 1:10 compression the image quality is very good, especially since there is 60 fields per second with noise caused by lossy compression averaged out. So, D1 quality requires 2 Mbyte/sec bandwidth. That is about 7 Gbyte/hour. DVD disks have 4.7 Mbyte of capacity and hold about 2 hours of video. Therefore with all hoops and patents MPEG-2 has 3 times better performance. I would argue though that D1 encoded with MJPEG at 1:10 compression is much better quality then DVD, and don't forget that it's a 4:2:2 color, not 4:2:0 one as in DVD.
Let up now go to VHS (MPEG1) qualiity and also reduce frame rate to 15 frames/sec. There would be no flicker since our video frame buffer still allows our CRT to be refreshed at 60 fields per second. 320x240@15frames/sec at 4:2:2 (2 bytes/pixel) gives us 2.2Gbyte/sec uncompressed and with 1:15 JPEG compression (certainly better then VHS) gives 150 Kbyte/sec. MPEG1 data rate is about 180Kbyte/sec - i.e. MPEG1 is no better then simular quality MJPEG.
Advantages of MJPEG:
Therefore maybe Linux should use MJPEG as a standard for handling video.
Speaking of codecs - nothing prevents Open Source community from creating a first class MJPEG codec. As a matter of fact we're working right now on a MJPEG viewing application, simular to xanim from the user prospective but optimized for MJPEG with the requirement to playback 720x480@30fps on resonable hardware and it's under GNU GPL of course. If anybody has some top performing (assembly language?) JPEG code (DCT/Huffman) or desire to work on such (under GNU GPL) I would like to talk very much.
Vassili Leonov vleo@linuxmedialabs.com
Vassili Leonov
Ouch! I forgot I had moderated a couple of comments in this discussion earlier today! ARGH! Apologies to those who just lost their +1 points ...
The Future of Human Evolution: Autonomy
The biggest single thing you can to to improve performance is to make the game your window manager. Just make your .Xclients file a link to the game binary.
If you want even better performance, customize a runlevel with fewer things playing, but before you do that, renice the game to a higher priority, that should help out to minimize the effect or anything except memory intensive background programs.
--
"L'IT c'est moi!"
I have it on good authority that parallel development of Intel versions continues. It is just too large a potential market to ignore, esp having done all of the preceding work...I am NOT saying they have any plans to spring it on us anytime soon. Not at all. Nope. Sorry.
Really? I thought I saw something about some id guy saying that the games would never be open source because that's their bread and butter or whatever. I'm not about to fire up my Web browser to search it out, though.
~ Kish