{"id":15516936,"url":"https://github.com/sverrirs/mp4combine","last_synced_at":"2026-03-04T18:31:42.722Z","repository":{"id":66266771,"uuid":"75509474","full_name":"sverrirs/mp4combine","owner":"sverrirs","description":"Automatically concatenates MP4 files using the ffmpeg and mp4box utility and generates chapters for each concatenation point. Compatible with Xbox and Playstation video players.","archived":false,"fork":false,"pushed_at":"2022-11-13T23:51:43.000Z","size":20037,"stargazers_count":43,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-11T01:24:37.054Z","etag":null,"topics":["concatenate-video-files","gpac","mp4-video","mp4-video-files","playstation","ps4","video-join","video-processing","xbox","xbox-one"],"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/sverrirs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2016-12-04T00:55:20.000Z","updated_at":"2026-02-09T06:48:02.000Z","dependencies_parsed_at":"2023-06-13T06:45:24.290Z","dependency_job_id":null,"html_url":"https://github.com/sverrirs/mp4combine","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"17ed8730162f8445153ece9b06ee3041aef7dac0"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/sverrirs/mp4combine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sverrirs%2Fmp4combine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sverrirs%2Fmp4combine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sverrirs%2Fmp4combine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sverrirs%2Fmp4combine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sverrirs","download_url":"https://codeload.github.com/sverrirs/mp4combine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sverrirs%2Fmp4combine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30089331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T18:31:08.343Z","status":"ssl_error","status_checked_at":"2026-03-04T18:31:07.708Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["concatenate-video-files","gpac","mp4-video","mp4-video-files","playstation","ps4","video-join","video-processing","xbox","xbox-one"],"created_at":"2024-10-02T10:10:32.638Z","updated_at":"2026-03-04T18:31:42.684Z","avatar_url":"https://github.com/sverrirs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mp4 Video Combiner\n\nPython script that assist in concatenating mp4 video files into a single larger file and automatically create named chapter marks at each join making it really easy to skip forward and backwards within the video file. \n\nAll video files created by this tool are fully compatible and play without errors on Xbox 360/One, PS4 and all major video players on desktop or mobile.\n\nThe script relies on the `mp4box` utility from the [GPAC](https://gpac.wp.mines-telecom.fr/downloads/) software bundle and the `ffmpeg` utility from [ffmpeg.org](https://www.ffmpeg.org/). The Windows 64bit version of both these tools are included in the bundle.\n\n\u003e Currently this script has only been developed for use on Windows but I welcome any and all pull requests. So if you feel you can improve the OS compatability I'd appreciate your help.\n\nThis script solves long outstanding feature requests for the GPAC toolkit such as [#325](https://sourceforge.net/p/gpac/bugs/325/)\n\nDetails and discussions can also be found on [my blog](https://blog.sverrirs.com/2017/01/joining-mp4-files-with-chapters.html).\n\n:heart:\n\n- [Requires](#requires)\n- [Simple usage](#simple-usage)\n- [Advanced usage](#advanced-usage)\n  - [Handling input videos of different sizes](#handling-input-videos-of-different-sizes)\n  - [Overwriting existing files](#overwriting-existing-files)\n  - [Shuffling the list of files](#shuffling-the-list-of-files)\n  - [Providing a cut point file as an input](#providing-a-cut-point-file-as-an-input)\n  - [Merging videos containing soft subtitles](#merging-videos-containing-soft-subtitles)\n  - [Disabling audio in output video](#disabling-audio-in-output-video)\n- [Contributing](#contributing)\n\n## Requires\n\nPython 3.5+\n\nBefore first use make sure you install all requirements using \n\n```\npip install -r requirements.txt\n```\n\n\n## Simple usage\nAssuming you have a bunch of videos named \"clipXX.mp4\" in a folder called _videos_ then this is how you feed all of them into script and have it automagically combine all the files and place nice chapter marks at the seams.\n\n```\npython combine.py --match \"D:\\videos\\clip*\" -o \"D:\\videos\\all_clips.mp4\"\n```\n\n## Advanced usage\n\n\u003e For all options supported by this tool run `python combine.py -h`\n\nAssuming you have a large 16GB list of [Barbie](https://en.wikipedia.org/wiki/Barbie:_Life_in_the_Dreamhouse) Mp4 video files in a folder. Now you'd like to burn them all to a DVD to play on your XBox or Playstation computer. However the list of files is much greater than what can fit on a single DVD disk.\n\nNo worries! :relieved:\n\nThe script can automatically segment the output files according to known DVD and BluRay disk sizes using the `--disk` command line argument\n\n```\npython combine.py --match \"D:\\barbie\\*.mp4\" -o \"D:\\toburn\\Barbie.mp4\" --disk dvd8\n```\n\nThis will create the original output file and then also split files based on your maximum size\n```\nD:\\toburn\\Barbie.mp4\nD:\\toburn\\Barbie_001.mp4\nD:\\toburn\\Barbie_002.mp4\nD:\\toburn\\Barbie_003.mp4\n```\n\nNow you can burn each individual split file to a dvd. \n\n_Neat_ :thumbsup:\n\n\u003e The disk settings supported are `dvd4` (4.7GB), `dvd8` (8.5GB) and `br25` (25GB).\n\nYou can also specify a custom file size using the `--size` argument. The example below limits the output file size to 800MB.\n\n```\npython combine.py -m \"D:\\barbie\\*.mp4\" -o \"D:\\toburn\\Barbie.mp4\" --size 800MB\n```\n\nThe `--size` argument supports multiple format endings such as 'MB' for megabytes and 'GB' for gigabytes. If nothing is specified then 'MB' is assumed. You can also specify fractional sizes such as '15.5GB'.\n\n\u003e If you intend to play the files on your Xbox console then you need to limit the file size to be no more than `4GB`. This file limit is imposed by the FAT32 file system (see [Q12](http://support.xbox.com/en-US/xbox-360/console/audio-video-playback-faq#Q11)).\n\n## Handling input videos of different sizes\nIf the input videos are not of the same width or height then the script will automatically attempt to scale all of the source material to `1024x576` resolution. This scaling size can be configured using the `--videosize` parameter.\n\nBelow is a command that forces a `1280 x 720` HD resolution for all input files. Files with smaller resolution will be upscaled and those with larger resolutions will be downscaled.\n\n```\npython combine.py -m \"D:\\barbie\\*.mp4\" -o \"D:\\toburn\\Barbie.mp4\" --videosize \"1280:720\"\n```\n\n\u003e Ensure you separate the dimensions with the colon character `:`\n\n## Overwriting existing files\nIf the output file exists the script will by default print an error and terminate without doing anything. To silently overwrite existing files with the same file name you can use the `--overwrite` switch\n\n```\npython combine.py -m \"D:\\barbie\\*.mp4\" -o \"D:\\toburn\\Barbie.mp4\" --disk dvd8 --overwrite\n```\n\n## Shuffling the list of files\nBy default the files are concatinated in order by their filename. In case you want to randomize their order (e.g. if you're creating a shuffled playlist type of file) you can use the `--shuffle` argument\n\n```\npython combine.py -m \"D:\\videos\\*.mp4\" -o \"D:\\toburn\\Shuffle.mp4\" --disk dvd4 --shuffle\n```\n\n## Providing a cut point file as an input\nThe script can cut beginning and endings of files automatically if a cut point file is provided using the `--cuts` or `-c` argument.\n\nThe file format is simple comma separated file on the form\n```\nFILE_NAME_WITH_EXTENSION, START_TIME_CODE, END_TIME_CODE\n```\n\nExample cuts file (cutinfo.txt)\n```\nBarbie1.mp4, 00:33, 01:01\nBarbie2.mp4, 00:50, 1:45\n```\n\nThen to perform the cuts, run the following command\n\n```\npython combine.py -m \"D:\\barbie\\*.mp4\" -o \"D:\\toburn\\Barbie.mp4\" --cuts \"D:\\toburn\\cutinfo.txt\"\n```\n\nWill produce an output file (Barbie.mp4) of total 1:23 duration where the first 28 seconds are from Barbie1.mp4 and the remaining 55 seconds are from Barbie2.\n\n## Merging videos containing soft subtitles\nWhen merging videos containing subtitle tracks then the `--burnsubs` option can be specified so that the resulting combined file will have the default subtitle track embedded in the video. \n\n\u003e It is not currently possible to merge soft subtitles (subtitles on separate tracks).\n\n## Disabling audio in output video\nBy default the script will attempt to merge both video and audio tracks from the source videos. If one or more of the source videos have no audio tracks then the script will fail with an error similar to\n\n```\nStream specifier ':a' in filtergraph description .... matches no streams.\n```\n\nYou can use the `--noaudio` switch to force the script to skip all audio tracks from the source videos and only produce an output video of the merged video tracks.\n\nThe below example will produce a completely silent video file\n\n```\npython combine.py --match \"D:\\barbie\\*.mp4\" -o \"D:\\toburn\\Barbie_silent.mp4\" --noaudio\n```\n\n## Contributing\n\nI welcome any and all suggestions and fixes either through the issue system above or through pull-requests.\n\nAlthough this project is small it has a [code of conduct](CODE_OF_CONDUCT.md) that I hope everyone will do their best to follow when contributing to any aspects of this project. Be it discussions, issue reporting, documentation or programming. \n\nIf you don't want to open issues here on Github, send me your feedback by email at [mp4combine@sverrirs.com](mailto:mp4combine@sverrirs.com).\n\n\u003e _\"Be excellent to each other\"_\n\u003e :hatched_chick:","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsverrirs%2Fmp4combine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsverrirs%2Fmp4combine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsverrirs%2Fmp4combine/lists"}