{"id":15472365,"url":"https://github.com/ammaraskar/simsreiaparser","last_synced_at":"2025-08-08T17:10:24.850Z","repository":{"id":63980080,"uuid":"571044053","full_name":"ammaraskar/SimsReiaParser","owner":"ammaraskar","description":"Libraries to parse and encode .reia file for sims2","archived":false,"fork":false,"pushed_at":"2025-02-16T15:31:47.000Z","size":620,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-30T20:36:32.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ammaraskar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-27T00:53:28.000Z","updated_at":"2025-04-21T16:00:56.000Z","dependencies_parsed_at":"2025-03-09T14:46:42.496Z","dependency_job_id":null,"html_url":"https://github.com/ammaraskar/SimsReiaParser","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ammaraskar/SimsReiaParser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammaraskar%2FSimsReiaParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammaraskar%2FSimsReiaParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammaraskar%2FSimsReiaParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammaraskar%2FSimsReiaParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ammaraskar","download_url":"https://codeload.github.com/ammaraskar/SimsReiaParser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ammaraskar%2FSimsReiaParser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269457772,"owners_count":24420289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T02:36:03.033Z","updated_at":"2025-08-08T17:10:24.789Z","avatar_url":"https://github.com/ammaraskar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimsReiaParser\nLibraries to parse and encode .reia file for sims2\n\nhttps://user-images.githubusercontent.com/773529/204124123-9a72bdbb-1de3-4cf7-a1da-d0724fc9d3bc.mp4\n\n## Format Details\n\n`.reia` files are how Sims2 stores the videos for its neighborhood previews in\nits main menu. They seem to be a relatively custom format, this is an overview\non how it encodes video data:\n\n### Header\n\n`.reia` files first have a header with metadata, the fields are:\n\n\n| Offsets       | Type   | Description (values in hex)                                   |\n|---------------|--------|---------------------------------------------------------------|\n| `0x00 - 0x03` | Magic  | `52 49 46 46` \"RIFF\"                                          |\n| `0x04 - 0x07` | uint32 | Size of the \"chunk\" which is the rest of the file             |\n| `0x08 - 0x0f` | Magic  | `52 65 69 61 68 65 61 64` \"Reiahead\"                          |\n| `0x10 - 0x13` | uint32 | `18` Size of the metadata to follow (always 24 in practice)   |\n| `0x14 - 0x17` | uint32 | `01` Unknown, always 1                                        |\n| `0x18 - 0x1b` | uint32 | Horizontal resolution in pixels                               |\n| `0x1c - 0x1f` | uint32 | Vertical resolution in pixels                                 |\n| `0x20 - 0x23` | uint32 | Frames per second numerator (see below)                       |\n| `0x24 - 0x27` | uint32 | FPS denominator. FPS given by `fps_numerator/fps_denominator` |\n| `0x28 - 0x2b` | uint32 | Number of frames in the file                                  |\n| `...`         | frames | See below                                                     |\n\n### Frames\n\nAfter the header, there are a sequence of frames. Each frame is \n\n| Offsets       | Type       | Description (values in hex)      |\n|---------------|------------|----------------------------------|\n| `0x00 - 0x03` | Magic      | `66 72 6d 65` \"frme\"             |\n| `0x04 - 0x07` | uint32     | Size of the frame data to follow |\n| `...`         | Frame Data | See below                        |\n\nNote that the frame data is padded to be 2-byte aligned. So if the frame size\nwas `3`, there will be `4` bytes of data **instead of 3** before the next\n`frme` magic bytes.\n\n### Frame Data - Run Length Encoding\n\nThe format uses some interesting tricks for compression: run-length encoding,\nencoding differences in pixel values between frames and reusing blocks of pixels\nthat stay the same.\n\nEach pixel has a standard 24-bit color depth storing 8-bits for the RGB channels\nin little endian.\n\nImages are stored in blocks of `32x32` pixels. So a reia file with a resolution\nof `128x128` is constructed of `4x4 = 16` blocks. Each block is parsed as\nfollows:\n\n* A single byte is read. `0` indicates this `32x32` block should be reused from\n  the previous frame. Any other value means the block data is to follow.\n\n* A byte is read and treated as a signed 8-bit integer `n`:\n    - If the value is negative, then a single pixel value should be read and\n      repeated `(-n) + 1` times.\n    - If the value is positive, then `n + 1` unique pixel values should be read.\n\n* The pixel values retrieved are *relative* to the previous frame unless it is\n  the first frame of the file. So a change from a red value of `200` to `205` is\n  encoded as `5`. A change from `255` to `0` is encoded as `1`.\n  \n  In order to get the actual pixel value you must use `(previous + current) \u0026 0xFF`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammaraskar%2Fsimsreiaparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fammaraskar%2Fsimsreiaparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fammaraskar%2Fsimsreiaparser/lists"}