diff --git a/.github/workflows/codequality.yml b/.github/workflows/codequality.yml new file mode 100644 index 0000000..f086fe4 --- /dev/null +++ b/.github/workflows/codequality.yml @@ -0,0 +1,17 @@ +name: Code quality + +on: [push] + +jobs: + + runtests: + runs-on: ubuntu-latest + steps: + - name: Install BATS + run: | + sudo apt-get update + sudo apt-get install --yes --no-install-recommends bats + - uses: actions/checkout@v3 + - name: Run BATS tests + run: | + bats test/test.bats diff --git a/README.md b/README.md index e5dd14a..941d26f 100644 --- a/README.md +++ b/README.md @@ -6,31 +6,38 @@ Convert binary files to videos, e.g. MP4 or WebM, and back. ### binary2video ``` -binary2video [-f fps] [-w width] [-h height] +binary2video [-f fps] [-w width] [-h height] [-v] infile outfile --f fps Set framerate, i.e. frame per second; default 1. +-f fps Set framerate, i.e. frames per second; default 1. -w width Set width, default 320. -h height Set height, default 240. - The name and path of the binary file which should be converted into +-c codec Set video codec: h.264, vp9, ffv1, or ffv1.3. Default is vp9. + +-v Be verbose. + +infile The name and path of the binary file which should be converted into a video. - The name and path of the video file which should be created. The suffix +outfile The name and path of the video file which should be created. The suffix of the file will determine the video container type. The container must - be supported by FFmpeg, for example .mp4, .webm, .avi, etc. + be supported by FFmpeg, for example .mp4, .webm, .avi, .mkv, etc. Not + all video codecs work with all container formats, though. ``` ### video2binary ``` -video2binary +video2binary [-v] infile outfile + +-v Be verbose. - The name and path of the video file from which the original binary file +infile The name and path of the video file from which the original binary file should be extracted. - The name and path of the binary file to which the original data should be +outfile The name and path of the binary file to which the original data should be restored to. ``` ## Internal process diff --git a/binary2video b/binary2video index 8d02120..d44c8f5 100755 --- a/binary2video +++ b/binary2video @@ -1,7 +1,7 @@ #!/usr/bin/env bash usage_and_exit () { - echo "Usage: binary2video [-f fps] [-w width] [-h height] " + echo "Usage: binary2video [-f fps] [-w width] [-h height] [-c codec] [-v] infile outfile" exit $1 } diff --git a/video2binary b/video2binary index e1b03a3..5899173 100755 --- a/video2binary +++ b/video2binary @@ -1,7 +1,7 @@ #!/usr/bin/env bash usage_and_exit () { - echo "Usage: video2binary " + echo "Usage: video2binary [-v] infile outfile" exit $1 }