Ring Security Cameras

Browse posts, comment, and join in the discussion about Ring’s indoor and outdoor cameras.
M
How to interpret the timestamp in filename in downloaded files
app-settings
troubleshooting

Hi I had to, one at a time :-(, to download 543 videos, not I need to be able to label to file names correctly. i.e. the downloaded file from Ring: 1272036\_6870141820246961153\_stamp.mp4 How do I translate the filename to a proper yyyyMMddhhmmss name? Thanks

7214

0

10

28-09-2020 07:50:49

Responses (9)

  • M

    Hey there, @MichaelGaarde. Although it sounds like you've already downloaded the files you need, this can be done automatically, on certain operating systems, with the Ring app. When downloading from an IOS mobile device or via web browser, these file names are not formatted. If you have an Android mobile device or a Mac OSX computer, downloading videos from the Ring app on these devices will automatically name the file with date/ time. As we value our neighbours' feedback, we've created a [Feature Request board](https://community.ring.com/t5/Feature-Request-Board/idb-p/Feature_Request_Board). If you see this as being useful on all platforms, feel free to request it there. This will allow other neighbors to comment and add interest, all in one place, so we can share it with our teams here. :)

    0

    28-09-2020 11:36:07

      A

      Hi, I'd like to reiterate this question: Your response explains options for downloading them. But I have \*already\* downloaded hundreds of videos, only to realize there's no metadata at all, and the filenames seem to be random. So, the original question is, how can we interpret the filenames? Are they some funky format taht we can interpret into the video's original time and date? I mean, Ring certainly knows how useless this is for archival/record-keeping to have hundreds of surveillance cam videos with no way to navigate them by time/date. Right?

      1

      30-11-2020 11:25:28

  • E

    Hi Michael, the translation is simple, just convert the 6870141820246961153 number to hexa, use eight MSB bytes, convert to decimal, multiply by 1000 and convert th result from system time to date time. Your downloaded file was recorder on Tue Sep 08 2020 15:39:02 Regards, Michael

    4

    30-01-2021 06:30:47

      W

      WOW, but still sounds GREEK to me. Why can't Ring just make it easy on its users and rename all the files for us? Hate it when a company is NOT customer-centric/friendly

      0

      11-05-2021 09:20:41

      M

      Yep it is a basic hiccup... and well meaning as some of the replies have been, there are not much use to a non-technical user -Scripts, Shells, Python, $$$ :-)

      1

      08-06-2021 10:50:05

  • S

    For anyone still looking for this, I created a PowerShell Script to rename the files. function Convert-RingNameToDate { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=0, HelpMessage='Please add a help message here')] [System.Int64] $number ) $bits = [Convert]::ToString($number,2) $MSB = [string]$bits[0..30] -replace(' ','') $Dec = [convert]::ToInt64($MSB,2) $Epoch = Get-Date -Date "01/01/1970" $DateTime = $Epoch.AddSeconds($Dec) return (Get-date ($DateTime) -Format YYYY-mm-dd-HH-mm-ss) } $Folder = "D:\Temp\Ring" $Items = Get-ChildItem $Folder -Filter *.mp4 -Recurse Foreach ($item in $Items){ $newname = "$(Convert-RingNameToDate($item.BaseName)).mp4" if (-not (Test-Path "$($item.DirectoryName)\$($newname)") ){ $item | Rename-Item -NewName $newname } } To use: Where I download the videos in a ZIP file, and they are named: 6946548309236321348.mp4 Change $Folder to the location of your Ring Video files. You can modify the format of the filename from "yyyy-MM-dd-HH-mm-ss" to anything you like. [PowerShell date formatting](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7.1#example-3--get-the-date-and-time-with-a--net-format-specifier) One more thing: I found the conversion to date/time was in UTC. If you wish to add or remove hours edit the line: $DateTime = $Epoch.AddSeconds($Dec) to $DateTime = $Epoch.AddSeconds($Dec).AddHours(-5) # CST

    2

    11-04-2021 11:46:21

      V

      Thanks for writing the Powershell script! Only the format method was not correct. return (Get-date ($DateTime) -Format "yyyy/MM/dd HH:mm K")

      0

      30-04-2021 08:59:05

      W

      Hi there. I just saw that the Ring Video file names are now in the form: Ring_542010902_2123_7079275696466310081.mp4 Can you updated your PowerShell script to cater for this new format? Much thanks! I could not get the script above to run, but will post the results on a separate post (to convert older videos using the older format of something like 7079275696466310081.mp4)

      0

      29-03-2022 02:26:00

      U

      Workaround: Use advancedrenamer.com and rename the file with replace method with this setting: Text to be replaced: `(.*)_(.*)_(.*)_(.*)` Replace with:` \3_\4_stamp` Use regular expressions :white_check_mark: Then apply the skript from above.

      0

      15-04-2022 05:17:29

      W

      Hi. I just following up on this thread. Does this advancedrenamer.com app still work? When you say "Then apply the skript from above", what specific script are you referring to and how do you "apply" it? TY!

      0

      29-08-2023 06:06:39

  • V

    And for who is interrested, I've converted the Powershell script to a Python3 version: import datetime def ConvertDingIdToDateTime(dingId): bits = format(dingId, '0>42b') MSB = bits[0:31] dingDateTime = datetime.datetime.fromtimestamp(int(MSB,2)) return dingDateTime

    1

    30-04-2021 09:00:21

      D

      I don't suppose you have the full script for this? I cannot get it to work for me

      0

      03-08-2021 02:59:43

      A

      Thanks to @vorigeweek for the Python bit! Here's *a* full script @Dan5ive. It's insanely ugly but I was in a hurry to get something to work. ``` from os import listdir from os.path import isfile, join import datetime import os def ConvertDingIdToDateTime(dingId): bits = format(dingId, '0>42b') MSB = bits[0:31] dingDateTime = datetime.datetime.fromtimestamp(int(MSB,2)) return dingDateTime # Make sure this path contains the videos you want to convert the filenames of my_path = "C:/Ring/" only_files = [f for f in listdir(my_path) if isfile(join(my_path, f))] for f in only_files: # Just in case file name has already been converted if "stamp" in f: old_file_name = my_path + f # Assumes files are in this format: 71155064_7033625730319564493_stamp.mp4 # Removes everything before the first underscore # Removes everything after the second underscore # Converts datetime to string in yyyy-mm-dd_hh_mm_ss format # Prepends path and appends .mp4 extension new_file_name = my_path + ConvertDingIdToDateTime(int(f.split('_', 1)[-1].split('_', 1)[0])).strftime("%Y-%m-%d_%H-%M-%S") + ".mp4" os.rename(old_file_name, new_file_name) ```

      0

      27-11-2021 03:26:29

  • W

    How do I request Ring do the conversion for us non-technical folk (I would think a MAJORITY of users are in this camp) so the videos are named something like: 20210715-201523.mp4 where the video was taken on July 15, 2021 at 8:15:23PM ? AFAIK, Samsung smartphones and some cameras already name their files this way (or very similar).

    1

    17-07-2021 08:50:05

    Didn't find an answer ?

    Log in or create your Ring account to post a question and join in the on the conversation.

    Most Helpful Members

    U

    user63814

    2

    User
    Solutions

    B

    Boone

    1

    User
    Solution

    J

    j0hnmsch

    1

    User
    Solution

    J

    Justin_Ring

    1

    User
    Solution