Skip to content

Commit

Permalink
Add github action to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HbHbNr committed Feb 8, 2024
1 parent b157a98 commit fe20cf9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/codequality.yml
Original file line number Diff line number Diff line change
@@ -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
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,38 @@ Convert binary files to videos, e.g. MP4 or WebM, and back.
### binary2video

```
binary2video [-f fps] [-w width] [-h height] <infile> <outfile>
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.
<infile> 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.
<outfile> 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 <infile> <outfile>
video2binary [-v] infile outfile
-v Be verbose.
<infile> 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.
<outfile> 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
Expand Down
2 changes: 1 addition & 1 deletion binary2video
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

usage_and_exit () {
echo "Usage: binary2video [-f fps] [-w width] [-h height] <infile> <outfile>"
echo "Usage: binary2video [-f fps] [-w width] [-h height] [-c codec] [-v] infile outfile"
exit $1
}

Expand Down
2 changes: 1 addition & 1 deletion video2binary
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

usage_and_exit () {
echo "Usage: video2binary <infile> <outfile>"
echo "Usage: video2binary [-v] infile outfile"
exit $1
}

Expand Down

0 comments on commit fe20cf9

Please sign in to comment.