×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Cannot play back SER videos?

Sorry should have been more clear. For INDI, use set follow-fork-mode child. For KStars, this option must be disabled. Just edit the settings and add # next to it to disable it. Unfortunately, QtCreator does not support per-project GDB settings, so you'd just have to remember to check the setting when you open INDI or KStars in there. Open two qtcreators, one for KStars (with the option disable) and for one INDI (option enabled) and then it should work as expected.
The following user(s) said Thank You: Stefan R.
3 years 11 months ago #51697

Please Log in or Create an account to join the conversation.

  • Posts: 77
  • Thank you received: 1
I can report that I experience the exact same error with videos recorded with my ZWO ASI 294MC Pro camera (and actually also using the CCD Simulator!).
How can I change the SER-file header to see if that helped?
SkyWatcher ED80 Pro
Skywatcher HEQ5 Pro with Rowan Belt Mod with EQDIR cable
ZWO ASI294MC Pro imaging camera
QHY5L-II-C guide camera on 50mm guidescope
DeepSkyDad AF3 autofocuser
Raspberry Pi 4 4GB running Kstars/Ekos
3 years 11 months ago #51818

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 31
In my case I was not able to recover the video files by modifying the SER-file header.
My camera has a 12 bit ADC but the INDI camera driver only allows to configure streaming as 8-bit or 16-bit.
Unfortunately, when configured to 16-bit, the output SER-files are corrupted beyond repair with my camera.
But when configured to 8-bit it works fine. (as long as I don't zoom the streaming)

I think we are experiencing an issue similar to what is described here (but that issue is regarding FITS files and another piece of software so it is not exactly the same):
www.astropixelprocessor.com/community/ma...n-16-bit-fits-files/

I am still planning to debug and see if I can figure out exactly where in the code it happens.
But I have not had the time to focus on it yet.
Last edit: 3 years 11 months ago by Stefan R..
3 years 11 months ago #52049

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 31
But if you want to try and see if you can save your files by modifying the SER-file header you can download a hex editor like HxD and edit the SER-file.
I found that information about the resolution of the video is found at Offset = 00000010
column 0A-0B = pixel resolution X = 0050 = 1280
column 0E-0F = pixel resolution Y = C003 = 960

And information about bit depth is found at Offset = 00000020
column 02 = bit depth = 08

And you can use an online tool like www.save-editor.com/tools/wse_hex.html to convert your decimals to HEX.
For example type 960 in the Decimal number field and check "Little Endian" checkbox and click "DEC to HEX" button to see that 960 for example should be written as C003 in the SER-file Header as Hex.

However, as I mentioned I was not able to save my files by adjusting the bit-depth in the header.
Last edit: 3 years 11 months ago by Stefan R..
3 years 11 months ago #52051

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 31
To sum up I have identified these streaming issues:
1. SER video data is always being dumped as full resolution data by INDI even though subframe/crop is configured in Ekos CCD module. Sub framing does not currently work.
2. SER video data is always being dumped as 8-bit data by INDI which may be "works as designed"(?), but unfortunately the bit depth written to the SER File Header is the bit depth that is configured in the INDI Control panel and not the actual bit depth of the data dumped in the file. This corrupts the files.
3. SER video data is always being dumped as full resolution data by INDI, but the video width and height that is written to the SER File Header is the width and height configured in the INDI Control panel and not the actual width and height configured in the Ekos CCD Module in the "Frame" and "Size" fields. This corrupts the files.

Debugging #1
I did a little bit of debugging today and here is what I found so far regarding issue #1.

When connecting KStars to Indi Server we enter
StreamManager::setSize - Here frame size is set based on the "Resolution" setting in INDI control panel on the "Controls" tab for the camera (for my camera default is 1280 x 960 pixels).

and we also enter
StreamManager::setPixelFormat - Here pixelformat is set based on the "Format" setting in INDI control panel on the "Controls" tab for the camera (for my camera default is Mono 16-bit).

In Kstars -> Ekos CCD Module I updated these values from the default values (default values in these fields before my update were Frame X: 0 Y: 0 and Size W: 1280 H: 960)
I updated the values to:
Frame X: 100 Y: 100
Size W: 640 H: 480

And then I clicked the "Live Video" button and start recording and then we enter
StreamManager::newFrame

From here we enter
StreamManager::asyncStream

And in here
npixels is calculated to be 1228800 and nbytes is 2457600 (as received via NewFrame parameter).
I don't know enough about the math behind this to tell if these numbers are right or wrong.

Then we enter
StreamManager::uploadStream

In here SubX, SubY, SubW and SubH are set to:
SubX=0
SubY=0
SubW=1280
SubH=960


A bit later there is an if expression with this comment:
// Check if we need to subframe

The conditions of the if expression are not met due to the values that was set above (they were set incorrect in my opinion).

However, the image is uploaded to the client (full frame) and control is returned to
StreamManager::asyncStream

Since isRecording() is true, we enter
StreamManager::recordStream

The parameters are:
buffer 2
nbytes 1228800

And we quickly enter
SER_Recorder::writeFrame

where the frame is written and we are done processing this frame.

My Thoughts
It looks like the values filled out in Ekos -> CCD module in the Frame and Size fields never gets passed on to INDI and this is why INDI always dumps full resolution data.
But I have not found out why the SER File Header gets the correct values. Maybe Jasem knows where that part is done?

Anyway, the combination of the right resolution values in the SER File Header (compared to what the user expects) and the "wrong" resolution of the actual SER video data dumped in the file causes the files to be corrupted.

I know too little about INDI and Kstars/Ekos to be able to figure out a good solution. I don't know if it is possible to update the properties used to set the SubX, SubY, SubW and SubH values with the values from the Ekos CCD module when the recording is started or when the live view button is clicked.
But if it is possible I guess it might solve both issue #1 and issue #3.

To solve issue #2 it would be nice to know where in the code the SER File Header is written. If it is "works as designed" that INDI always dumps 8-bit SER Video data in the files, then 8-bit should always be written as bit depth in the SER File Header. That would solve issue #2.

However, I would prefer if it was possible to dump 16-bit and 12-bit SER Video data in the files and have the correct bit-depth in the SER File Header. But the above solution is much better than the way it currently works, so this last part could be a feature request for future version.
3 years 11 months ago #52700

Please Log in or Create an account to join the conversation.

Thank you for the investigation! So in INDI v1.8.5 I updated the stream manager code a bit so that now it does not downscale from 16 to 8 when recording (only done for the streaming frame). I haven't yet check the cropping/ROI part, I know this works for streaming but have to check for recording as well.
The following user(s) said Thank You: Jim, Stefan R.
3 years 10 months ago #52888

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 31
I was out last night after upgrading all software on the StellarMate.
I shot some videos of the moon.

This time i experienced KStars crashing after a very short time with LiveView open when the camera setting was Mono 16-bit (this is a new issue, maybe related to the change knro mentioned above).
After trying a few times with the same result I changed my setting to Mono 8-bit and that still works fine with Live View.

I don't know if I can avoid the crashing if i play around with the USB speed for the camera, but I guess I will give it a try next time.

However, I continued shooting movies of the moon with Mono 8-bit.
If I use the "drag a subframe" functionality on the live view, the SER video files are still corrupted, but that makes sense since you mentioned above that you did not look at it yet.

Full frame recording in Mono 8-bit works fine as it has all the time.
The following user(s) said Thank You: Jasem Mutlaq
3 years 10 months ago #53251

Please Log in or Create an account to join the conversation.

  • Posts: 910
  • Thank you received: 86
I just started playing with planetary... Can confirm that "If I use the "drag a subframe" functionality on the live view, the SER video files are still corrupted" is still not good.
-- Max S
ZWO AM5. RST-135. AZ-GTI. HEQ5. iOptron SkyTracker.
TPO RC6. FRA400. Rokinon 135 and other lenses.
ZWO ASI2600MC. D5500 modified with UVIR clip-in filter.
ZWO ASI120MM Mini x 2. ZWO 30F4 guider. Orion 50mm guider.
ZWO EAF x 2.
3 years 7 months ago #58958

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 31
Yes, for that reason I only use KStars/Ekos for Deep Sky Photography.
It works fantastic for that purpose.

But when I do planetary, I always use FireCapture.
It would be nice if the video recording feature of Ekos could integrate with FireCapture somehow.
Or if the issues with video recording could be fixed.

FireCapture is very resource demanding on a Raspberry Pi.
3 years 7 months ago #58960

Please Log in or Create an account to join the conversation.

  • Posts: 910
  • Thank you received: 86
Yes. I installed and tried FireCapture on RPI4 once - it is very resource demanding.
Don't want to go to Windows for that. Would be really nice if StellarMate provided some useful tool for video capture.
-- Max S
ZWO AM5. RST-135. AZ-GTI. HEQ5. iOptron SkyTracker.
TPO RC6. FRA400. Rokinon 135 and other lenses.
ZWO ASI2600MC. D5500 modified with UVIR clip-in filter.
ZWO ASI120MM Mini x 2. ZWO 30F4 guider. Orion 50mm guider.
ZWO EAF x 2.
3 years 7 months ago #58962

Please Log in or Create an account to join the conversation.

  • Posts: 216
  • Thank you received: 120
You can try using oacapture for planetary. I use it on my NUC. I haven't tried it yet on a RPI4 yet.
3 years 7 months ago #58977

Please Log in or Create an account to join the conversation.

I added this to my TODO, hopefully I'll get time to tackle it shortly.
3 years 6 months ago #58994

Please Log in or Create an account to join the conversation.

Time to create page: 1.682 seconds