Merge pull request #430 from amiaopensource/kfrn/style-guide

Style guide

https://github.com/amiaopensource/ffmprovisr/issues/429
This commit is contained in:
Katherine Frances Nagels 2020-06-04 17:55:44 +12:00 committed by GitHub
commit b04c0723b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 11 deletions

3
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,3 @@
## Checklist
* [ ] I've referred to the [Guidelines for contributing](https://github.com/amiaopensource/ffmprovisr/blob/gh-pages/readme.md#guidelines-for-contributing)

View File

@ -183,7 +183,7 @@
<p>To map <em>all</em> streams in the input file to the output file, use <code>-map 0</code>. However, note that not all container formats can include all stream types: for example, .mp4 cannot contain timecode.</p>
<h4>Mapping with a failsafe</h4>
<p>To safely process files that may or may not contain given a type of stream, you can add a trailing <code>?</code> to your map commands: for example, <code>-map 0:a?</code> instead of <code>-map 0:a</code>.</p>
<p>This makes the map optional: audio streams will be mapped over if they are present in the file—but if the file contains no audio streams, the transcode will precede as usual, minus the audio stream mapping. Without adding the trailing <code>?</code>, FFmpeg will exit with an error on that file.</p>
<p>This makes the map optional: audio streams will be mapped over if they are present in the file—but if the file contains no audio streams, the transcode will proceed as usual, minus the audio stream mapping. Without adding the trailing <code>?</code>, FFmpeg will exit with an error on that file.</p>
<p>This is especially recommended when batch processing video files: it ensures that all files in your batch will be transcoded, whether or not they contain audio streams.</p>
<p>For more information, check out the FFmpeg wiki <a href="https://trac.ffmpeg.org/wiki/Map" target="_blank">Map</a> page, and the official FFmpeg <a href="https://ffmpeg.org/ffmpeg.html#Advanced-options" target="_blank">documentation on <code>-map</code></a>.</p>
<p class="link"></p>

View File

@ -5,6 +5,7 @@ Repository of useful FFmpeg command lines for archivists!
* [What is this?](#what-is-this)
* [How do I see it?](#how-do-i-see-it)
* [How do I contribute?](#how-do-i-contribute)
* [Guidelines for contributing](#guidelines-for-contributing)
* [Code of conduct](#code-of-conduct)
* [Maintainers](#maintainers)
* [Contributors](#contributors)
@ -15,7 +16,7 @@ Repository of useful FFmpeg command lines for archivists!
## What is this?
#### Project Objective
### Project Objective
To facilitate better understanding of FFmpeg through collaborative sharing of useful scripts and detailed flag-level description of how each script works, so archivists can copy-paste and produce their own scripts, but also understand how and why they work.
@ -34,7 +35,7 @@ ffmprovisr
```
This works currently under macOS, Linux and the Linux apps on Windows (Ubuntu and Debian tested). On classic Windows you can install the last [release](https://github.com/amiaopensource/ffmprovisr/releases) manually and the open `index.html` in a browser.
#### Parseable list of the commands
### Parseable list of the commands
A list of all recipes in an easily parseable [ASCII text](recipes.txt) format is provided as well. It contains for each recipe its title and command in the following format:
@ -58,15 +59,30 @@ The used [one-liner](scripts/get_recipe_list) is in the `scripts` folder.
You are welcome to edit the codebase yourself, or just supply the information and ask it to be added to the site.
#### Edit codebase
### Edit codebase
To contribute to this project directly (and more quickly), clone this repository and create a new branch (`git checkout -b your-branch-name`) and add or modify a new block in `index.html`. Then [submit a pull request](https://github.com/amiaopensource/ffmprovisr/pulls) and the maintainers will review and integrate your code. There is a commented-out sample block available at the bottom of `index.html` that can be as a guideline for your command.
To contribute to this project directly (and more quickly), clone this repository and create a new branch (`git checkout -b your-branch-name`) and add or modify a new block in `index.html`. Then [submit a pull request](https://github.com/amiaopensource/ffmprovisr/pulls) and the maintainers will review and integrate your code. There is a commented-out sample block available at the bottom of `index.html` that can be a guideline for your command.
#### Make a request
#### Guidelines for contributing
* Recipes should ideally do just one thing or solve one problem, to keep things as user-friendly as possible and to avoid unintended side-effects
* Explanations and examples for recipes should be as generic as possible, to allow users to alter the command for their own use-case.
* This may involve the use of `VARIABLE_NAMES`
* Example: [Fade video and audio streams](https://amiaopensource.github.io/ffmprovisr/#fade_streams)
* Some recipes may benefit from including a GIF that shows the output
* Example: [Plays a graphical output showing decibel levels of an input file](https://amiaopensource.github.io/ffmprovisr/#astats)
* Some recipes require an explanatory section which may not fit gracefully into the recipe itself
* Example: [Rewrap a file](https://amiaopensource.github.io/ffmprovisr/#basic-rewrap)
* Recipes involving `-filter_complex` can be some of the most verbose and difficult to understand, so breaking these down as much as possible into their relevant sections is ideal
* Example: [Generate two access MP3s from input](https://amiaopensource.github.io/ffmprovisr/#append_mp3)
* Some recipes may refer to a specifc standard or vocabulary, and it's useful to link to these so that the user can scale the recipe to their use case
* Example: [Generate Broadcast WAV](https://amiaopensource.github.io/ffmprovisr/#bwf)
### Make a request
If you are having trouble with coding it yourself or with GitHub, feel free to [submit an issue](https://github.com/amiaopensource/ffmprovisr/issues) with the kind of command you would like to see added to the site.
#### General help
### General help
If you want to help but don't have a new script to add, you can help us by testing out the scripts available, by refining or clarifying the documentation, or [creating an issue](https://github.com/amiaopensource/ffmprovisr/issues) for anything that sounds confusing and requires clarification.
@ -80,7 +96,7 @@ You can read our contributor code of conduct [here](https://github.com/amiaopens
## Contributors
* Gathered using [octohatrack](https://github.com/LABHR/octohatrack)
*Code Contributors*:
ablwr (Ashley)
alavigne12 (A. Lavigne)
@ -102,7 +118,7 @@ pjotrek-b (Peter B.)
privatezero (Andrew Weaver)
retokromer (Reto Kromer)
rfraimow
All Contributors:
ablwr (Ashley)
alavigne12 (A. Lavigne)
@ -141,11 +157,11 @@ richardpl (Paul B Mahol)
ross-spencer (Ross Spencer)
taschenbach (Tommy Aschenbach)
todrobbins (Tod Robbins)
Repo: amiaopensource/ffmprovisr
GitHub Contributors: 20
All Contributors: 37
Last updated: 2019-12-11
Last updated: 2019-12-11
## AVHack Team