Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Spoon on December 16, 2011, 03:01:28 pm
-
Having talked for a few hours with MjnMixael about the way FSO handles videos. I can more or less safely conclude that its pretty much 'subpar'
720p vids will only play without audio going out of sync if the bitrate is abysmally low. But with so many compression artifacts, its a better option at this point to use... 480p
And I must say, it feels kinda sour that I can upload 300mb .mp4's videos to youtube that work flawlessly for everyone but when I should release WoD2, it will come with pixelated 480p .ogg files...
Is there any chance that the SCP can improve on this situation? Implent a better way for FSO to play videos?
-
Based on previous discussions and my experience with the code involved, this is not likely to happen until we rewrite the 2D GUI for FSO.
-
Requires a better video playback library, like libAVC for example. Problem is, we can't use libavc due to the incredibly braindead nature of their releases, which restrict all the feature one would really want to have to the GPL-licensed version, which we cannot use.
-
Requires a better video playback library, like libAVC for example. Problem is, we can't use libavc due to the incredibly braindead nature of their releases, which restrict all the feature one would really want to have to the GPL-licensed version, which we cannot use.
Why not exactly? From what little I've read up on libAVC (http://libav.org/legal.html)
Q: Is it perfectly alright to incorporate the whole Libav core into my own commercial product?
A: You might have a problem here. There have been cases where companies have used Libav in their products. These companies found out that once you start trying to make money from patented technologies, the owners of the patents will come after their licensing fees. Notably, MPEG LA is vigilant and diligent about collecting for MPEG-related technologies.
SCP is not trying to sell a commercial product and to be frank, it seems very unlikely to me that anyone out there would even *notice* our tiny existence.
And in the very unlikely case that some company with a patent would somehow caught scent of freespace and figure out what the SCP is even doing. And would send a C&D letter. Then whats the worse that could happen? Couldn't we just be like "Oh, okay. This free to download non profit fan made coding operation shall stop using this free to download libavcodecs under GPL." done.
right?
Or am I missing some bigger giant picture of certain doom and destruction?
-
You're missing the point that GPL code can not be used in a product with a more restrictive licence (like the SCP's can not use this to make a profit licence). That's part of the GPL licence and one of the main reasons why a lot of people feel that GPL is actually a lot more restrictive than many other open source licences.
-
GPL functions like a virus of sorts--you can't use GPLed code in non-GPL projects--but GPLed code can use code from non-GPL projects, provided the license allows for it (which, in the case of other licenses such as the BSD license, MIT license, etc., it does).
If you can find something under the BSD license or similar, that would be far less restrictive.
-
Shows how much I know about licences
Sounds like a messed up ball of bull****. :(
-
I've seem to recall FFMpeg suggested in the past... and using dll-s surely falls outside the scope of the GPL license? I've seen dozens of commercial games do that, *with* closed source.
BTW, am I getting the problem right?
1. GPL requires that your code be GPL too.
2. FSO can't be made GPL as we have a different license.
Solution: don't make FSO GPL, but look for uses of open source code that allows usage while retaining a "closed"/non-GPL source of your own. IMHO linking dlls seem to be industry standard for this problem.
-
FFMpeg is more or less just a frontend for libavc. So that would not solve our issues. (Besides, does ffmpeg have an OSX port? Can't seem to find it mentioned on their website...)
-
FFmpeg has worked on the Mac for at least 5 years now.
Can't FS2 just do something like include basic support as it stands right now, with a launcher option to load external libraries if they are present on the system? Handbrake, for instance, can't be distributed with a CSS decrypter, so it's distributed as just a plain video encoder *unless* you also have VLC installed, in which case it will happily borrow the decryption libraries.
Just have FS2 try to link against VLC's copy of libavcodec, and if the link fails it falls back to the current playback system.
(I am aware that this is not as simple as I make it sound, but this would be a viable solution, no?)
-
But then you've got the following problem. If the mod comes with high bitrate 720/1080 videos, and FSO cannot find proper codecs, it will try to play the movies with the current playback system... which will choke on them.
-
Then make it check for that and if the movie can't be played, tell the player something like "Video cannot be played, download VLC player if you want to view it".
-
I've seem to recall FFMpeg suggested in the past... and using dll-s surely falls outside the scope of the GPL license? I've seen dozens of commercial games do that, *with* closed source.
That will have to wait until we have a proper working installer which can make certain the correct .dlls are present and updated. Otherwise we've got the whole OpenAl nonsense again.
-
I've seem to recall FFMpeg suggested in the past... and using dll-s surely falls outside the scope of the GPL license? I've seen dozens of commercial games do that, *with* closed source.
My understanding is that linking with the DLL's (or .so's) is fine when the libraries are released with the Lesser GPL (LGPL). Which is what libavc (and FFmpeg) do, except then see The E's comment about all the good stuff being still wrapped in the normal GPL license. Maybe the commercial games you are referring to are getting the job done with just the LGPL version? Perhaps you could find out from checking the readme / documentation that comes with the game?
Anyway - I think it's OK if you don't link with the libraries, i.e. run the FFmpeg process (or the VLC player) standalone inside (or alongside?) FSO.
From: http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem
However, in many cases you can distribute the GPL-covered software alongside your proprietary system. To do this validly, you must make sure that the free and non-free programs communicate at arms length, that they are not combined in a way that would make them effectively a single program.
Alternatively, is it a completely crazy idea to approach :v: about the possibility of re-licensing the FreeSpace2 source with something GPL compatible? e.g. Apache 2.0 (that is pretty much picked at random, don't treat it as an endorsement!)
-
working on it!
gonna do the yuv rgb conversion in shader
for reference performance of straight luminance rendering without software conversion (endgame 720p)
[attachment deleted by a basterd]
-
At the risk of sound like a broken record:
Valathil continues to be awesome.
-
Valathil, if you are being serious (and you haven't disappointed us yet whenever those words show up in your posts) then I wound recommend using libvlc as the dynamically-linked library instead of libavcodec. Libvlc is LGPL licensed and is capable of doing anything that vlc can. It still requires that vlc be installed on the system to work, but it can do all the stuff we want with a license that is compatible.
edit -- oh, you're doing it that way. Nm.
-
bam! almost flawless 30fps endgame 720p with gpu yuv rgb conversion suck on this
http://imagebin.org/189358
-
Valathil you are mental, and yet another visual nice 1
-
ok i think its done i just wanna plant this here for field testing before commiting
sry bout mediafire "The Upload Folder is full"
http://www.mediafire.com/?j8sben0v2kcrlss
oh and i love bits like these
Based on previous discussions and my experience with the code involved, this is not likely to happen until we rewrite the 2D GUI for FSO.
and then i fix it in A DAY
-
****ing. Ace.
All hail the wizard.
-
oh and i love bits like these
Based on previous discussions and my experience with the code involved, this is not likely to happen until we rewrite the 2D GUI for FSO.
and then i fix it in A DAY
It's just like on-the-fly cloaking and techroom materialization, "not in the near future", remember?
You're awesome like that, Valathil.
-
He's like Santa, but shinier. :cool:
So this fix uses the current video code but does colorspace conversion in hardware rather than software?
-
So. Smooth.
Very nice work. Minor nitpick, see screenshot.
[attachment deleted by a basterd]
-
So. Smooth.
Very nice work. Minor nitpick, see screenshot.
Already reported by moi
Already fixed by the wizard :D
-
He's like Santa, but shinier. :cool:
So this fix uses the current video code but does colorspace conversion in hardware rather than software?
Exactly
-
This doesn't seem as efficient as using the fixed-function video decode hardware you see in GPUs, but managing 720p with existing code (dodging license restrictions and library hell) is extremely neat.
-
Well, if you can find us the APIs to do that, we'd be happy to. However, given that this thing offloads a significant part of the processing load involved in displaying theora videos onto the gpu (the YUV to RGB conversion is done in a shader), we are already using GPU horsepower.
-
Working great cross platform, OS X with Nvidia card. Thanks Valathil.
-
Hail again to Valhathil :)
-
i dont think there are hardware decoders for ogg in gpu's only h.246 and mpeg2 cause they are the most used commercial codecs. and besides direct gpu hardware decode theres still the possibility of ogg releasing a multithreaded decoder library in the future which would work nicely on multicore systems
-
Call me nuts, but if this doesn't break anything, this should be put in the upcoming 3.6.14 release, assuming testing can be done. Especially with things like the super high res redone FSPort upgrade cutscenes already being out there.
-
I think that this thread deserves a new title, such as "480p in 2012? 'Surely not' my ASS!" :lol:
Edit:
Sweet! :pimp:
-
i dont think there are hardware decoders for ogg in gpu's only h.246 and mpeg2 cause they are the most used commercial codecs. and besides direct gpu hardware decode theres still the possibility of ogg releasing a multithreaded decoder library in the future which would work nicely on multicore systems
Ah. I hadn't thought of that. -_- Welp, shaders it is. As long as nobody wants to play 720p video while flying around in-game (which I'll admit as unlikely, but with mod creators you never know) this is awesome.
-
Ok this is commited to trunk. Lets hope the people at the top merge this to the next RC so we can have this in .14
-
I think a better solution would be, when your about to play an ingame video the game pings a central server, then Goober and Dekker turn up at your house and act out the cutscene
-
I think a better solution would be, when your about to play an ingame video the game pings a central server, then Goober and Dekker turn up at your house and act out the cutscene
Yes, that would be awesome. But I wonder how they are going to act out a supernova (and juggernaughts).
-
I think a better solution would be, when your about to play an ingame video the game pings a central server, then Goober and Dekker turn up at your house and act out the cutscene
Yes, that would be awesome. But I wonder how they are going to act out a supernova (and juggernaughts).
Well they'll need a couple volunteers, of course...