-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
FYI: filename encoding documented - full list of flags #72
Comments
@sven337 that is very instresting, thanks a lot for sharing! Did you perhaps also look into the file names of the Reolink Home Hub? |
Let me know where to find the firmware and show me the filename pattern, and I may be able to figure it out. |
The firmware is on the reolink download center: https://reolink.com/download-center/?srsltid=AfmBOor3BU5F6iWv9p1mMWavhnPrtjGFN2QigYLOH4eaepdvwtnU-eMS Device name: Reolink Home Hu I will give you a filenmae pattern as soon as possible, I don't have my Home Hub plugged in right now and am working on way too many issues at the same time at the moment... |
Thanks, I have the firmware bits, and it looks like the relevant functions are indeed different. As for the flags from the camera, here's how I'm decoding them: |
@sven337 sorry for the delay, this is the filename of a recording from the Reolink Home Hub (I replaced the UID and camera name): First I thought the last 6 chars would be the tags so I made a list of those tags for diffrent events:
But I could not find a logical pattern in this.... |
I will defenitely use the decoding you wrote, it looks way nicer. |
For a Argus Track (dual lens camera) the recording on the Home Hub has the following names:
For the sub/main stream of both lenses |
Here are my findings: https://github.com/sven337/ReolinkLinux/wiki/Figuring-out-the-file-names#filename-structure-for-reolink-home-hub In my link you can find the flags you are looking for:
|
@sven337 thank you very much for figuring this all out, I wrote some initial code here: reolink_aio/reolink_aio/typings.py Lines 403 to 544 in 6d22f8e
It works on "normal" Reolink cams, but on the Home Hub it does not work. |
As far as I can tell your implementation of flags isn't quite correct: the home hub and cameras use different flags. The table of versions for the hub is different (it's a different namespace, in a way). Your flag is sometimes 0x33C820000 in your own examples, which IIRC corresponds to ai_other (don't ask me what that is! it's not animal, not face, not vehicle and not person....). But I agree it is strange that they all use the same. Can you share more examples of hub filenames please, along with framerates for each video?
since I'm reasonably certain your videos are not at 60FPS like originally decoded. :) Though even 30 seems like a lot. FPS info would therefore help me align things. I do not know why you don't get trigger data. |
Note, the cameras have been updated to a new version of the encoding, version 9. I haven't yet decoded the extra set of flags, they're always zero on my camera anyway so I do not care much. Probably same flags as the home hub (package events). |
@sven337 I have updated the decoding of the recording names in the reolink_aio lib: reolink_aio/reolink_aio/typings.py Lines 430 to 563 in cbcc1ab
I think it should now work a bit better. The most noticible improvement I have made is to reverse the binary hex value and adjust all mappings acordingly. That makes sure the first bit accross all versions is always the Therefore the offset does not need to be adjusted between versions anymore. reolink_aio/reolink_aio/typings.py Line 465 in cbcc1ab
reolink_aio/reolink_aio/typings.py Line 471 in cbcc1ab
I am not so good in all the binary operations, so this can proably be done more ellegantly, faster and more compact, but in any case this works and should make the decoding a lot more resilient against future version changes. |
Nice job, it is better to have flipped things indeed. My version is the product of the reverse engineering but I wasn't exactly focused on doing something nice either, I only wanted something that worked :) |
Hello,
FYI, I looked at the Reolink FW and figured out the encoding of the file names in its entirety.
Of interest in particular would be the list of attributes:
https://github.com/sven337/ReolinkLinux/wiki/Figuring-out-the-file-names#attributes
The text was updated successfully, but these errors were encountered: