{"id":13566870,"url":"https://github.com/NiklasRosenstein/movrepair","last_synced_at":"2025-04-04T00:32:23.086Z","repository":{"id":43640649,"uuid":"113179593","full_name":"NiklasRosenstein/movrepair","owner":"NiklasRosenstein","description":"Attempts to repair a broken .MOV file using a working reference file","archived":true,"fork":false,"pushed_at":"2019-12-21T08:55:17.000Z","size":32,"stargazers_count":38,"open_issues_count":3,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T02:36:59.477Z","etag":null,"topics":["mov-files","python","quicktime","repair","video"],"latest_commit_sha":null,"homepage":null,"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/NiklasRosenstein.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}},"created_at":"2017-12-05T12:30:35.000Z","updated_at":"2024-12-13T17:05:11.000Z","dependencies_parsed_at":"2022-09-24T22:40:22.847Z","dependency_job_id":null,"html_url":"https://github.com/NiklasRosenstein/movrepair","commit_stats":null,"previous_names":["niklasrosenstein/movrepair"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasRosenstein%2Fmovrepair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasRosenstein%2Fmovrepair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasRosenstein%2Fmovrepair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NiklasRosenstein%2Fmovrepair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NiklasRosenstein","download_url":"https://codeload.github.com/NiklasRosenstein/movrepair/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247103290,"owners_count":20884023,"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","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":["mov-files","python","quicktime","repair","video"],"created_at":"2024-08-01T13:02:18.437Z","updated_at":"2025-04-04T00:32:22.607Z","avatar_url":"https://github.com/NiklasRosenstein.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## movrepair\n\nMovrepair is a script that attempts to repair a broken `.mov` file. In my\nspecific use-case, the video files appeared to be truncated in the middle\nof the Movie Data atom (`mdat`), rendering the size of the `mdat` atom header\ntoo large, and all following atoms were missing (e.g. the important Movie Atom\n`moov` with all metadata).\n\nThis script will take a *working* reference video file and copy all atoms\nexcept for the `mdat` atom, which will be used from the broken input file.\n\n### Usage\n\nTo show the atoms of a (here broken) file:\n\n    $ python movrepair.py 0A3C0B00.MOV\n    file size: 297.5MiB\n    * ftyp (24.0B)\n    * wide (0.0B)\n    * mdat (1.4GiB)\n\nAttempt to repair the file:\n\n    $ python movrepair.py reference.MOV --repair 0A3C0B00.MOV\n    Output file: 0A3C0B00-fixed.MOV\n    Broken file's mdat size adjusted from 1.4GiB to 297.5MiB\n    Adjusting \"mvhd\" duration from 4.5045s to 13.540166666666666s.\n    Adjusting \"mdhd\" duration from 4.5045s to 13.540166666666666s.\n    Adjusting \"mdhd\" duration from 4.5045s to 13.540166666666666s.\n    Adjusting \"mdhd\" duration from 4.5045s to 13.540166666666666s.\n    Adjusting sample count from 216216 to 649928\n    Extending b'in24' chunk offset table\n    Adjusting sample count from 135 to 405\n    Extending b'AVdh' chunk offset table\n    Extending b'AVdh' sample size table\n    stsz count: 405\n    Removing tmcd track\n    Updated moov atoms: mvhd, tkhd, tkhd, tkhd, elst, elst, elst, mdhd, mdhd, mdhd, stts, stco, stts, stco, stsz\n\nIf the \"repaired\" file still does not work, try using a video file that is\nat least as long as the file you're trying to repair and pass the\n`--no-fix-metadata` option.\n\n    $ python movrepair.py reference.MOV --repair 0A3C0B00.MOV --no-fix-metadata\n    Output file: 0A3C0B00-fixed.MOV\n    Broken file's mdat size adjusted from 1.4GiB to 297.5MiB\n\n__Disclaimer__: Use at your own risk.\n\n### Synopsis\n\n```\nusage: movrepair.py [-h] [-o OUTPUT] [-R REPAIR] [--no-fix-metadata]\n                    [--dump-moov]\n                    file\n\npositional arguments:\n  file                  A working video file. If no additional options are\n                        specified, the to-level atoms of this file will be\n                        displayed.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -o OUTPUT, --output OUTPUT\n                        The repaired output filename.\n  -R REPAIR, --repair REPAIR\n                        A file to repair using the working input file.\n  --no-fix-metadata     Don't try to fix the `moov` atom metadata duration and\n                        sample counts. This will require the input FILE to be\n                        the same length or longer than the REPAIR file.\n  --dump-moov           Dump the input FILE's `moov` atom to stdout.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNiklasRosenstein%2Fmovrepair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNiklasRosenstein%2Fmovrepair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNiklasRosenstein%2Fmovrepair/lists"}