-
Notifications
You must be signed in to change notification settings - Fork 66
Revert videoMap implementation with RoQ codec #954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
aa2f878 to
aa73512
Compare
|
I was opening the dpk of mxl-school to see the roq file and noticed that the license states "This map [...] may NOT be modified IN ANY WAY". So that DPK version, which adds various files, renames files, etc., would seem to be in violation. The original can't be loaded because it uses an underscore in the map name. Is there any legally available test data? Looking over the code a bit, I see various buffer overflow problems (e.g. reading 65536+8 from a buffer of size 65536, I think I saw a writing one too but forget where). Please don't merge until I have confirmed that there are no obvious security holes. |
Is printing a docx modifies the text in the docx? The format is totally different though people would say the work is not modified, the story would be carried without modification. Anyway, here is a test map: https://dl.illwieckz.net/b/unvanquished/test-assets/map-test-video_2.1-20231106-091111-e20b56a.dpk This uses the Tremulous splash, but downscaled to I downscaled it and stripped sound this way (ffmpeg knows how to convert to RoQ, including both video and sound if there is): |
Yes, printing would involve creating a modified digital version of the document. The Creative Commons ND licenses explicitly allow "technical modifications" so that a work can be used in different formats. (Stuff you do in private and don't distribute seems to usually fall under fair use exceptions though, so the printing thing would not be infringement.) I think a better analogy with the mxl-school DPK (converted pak format and added minimaps among other stuff) would be converting the docx to a PDF, adding a table of contents, and distributing it to other people. |
|
I did not change that map in any way. |
OK, someone else did though. It has minimaps so it's clearly been modified for Unvanquished. |
|
Those topics have multiple levels. We don't consider a book being modified if the wording is not modified, some page layout can be considered part of the work too, but every print of the book will not be considered a modification, despite you can be 100% sure the paper will not be the same. A book author will complain his work was modified if that's not the story he wrote. This is a moral right, for example : « I don't want to be attributed for a work that is not mine ». Anyway this is totally off topic. This PR is about keeping compatibility with legacy formats, this is not related to how people bring legacy formats (we even have legacy pk3 support if needed), and we can produce test assets if needed. If a technical discussion brings an off-topic discussion (like here to discuss how to deal with legacy assets, etc), we better do this kind of talk in forums . |
Thanks, it works. The mxl-school repacking is now a moot point for me, as long as it doesn't use any features not used in the test map. |
What the test map doesn't do is to apply some filter to the video (school map does it). I can extend the test map to add some more extended uses case, but at least this is good enough to check that the video plays, and we can extend the test map later. |
|
Hmm something missing from the test map is two different videos playing at once. There is a lot of global variable abuse so that would be important to test. |
|
Here is an updated map with two https://dl.illwieckz.net/b/unvanquished/test-assets/map-test-video_2.1-20231107-010139-59e1280.dpk Right now it plays the same RoQ file in both surfaces, we may want to try to play two RoQ files. Actually the movie used for the RoQ file in mxm-school is Nosferatu from 1922 and is in public domain so maybe we can reuse that file. |
|
Here is an updated map with two different RoQ files played at the same time: https://dl.illwieckz.net/b/unvanquished/test-assets/map-test-video_2.1-20231107-023827-9a75c8e.dpk There is indeed a bug when the two RoQ movies are not the same, right now the engine can't display both of them at the same time. If only one move is on screen, it works. The map is made in a way it's easy to have two movies on screen at the same time, or only one. I used excerpts from some public domain movies:
|
I wonder who, then. Or there's a disagreement about what is "changing". I'm pretty sure that people would not argue against repacking of their map if the map's bsp, textures, models, and other "script files" are not modified (for example to modify entities or shaders for a different game). In fact, without unzipping a map, one can not know the licence, so it seems rather logic to me that it only applies to the files in the archive, instead of to the archive itself. |
|
I'm working on cleaning this up. Luckily there is a lot of code that can be deleted. For example the |
|
On the |
MSVC on Appveyor reports those errors: C:\projects\daemon\src\engine\client\cl_cin.cpp(1102,85): error C2220: the following warning is treated as an error [C:\projects\daemon\build\ttyclient-objects.vcxproj] C:\projects\daemon\src\engine\client\cl_cin.cpp(1102,85): warning C4389: '==': signed/unsigned mismatch [C:\projects\daemon\build\ttyclient-objects.vcxproj] C:\projects\daemon\src\engine\client\cl_cin.cpp(1102,136): warning C4389: '==': signed/unsigned mismatch [C:\projects\daemon\build\ttyclient-objects.vcxproj]
|
Thanks! This looks very good, that's awesome ! Do you want a test map with a RoQ video larger than I assume the |
92628cd to
296eaf1
Compare
I wonder if it worked in q3. If the mxl-school one (designed for q3) was exactly this size that kind of suggests no... there is a ton of unreachable dead code in the ioq3 video code so the fact that there is code for something doesn't mean it ever worked. If it doesn't work in ioq3 I don't want to spend more than like 15 minutes on that. |
I don't really care about this since I think the ioq3 version is a better reference anyway. I plan to add a comment linking to that in case any removed feature turns out to be needed. Our version is mostly the same except bit-rotted and with minor API migrations. |
Documentation I read said it didn't. |
|
|
I do not agree with some opinions @slipher has expressed here. But I do agree with their opinion that it might be more future-proof to not support RoQ videos, and maybe support some other video codec in the future. |
|
Some other video codec would also be fine, any RoQ videos could be converted for the purposes of porting legacy maps to Unvanquished. |
|
As said in chat, while I believe it would be good to have a newer and state-of-the-art codec, the same way we have WebP and CRN for images, I believe it is good to keep compatibility with the legacy video format of the engine, the same way we keep TGA image support. The format may be lossless, the code may be rusty and may have some limitations (no more than |
|
The nice thing about adding a real video library would be that besides the goofy video on a wall thing, we could use it for the demo video recording. It's annoying to have to make a 1 minute long AVI weighing a gigabyte and then transcode it. |
|
Yes but one problem I want us to avoid reproducing is trying to climb too high steps in one go when we can reach lower steps first and end with “nothing” because we look for “better good”:
After than, we can try to add a new codec, like webm/vp9 or av1. This next step would be implementable either for videoMap, either for recording, but only one of them at first, then we would implement it for the other task. In fact, I would not be surprised if implementing a new codec would be easier to be done as an alternative to AVI recording than as an alternative to RoQ videoMap, and I would be totally fine if we go on the recording side first. This for multiple reasons:
|
|
A pretty bad shortcoming that we haven't discussed yet is the way that the video stops playing when you're not looking at and resumes where you left off when you look again. It would be better if the video's time advanced consistently regardless of whether is rendered, which would allow synchronizing the video with other map elements such as movers. The crappy behavior is obligated by the ROQ format because it doesn't have keyframes. If you wanted to keep the timing consistent you'd have to either potentially decode the whole video during one frame, or always continue decoding even when the video is not being seen. A decent video format has keyframes which allow jumping to any time point with only a little processing. It would be unfortunate if we gave the stopping and starting behavior to other video formats in the name of consistency. Thoughts? |
|
Given that there are converters for roq to any other media format, I think we should encourage conversion to something modern. No q3 map can be played on Unvanquished as is anyways right? |
|
RoQ shortcomings compared to what other codecs can do deserve a dedicated thread: TL;DR:
|
|
After digging into the code, I understand that a video frame is loaded just like any other texture image, so there shouldn't be any difficulty in handling images of different sizes, just need to change |
|
Hmm, I tried to encode a |
|
@slipher here is an updated map: A |
|
|
I mean you always need to do additional work like repackaging, crunching, creating layouts, etc... |
|
Superseded by #966. |
I modified the patch to fix some merge issues with
external_deps/build.shfor historical purpose (this commit can still build the broken Theora codec on Linux).Remove broken and unsafe OGM (Theora) support again.
Remove broken cinematic mode and command again.
The
videoMapfeature is working again, currently only with legacy RoQ format.Here is
mxl-schoolmap on viewpos699 1228 304 -58 -7:Fixes #936:
See also: