Celestia 1.7.0 Development Thread

The place to discuss creating, porting and modifying Celestia's source code.
Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #1181by cartrite » 11.01.2022, 18:34

I found the video bug. I was reading about avi file formats and found what the problem was. biHeight needs to be set to negative. This only works for Full frames uncompressed. With yuv compression, biHeight needs to be positive. So there needs to be an if statement that controls this. Here is some Pseudo code

Code: Select all

 If compression = full frames Then bi.biHeight = (height - height * 2); Else bi.biHeight = height
I changed line 107 in avicapture.cpp to bi.biHeight = (height - height * 2); The movie captures correctly with Full Frame uncompressed. But the other compressors don't work. So there needs to be a way of having one or the other in the avi header depending on compression. But according to what I read, the compressed files should have worked because biHeight was already positive. So something else is probably wrong.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #1182by cartrite » 14.01.2022, 21:21

I cant find any code referring to the compression window that appears in the movie capture process. No code for any of the compressor formats. Is raw uncompressed the only option or are all the options supplied by the windows os?
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #1183by john71 » 14.01.2022, 21:27

cartrite wrote:Is raw uncompressed the only option or are all the options supplied by the windows os?

No, there should be Microsoft video 1, Intel IYUV, RLE codecs too. And you can optionally install x264, xvid and huffyuv codecs.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #1184by cartrite » 14.01.2022, 21:47

Right. I understand that. That is what I see in the last window. But I can't find any mention in the code.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Janus
Posts: 537
Joined: 13.08.2016
With us: 8 years 3 months

Post #1185by Janus » 16.01.2022, 02:51

A note on doing video recordings, speaking from experience.
When I do recordings with Celestia, I use the following codec into avi.

Lagarith

https://lags.leetcode.net/codec.html

It is lossless, and uses multiple cores.
It is also open source and you can compile it yourself if you desire.
Works as x86 or x64 as well.

Being fair here, I use a non standard setup on my systems, so your results may vary.
I also cannot tell you how it will do under the last two versions of windows, neither of those are allowed on my network.
Works well on the twelve year old system I use making recordings.


Janus.

P.S. Did anyone ever put a patch in place to sync video recording framerate to real time?
Since lua and the rest use different clocks, I had to put a time check into the render loop to keep sync.
I had either posted or sent it, I don't recall off hand.
I am sure someone more versed than I am in C/C++ could make a better version from it.

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #1186by john71 » 16.01.2022, 07:50

You can use this codec pack, it installs all the necessary components in one step, Lagarith too (Windows):

http://www.codecguide.com/download_k-lite_codec_pack_mega.htm

Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 29
With us: 15 years 9 months
Location: Suzhou, China

Post #1187by Markerz » 16.01.2022, 14:07

I made two major changes to the win32 front end.

One to enable visual styles so that controls look more modern and not like they were from win95, the other to enable proper hidpi support so rendered result and controls will look sharp instead of blurry on a HiDPI monitor.

Might be a good time to rebuild an installer. :wink:

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #1188by cartrite » 16.01.2022, 15:31

How many people use the other video compressors. With the windows versions the default is uncompressed full frame. I got that working but the fix isn't in the master. The change I posted at the top of this page hasn't been added, reviewed, or anything. I'll build another installer after I hear some feedback from that. Or I can build an installer with a broken movie capture with unaltered code. Up to you all.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #1189by john71 » 16.01.2022, 15:43

cartrite wrote:How many people use the other video compressors.

You need a compressor to record a full HD video with usable frame rates.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #1190by cartrite » 16.01.2022, 15:54

All the compressors will be broken. They don't work with the fix. They don't work without it either. They record everything upside down.

I don't know where the compressor code is. I couldn't find it. If I could find it, maybe I could figure out how to make it compatible with the fix.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #1191by john71 » 16.01.2022, 17:12

cartrite wrote:If I could find it, maybe I could figure out how to make it compatible with the fix.

Video recording wasn't properly working in the 2021.07.21 version.

It allowed to use only the mkv codec.

So it must be in the code.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #1192by cartrite » 16.01.2022, 17:41

I'm gonna look at the code in 1.6.2 and see if I can figure out how it used to work. If I can't figure anything out I'll build a new installer tonight from the latest git pull. Untouched. 64 and 32. So movie capture will not work correctly.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #1193by cartrite » 17.01.2022, 13:20

I uploaded the new 64and 32 bit installers. Movie Capture will still have problems. The texture/hires folder will still be empty. Enjoy. :smile:

viewtopic.php?p=156142#p156142

Added after 1 hour 5 minutes:
Warning: :insane: I just discovered an issue with the Installers. For some reason, even though the x64 installer is supposed to have C:\Program Files as the default and the x86 installer has C:\Program Files (x86) as the default, this only works for a new installation.

OK. Explanation. Example. I installed the x86 version. Then I tried to install the x64 version. The x86 version was installed in C:\Program Files (x86). The x64 version was also trying to install in the C:\Program Files (x86). If I install the x64 version first, then the x86 version gets installed in C:\Program Files. So they overwrite each other. I'm gonna try and figure this out but it will probably take some time. Be sure to backup your original installation before installing.

Added after 25 minutes 54 seconds:
:oops: Forget the above warning. I forgot to generate a new GUID for the 32 bit installer. I just uploaded the 32 bit installer with a new GUID. The 64 bit was unaffected. They should both get installed in their default folders unless you want them somewhere else.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #1194by john71 » 18.01.2022, 08:04

Same old problems in the 64 bit version. Codecs are working while recording video, but everything is upside down. There are rectangles in the data numbers.

Topic author
onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 6 years 1 month

Post #1195by onetwothree » 18.01.2022, 09:30

I have found the root cause for rectangles and I'm thinking how to fix it properly.

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #1196by john71 » 18.01.2022, 10:05

:clap: :clap: :clap:

Very nice!

Added after 1 hour 39 minutes:
One more thing: in the case of ISS there are NO rectangles, when I'm CLOSER than 1000 km.

Topic author
onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 6 years 1 month

Post #1197by onetwothree » 18.01.2022, 19:51

Yes and that's expected. Celestia internally uses UTF-8, while windows unless you use Win10 released in 2019 or later or Win11 uses 8bit encodings such as cp1251, cp1252 etc. For this particular issue this was not a problem until the recent time (I think MSVC was updated in github actions) because as a thousands separator ASCII symbol was used (comma or period depending on your locale) which had the same code both in UTF-8 and CP125X. Now in some locales the symbol with code > 127 is used which is invalid value for UTF-8.

Added after 41 minutes 28 seconds:
https://github.com/CelestiaProject/Celestia/actions/runs/1714675275 - this build should fix squares. please confirm.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #1198by cartrite » 18.01.2022, 22:06

I can't confirm this works because I never could reproduce the problem. But, john71, be sure to back up the originals. You should be able to copy these files into an installation I uploaded. All the other files should be the same.

fix-square-numbers.zip
(2.06 MiB) Downloaded 663 times


Added after 35 minutes 12 seconds:
I'm sorry john71, I found out that the qt version needed an extra dll. So I tried to upload a new file that included the dll. But uploaded the wrong one. Give me a few minutes. I need to boot into windows to upload the file. I noticed that the file was downloaded once. This is the right file. It contains 2 dll's and 2 exe's.

Added after 15 minutes 26 seconds:
The right file has now been uploaded. :oops:
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #1199by john71 » 19.01.2022, 08:07

It WORKS.

The "rectangles" bug has disappeared!

:clap: :clap: :clap:

Even the old exe file is working perfectly.

Only the "mirror video recording" bug remains.

Added after 59 minutes 36 seconds:

Found a few tips:

It’s very easy to reverse a video using FFmpeg because FFmpeg has a built-in reverse filter that can do this job for both audio and video.

https://ottverse.com/reverse-a-video-using-ffmpeg/

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #1200by cartrite » 19.01.2022, 09:18

john71 wrote:It WORKS.

The "rectangles" bug has disappeared!

:clap: :clap: :clap:

Even the old exe file is working perfectly.
I'm not sure what you mean by that. But probably celestia.dll is what is getting the old exe to work. Glad this worked. :smile:
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4


Return to “Development”