wyzev3 recording path format string (iCamera) #780
corbolais
started this conversation in
Development
Replies: 2 comments 2 replies
-
won’t changing the path break the wyze app playback from sd card, and it’s ability to purge oldest recordings when the sd card nears capacity?what if you just create and manage soft links, i.e. from /mmc/record/2024-07-27 to /mmc/record/20240727RobOn Jul 27, 2024, at 11:21 AM, Corbo ***@***.***> wrote:
Hi there,
I'd like to have my wyzes record to a different path. Stock recording path is '/mmc/record/20240727/16/40.mp4'. I need it to be in ISO8601 format, like '/2024-07-27/16/' or maybe even better like '/2024/07/27/16/'.
Does anyone have some recon about formatting options in this system? My assumption is, this is strictly happening in /system/bin/iCamera. Looking at this binary through the strings glasses is revealing a suitable list of format strings:
***@***.***:~]# strings /system/bin/iCamera | grep "%04d%02d%02d"
%s/%s/%04d%02d%02d/%02d/%02d.mp4
%s/%s/%04d%02d%02d/%02d/
%s/%s/%04d%02d%02d/
%s/%s/%04d%02d%02d
cp %s %s/%04d%02d%02d_%02d_%02d_%02d.jpg
%s/%s/%04d%02d%02d/%02d
%s/%s/%04d%02d%02d/Metrics/%02d%02d%02d.txt
%s/record/%04d%02d%02d/
%s/%s/%04d%02d%02d/%02d%02d.txt
Now, for consistency, these should get modified all the same way. Which would be achieved.. by patching iCamera even more.
Assuming the leading root "/" which is missing from any such format string is prefixed, I'd do something like '%s/%04d-%02d-%02d/%02d.mp4'
There's also a '%s/record/%04d%02d%02d/' format string. Might be the mounting dir string? This could be modified to be just
'%s/%04d-%02d-%02d/'. The "Metrics" format string could also just be remodeled. BTW, I'hoping this host of similar format strings is stemming from a compiler macro expansion. More likely though is that's just hardcoded all over the place. Long lives good coding hygiene. Yummy!
Anyway, shortening the format string it is, to squash these hyphens in. Which also means moving the mounting point to some single level depth like '/m/', postfixing with a sly '\0'.
The LCD seems to be '%s/%s/%04d%02d%02d/' (except the record path), becoming '%s/%04d-%02d-%02d/%02d/' (as in 'm/2024-07-27/16/'). This record path format string would be just the same format string (yielding 'm/2024-07-27/16/') after patching.
Just noticed that losing '/%s' gives us only three more chars being one short for the '\0'. sigh Sacrificing the trailing '%02d' might be a way. Except that there are two format string lacking exactly this postfix. Oh, dear..
Any ideas, input anyone?
cheers
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
update: LCD is in fact '%s/%s/%04d%02d%02d' (w/o a trailing "/").
Dang. Halfway through the table I realized the format string cannot omit a format as the number of arguments remains constant. Doh. :-D So, link farming it is after all. Maybe fetching via RTSP and storing files within a specifically formatted fs tree is the way to go, leaving iCamera saved files out entirely. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I'd like to have my wyzes record to a different path. Stock recording path is '/mmc/record/20240727/16/40.mp4'. I need it to be in ISO8601 format, like '/2024-07-27/16/' or maybe even better like '/2024/07/27/16/'.
Does anyone have some recon about formatting options in this system? My assumption is, this is strictly happening in /system/bin/iCamera. Looking at this binary through the
strings
glasses is revealing a suitable list of format strings:Now, for consistency, these should get modified all the same way. Which would be achieved.. by patching
iCamera
even more.Assuming the leading root "/" which is missing from any such format string is prefixed, I'd do something like '%s/%04d-%02d-%02d/%02d.mp4'
There's also a '%s/record/%04d%02d%02d/' format string. Might be the mounting dir string? This could be modified to be just
'%s/%04d-%02d-%02d/'. The "Metrics" format string could also just be remodeled. BTW, I'hoping this host of similar format strings is stemming from a compiler macro expansion. More likely though is that's just hardcoded all over the place. Long lives good coding hygiene. Yummy!
Anyway, shortening the format string it is, to squash these hyphens in. Which also means moving the mounting point to some single level depth like '/m/', postfixing with a sly '\0'.
The LCD seems to be '%s/%s/%04d%02d%02d/' (except the record path), becoming '%s/%04d-%02d-%02d/%02d/' (as in 'm/2024-07-27/16/'). This record path format string would be just the same format string (yielding 'm/2024-07-27/16/') after patching.
Just noticed that losing '/%s' gives us only three more chars being one short for the '\0'. sigh Sacrificing the trailing '%02d' might be a way. Except that there are two format string lacking exactly this postfix. Oh, dear..
Any ideas, input anyone?
cheers
Beta Was this translation helpful? Give feedback.
All reactions