-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding support for segmenting output based on defined output file siz…
…e, multiple feature fixes, readme updates. First production version
- Loading branch information
Showing
4 changed files
with
317 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
> “Be kind, | ||
> | ||
> for everyone you meet is fighting a harder battle.” | ||
> | ||
> --Plato | ||
|
||
## TL;DR | ||
Try to be the best version of yourself and to be excellent to others. | ||
|
||
:purple_heart: | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at [[email protected]](mailto:[email protected]). All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,79 @@ | ||
# Mp4box Concatination Helper | ||
# Mp4 Video Joiner | ||
|
||
Assists in concatenating files using the `mp4box` utility. | ||
The tool creates a chapter file for all concatenated files and the resulting joined file will have chapter marks at the joining points. | ||
Python 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. | ||
|
||
## Usage | ||
Assuming you have a bunch of videos named "clipsXX.mp4" in a folder called _videos_ then this is how you feed all of them into the concatinator and specify an output file | ||
The script relies on the `mp4box` utility from the [GPAC](https://gpac.wp.mines-telecom.fr/downloads/) software bundle You will need to download and install this bundle first before using this tool. | ||
|
||
> 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. | ||
This script solves long outstanding feature requests for the GPAC toolkit such as [#325](https://sourceforge.net/p/gpac/bugs/325/) | ||
|
||
:heart: | ||
|
||
## Requires | ||
|
||
Python 3.x | ||
|
||
``` | ||
pip install humanize | ||
``` | ||
|
||
## Simple usage | ||
Assuming you have a bunch of videos named "clipXX.mp4" in a folder called _videos_ then this is how you feed all of them into the concatinator and specify an output file | ||
|
||
``` | ||
python catgen.py -m "D:\videos\clips*" -o "D:\videos\all_clips.mp4" | ||
python catgen.py --match "D:\videos\clip*" -o "D:\videos\all_clips.mp4" | ||
``` | ||
|
||
## Advanced usage | ||
|
||
Assuming 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. | ||
|
||
No worries! :relieved: | ||
The script can automatically segment the output files according to known DVD and BluRay disk sizes using the `--disk` command line argument | ||
|
||
``` | ||
python catgen.py --match "D:\barbie\*.mp4" -o "D:\toburn\Barbie.mp4" --disk dvd8 | ||
``` | ||
|
||
This will create multiple output files | ||
``` | ||
Output: D:\toburn\Barbie_001.mp4 | ||
23 chapters, 08:32:15.560 running time, 7.6G total size | ||
Output: D:\toburn\Barbie_002.mp4 | ||
23 chapters, 08:32:04.720 running time, 7.6G total size | ||
Output: D:\toburn\Barbie_003.mp4 | ||
5 chapters, 01:33:07.920 running time, 1.4G total size | ||
``` | ||
|
||
Now you can burn each individual file to a dvd. Neat :thumbsup: | ||
|
||
> The disk settings supported are `dvd4` (4.7GB), `dvd8` (8.5GB) and `br25` (25GB). | ||
You can also specify a custom file size using the `--size` argument. The example below limits the output file size to 800MB. | ||
|
||
``` | ||
python catgen.py -m "D:\barbie\*.mp4" -o "D:\toburn\Barbie.mp4" --size 800MB | ||
``` | ||
|
||
The `--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'. | ||
|
||
## Overwriting existing files | ||
If 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 | ||
|
||
``` | ||
python catgen.py -m "D:\barbie\*.mp4" -o "D:\toburn\Barbie.mp4" --disk dvd8 --overwrite | ||
``` | ||
|
||
## Contributing | ||
|
||
I welcome any and all suggestions and fixes either through the issue system above or through pull-requests. | ||
|
||
> Although 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. | ||
If you don't want to open issues here on Github, send me your feedback by email at [[email protected]](mailto:[email protected]). | ||
|
||
> _"Be excellent to each other"_ | ||
> :hatched_chick: |
Oops, something went wrong.