{"id":13824776,"url":"https://github.com/alexandrosk0/GorpoMergeAndEncode","last_synced_at":"2025-07-08T19:33:01.761Z","repository":{"id":216970098,"uuid":"182553925","full_name":"alexandrosk0/GorpoMergeAndEncode","owner":"alexandrosk0","description":"Gorpo multiple files merge and encode done with Powershell using MKVToolNix and Handbrake","archived":false,"fork":false,"pushed_at":"2019-08-14T04:02:55.000Z","size":102,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-04T09:02:39.589Z","etag":null,"topics":["encode","gopro","handbrakecli","merge","mkvmerge","powershell","video"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexandrosk0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","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":"2019-04-21T15:58:41.000Z","updated_at":"2023-08-10T01:11:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"33dd8c06-09b5-4f6c-bd68-af4f82bf0e95","html_url":"https://github.com/alexandrosk0/GorpoMergeAndEncode","commit_stats":null,"previous_names":["alexandrosk0/gorpomergeandencode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrosk0%2FGorpoMergeAndEncode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrosk0%2FGorpoMergeAndEncode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrosk0%2FGorpoMergeAndEncode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandrosk0%2FGorpoMergeAndEncode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexandrosk0","download_url":"https://codeload.github.com/alexandrosk0/GorpoMergeAndEncode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225457852,"owners_count":17477362,"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":["encode","gopro","handbrakecli","merge","mkvmerge","powershell","video"],"created_at":"2024-08-04T09:01:09.100Z","updated_at":"2024-11-20T02:31:08.365Z","avatar_url":"https://github.com/alexandrosk0.png","language":"PowerShell","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"readme":"# GorpoMergeAndEncode\nMerge and encode single videos split into multiple mp4 files with PowerShell using **MKVToolNix and Handbrake**\n\n## Description\nMerge and encode single videos split into multiple mp4 files in the given GoPro export folder and removes original files if successful. various unique recording in the same directory.\n\nRequires [MKVmerge](https://mkvtoolnix.download/) and [HandBrakeCLI](https://handbrake.fr/downloads2.php) installed in C:\\Program Files\\MKVToolNix\\ and C:\\Program Files\\HandBrake\\ respectively.\nCustom paths can be setup using the parameters `-MKVMergeLocation` and `-HandbrakeLocation`.\n\n\nSee [official Handbrake presets](https://handbrake.fr/docs/en/latest/technical/official-presets.html)\n\nOutput file is Encoded-{original filename}-{date of subfolder}\n\n## Parameters\n\n* `-dir` Defaults to the current directory\n* `-preset` The default preset is \"Vimeo YouTube HQ 1440p60 2.5K\".\n* `-MKVMergeLocation` Location of mkvmerge.exe, defaults to 'C:\\Program Files\\MKVToolNix\\',\n* `-HandbrakeLocation` Location of HandBrakeCLI.exe, defaults to'C:\\Program Files\\HandBrake\\',\n\n* `-MKVMergeExtraParam` Extra parameters for MKVMerge\n* `-HandbrakeExtraParam` Extra parameters for Handbrake\n* `-test` Test merge and encode three seconds of each video, without deleting the original files\n* `-delete` Delete original files if no error is found. Defaults to true\n* `-mergeAll` Ignore file naming and merge all files in the directory\n* `-noEncoding` Skip encoding step, only merge\n\n\n## Examples\n### PowerShell command line\n`.\\goproMergeEncode.ps1 -dir \"d:\\Video\\GoPro\\2019-04-21\\HERO5 Black 1\\\"`\n\n### Process backlog\nIf you have a backlog of videos to split, you can create a chain of PowerShell commands\n`.\\goproMergeEncode.ps1 -dir \"D:\\Video\\GoPro\\2018-10-19\\HERO5 Black\\\"; .\\goproMergeEncode.ps1 -dir \"D:\\Video\\GoPro\\2018-12-04\\HERO5 Black 1\\\"; .\\goproMergeEncode.ps1 -dir \"D:\\Video\\GoPro\\2018-12-11\\HERO5 Black 1\\\";`\n\n### Windows command line\n`powershell.exe –ExecutionPolicy Bypass -noexit \"\u0026 'D:\\goproMergeEncode.ps1' -dir 'D:\\Video\\GoPro\\2019-04-19\\HERO5 Black 1\\'\"`\n\nOutput file for D:\\Video\\GoPro\\2019-04-21\\HERO5 Black 1\\GOPR2548.MP4 is Encoded-GOPR2548-20190421.mp4\n\n## Issues running PowerShell\nBy default, Windows doesn't allow to run PowerShell scripts, see [execution policies](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-6#powershell-execution-policies)\n\n### Permanent allow running this script\nOpen Start, search for PowerShell, right-click the top-result and click the Run as administrator option.\n\nCheck your execution policy by running the command `Get-ExecutionPolicy`\n\nTo change to a policy that allows you to run scripts, run PowerShell as administrator and run `Set-ExecutionPolicy RemoteSigned`\n\nTo unblock this file only, go to the folder you downloaded the file and run `Unblock-File .\\goproMergeEncode.ps1`\n\n### Temporary allow\nRun from command line `powershell –ExecutionPolicy Bypass`\n\nAll scripts run during this session will bypass the restrictions.\n\n## Notes\nBased on the file name format GOPR2548.MP4 and multiple files GP012548.MP4, GP022548.MP4,... and folder structure ..\\GoPro\\2019-04-21\\HERO5 Black 1\\\nNote that the script expects an arrangement that works for single videos for the camera models: HD HERO2, HERO3, HERO3+, HERO (2014), HERO Session, HERO4, HERO5 Black, HERO5 Session, HERO (2018)\n\nFor HERO6 Black, \u0026 HERO7 (White, Silver, Black) or other formats use -mergeAll parameter. See [GoPro Camera File Naming Convention](https://gopro.com/help/articles/question_answer/GoPro-Camera-File-Naming-Convention)\n\nNote that HandBrake doesn't support merging.\n\n## Alternatives\n- If you don't like PowerShell, although it's OSS and available in all platforms now, for linux bash you can use https://github.com/KonradIT/gopro-linux which also have much more features.\n- For tools with a user interface use https://www.mp4joiner.org/en/, http://www.dashware.net/ or other tools from https://www.fosshub.com/Video-Editors.html\n\n\n## About\nThis script was made quickly with the goal for me to learn more about PowerShell.\nProbably would be better to use ffmpeg, but I like the presets of HandBrake, and my focus was mostly on learning to script something using PowerShell.\n\nDecided to make it open source, since others might find useful, but now I have spent more time on documentation than actual scripting :)\n\n## Contact\nAll code reviews, suggestions, recommendations, pieces of advice, optimizations, insults are welcomed.\ncontact@alexandrosk0.dev\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandrosk0%2FGorpoMergeAndEncode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandrosk0%2FGorpoMergeAndEncode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandrosk0%2FGorpoMergeAndEncode/lists"}