{"id":24905967,"url":"https://github.com/toxe/diff-video-ps1","last_synced_at":"2025-03-27T21:49:20.854Z","repository":{"id":273613970,"uuid":"919557122","full_name":"Toxe/diff-video-ps1","owner":"Toxe","description":"Compare two videos frame by frame and generate a difference video.","archived":false,"fork":false,"pushed_at":"2025-01-31T10:15:56.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T10:30:00.952Z","etag":null,"topics":["diff","diff-video","frames","powershell","video","video-diff","windows"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/Toxe.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":"2025-01-20T15:58:07.000Z","updated_at":"2025-01-31T10:15:59.000Z","dependencies_parsed_at":"2025-01-22T00:19:52.266Z","dependency_job_id":"1e024ed6-1125-4a0c-aacf-8477117b8512","html_url":"https://github.com/Toxe/diff-video-ps1","commit_stats":null,"previous_names":["toxe/powershell-diff-video","toxe/diff-video-ps1"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxe%2Fdiff-video-ps1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxe%2Fdiff-video-ps1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxe%2Fdiff-video-ps1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Toxe%2Fdiff-video-ps1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Toxe","download_url":"https://codeload.github.com/Toxe/diff-video-ps1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245931751,"owners_count":20695961,"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":["diff","diff-video","frames","powershell","video","video-diff","windows"],"created_at":"2025-02-02T00:26:27.816Z","updated_at":"2025-03-27T21:49:20.819Z","avatar_url":"https://github.com/Toxe.png","language":"PowerShell","readme":"# Diff-Video PowerShell Script\n\nCompare two videos frame by frame and generate a difference video and a montage video of the input and diff videos side by side.\n\n\u003e Note: While PowerShell is also available for Linux and macOS I only tested this on Windows.\n\n## Dependencies\n\n- PowerShell 7 or greater\n- [FFmpeg](https://ffmpeg.org)\n- [ImageMagick](https://imagemagick.org)\n- [MediaInfo](https://mediaarea.net/en/MediaInfo)\n\n## Example\n\nThe following commands are all equivalent and will create two files: `diff.mp4` and `diff_montage.mp4`.\n\n```powershell\nPS\u003e \u0026 .\\diff_video.ps1 .\\video1.mp4 .\\video2.webm diff.mp4\nPS\u003e \u0026 .\\diff_video.ps1 -Video1 .\\video1.mp4 -Video2 .\\video2.webm -Output diff.mp4\nPS\u003e \u0026 .\\diff_video.ps1 -Video1 .\\video1.mp4 -Video2 .\\video2.webm -Output diff.mp4 -Montage diff_montage.mp4\n```\n\n```\nParameters:\n  Video1: .\\video1.mp4\n  Video2: .\\video2.webm\n  Output: diff.mp4\n  Montage: diff_montage.mp4\n  WorkDir: C:\\Users\\toxe\\AppData\\Local\\Temp\\cehzzfjr.e3r\n  Jobs: 24\n  FFmpegThreads: 12\n  IMagickThreads: 2\n  DontDeleteWorkDir: False\n  NoDiffVideo: False\n  NoMontageVideo: False\n\nchecking video framerates...\n  video 1: 59.94 FPS (60000/1001)\n  video 2: 59.94 FPS (19001/317)\n  (0.210 seconds)\n\nextracting frames...\n  video 1: extracting 1224 frames\n  video 2: extracting 1224 frames\n  video 1 frames: 1224\n  video 2 frames: 1224\n  (26.665 seconds)\n\ngenerating diffs...\n  generated 1224 diffs\n  (92.923 seconds)\n\nchecking if diffs need to be normalized...\n  diffs need to be normalized\n  (0.010 seconds)\n\ncalculating min/max intensity...\n  min intensity: 0\n  max intensity: 39321\n  (10.843 seconds)\n\nnormalizing diffs...\n  (40.849 seconds)\n\nrendering diff and montage video simultaneously...\n  (43.352 seconds)\n\ndeleting work directory...\n  (1.932 seconds)\n```\n\n## Help\n\n```powershell\nPS\u003e Get-Help .\\diff_video.ps1 -Detailed\n```\n\n```\nNAME\n    diff_video.ps1\n\nSYNOPSIS\n    Compare two videos frame by frame and generate a difference video.\n\n\nSYNTAX\n    diff_video.ps1 [-Video1] \u003cString\u003e [-Video2] \u003cString\u003e [-Output] \u003cString\u003e [[-Montage] \u003cString\u003e]\n    [[-WorkDir] \u003cString\u003e] [[-Jobs] \u003cInt32\u003e] [[-FFmpegThreads] \u003cInt32\u003e] [[-IMagickThreads] \u003cInt32\u003e]\n    [-DontDeleteWorkDir] [-NoDiffVideo] [-NoMontageVideo] [\u003cCommonParameters\u003e]\n\n\nPARAMETERS\n    -Video1 \u003cString\u003e\n        The first video.\n\n    -Video2 \u003cString\u003e\n        The second video.\n\n    -Output \u003cString\u003e\n        The name of the difference video.\n\n    -Montage \u003cString\u003e\n        (Optional) Filename of a montage video combining the two input videos and the diff.\n\n    -WorkDir \u003cString\u003e\n        (Optional) A working directory where all the temporary files will be created.\n        Per default a temporary directory will be created and deleted afterwards.\n        Setting this option implies \"DontDeleteWorkDir\".\n\n    -Jobs \u003cInt32\u003e\n        (Optional) Number of parallel jobs.\n        Default: Number of logical CPU cores.\n\n    -FFmpegThreads \u003cInt32\u003e\n        (Optional) Number of FFmpeg threads when extracting frames.\n        Default: Half the number of logical CPU cores.\n\n    -IMagickThreads \u003cInt32\u003e\n        (Optional) Number of threads for each ImageMagick process.\n        Default: 2\n\n    -DontDeleteWorkDir [\u003cSwitchParameter\u003e]\n        Don't delete the working directory at the end of the script.\n        This option is implied when manually setting \"WorkDir\".\n\n    -NoDiffVideo [\u003cSwitchParameter\u003e]\n        Don't render the difference video.\n\n    -NoMontageVideo [\u003cSwitchParameter\u003e]\n        Don't render the montage video.\n\n    \u003cCommonParameters\u003e\n        This cmdlet supports the common parameters: Verbose, Debug,\n        ErrorAction, ErrorVariable, WarningAction, WarningVariable,\n        OutBuffer, PipelineVariable, and OutVariable. For more information, see\n        about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).\n\n    -------------------------- EXAMPLE 1 --------------------------\n\n    PS \u003e \u0026 .\\diff_video.ps1 -Video1 video1.mp4 -Video2 video2.mp4 -Output diff.mp4\n\n    Compare video1.mp4 and video2.mp4 and generate a new difference video called diff.mp4.\n\n\n\n\n    -------------------------- EXAMPLE 2 --------------------------\n\n    PS \u003e \u0026 .\\diff_video.ps1 video1.mp4 video2.mp4 diff.mp4\n\n    Same as the previous example but without the named parameters.\n\n\n\n\nREMARKS\n    To see the examples, type: \"Get-Help .\\diff_video.ps1 -Examples\"\n    For more information, type: \"Get-Help .\\diff_video.ps1 -Detailed\"\n    For technical information, type: \"Get-Help .\\diff_video.ps1 -Full\"\n    For online help, type: \"Get-Help .\\diff_video.ps1 -Online\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoxe%2Fdiff-video-ps1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoxe%2Fdiff-video-ps1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoxe%2Fdiff-video-ps1/lists"}