Skip to content

Commit 75424af

Browse files
authored
Merge pull request #20 from LukasBommes/new_test_video
New test video
2 parents ac53924 + b542e9c commit 75424af

File tree

10 files changed

+20
-20
lines changed

10 files changed

+20
-20
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ jobs:
7272
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
7373
#CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }}
7474
CIBW_BUILD_FRONTEND: build
75-
CIBW_TEST_COMMAND: VIDEO_URL={project}/vid.mp4 python3 {project}/tests/tests.py
75+
CIBW_TEST_COMMAND: VIDEO_URL={project}/vid_h264.mp4 python3 {project}/tests/tests.py
7676
CIBW_BUILD_VERBOSITY: 1
7777

7878
- uses: actions/upload-artifact@v3
7979
with:
80-
path: ./wheelhouse/*.whl
80+
path: ./wheelhouse/*.whl

Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ COPY setup.py /home/video_cap
7676
COPY src /home/video_cap/src/
7777

7878
# Install Python package
79-
COPY vid.mp4 /home/video_cap
8079
RUN python3.10 -m pip install --upgrade pip build && \
8180
python3.10 -m pip install 'pkgconfig>=1.5.1' 'numpy>=1.17.0'
8281

MANIFEST.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ include LICENSE
55
include pyproject.toml
66
include extract_mvs.py
77
include setup.py
8-
include vid.mp4
8+
include vid_h264.mp4
9+
include vid_mpeg4_part2.mp4

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ Note, that we currently provide the package only for x86-64 linux, such as Ubunt
5353

5454
### Step 2: Extract Motion Vectors
5555

56-
Download the example video `vid.mp4` from the repo and place it somewhere. To extract the motion vectors, open a terminal at the same location and run
56+
Download the example video `vid_h264.mp4` from the repo and place it somewhere. To extract the motion vectors, open a terminal at the same location and run
5757
```
58-
extract_mvs vid.mp4 --preview --verbose
58+
extract_mvs vid_h264.mp4 --preview --verbose
5959
```
6060

6161
The extraction script provides command line options to store extracted motion vectors to disk, and to enable/disable graphical output. For all options type
@@ -64,7 +64,7 @@ extract_mvs -h
6464
```
6565
For example, to store extracted frames and motion vectors to disk without showing graphical output run
6666
```
67-
extract_mvs vid.mp4 --dump
67+
extract_mvs vid_h264.mp4 --dump
6868
```
6969

7070

release.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Create a new release
22

3-
### Step 1) Push code
3+
### Step 1) Bump version
44

5-
Make changes, commit and push. The build workflow starts automatically and builds the Docker image and wheels. The Docker image is automatically pushed to Dockerhub. The wheels need to be manually uploaded to PyPI as explained below.
5+
Bump the version in `setup.py`
66

7-
### Step 2) Bump version
7+
### Step 2) Push code
88

9-
Bump the version in `setup.py`
9+
Make changes, commit and push. The build workflow starts automatically and builds the Docker image and wheels. The Docker image is automatically pushed to Dockerhub. The wheels need to be manually uploaded to PyPI as explained below.
1010

11-
### Step 2) Create tag and release
11+
### Step 3) Create tag and release
1212

1313
Now, create a tag with the same version just entered in the `setup.py` and push that tag to the remote.
1414
```
@@ -18,7 +18,7 @@ git push origin vx.x.x
1818

1919
Then create a release on GitHub using this tag.
2020

21-
### Step 3) Upload wheels to PyPI
21+
### Step 4) Upload wheels to PyPI
2222

2323
First, make sure you have the most recent version of twine installed on the host
2424
```
@@ -30,7 +30,7 @@ Then, download and extract the wheels from the (successfully completed) workflow
3030
python3 -m twine upload dist/*
3131
```
3232

33-
#### Step 4) Tag Docker image with correct version
33+
#### Step 5) Tag Docker image with correct version
3434

3535
When pushing changes, a Docker image `lubo1994/mv-extractor:dev` is being build and pushed to DockerHub. Upon a release, this image should be tagged with the correct release version and the `latest` tag. To this end, first pull the `dev` image
3636
```
@@ -43,4 +43,4 @@ sudo docker push lubo1994/mv-extractor:vx.x.x
4343
sudo docker tag lubo1994/mv-extractor:vx.x.x lubo1994/mv-extractor:latest
4444
sudo docker push lubo1994/mv-extractor:latest
4545
```
46-
where `vx.x.x` is replaced with the version of the release.
46+
where `vx.x.x` is replaced with the version of the release.

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
setup(name='motion-vector-extractor',
2727
author='Lukas Bommes',
2828
author_email=' ',
29-
version="1.0.5",
29+
version="1.0.6",
3030
license='MIT',
3131
url='https://github.com/LukasBommes/mv-extractor',
3232
description=('Reads video frames and MPEG-4/H.264 motion vectors.'),

src/mvextractor/__main__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def main(args=None):
2525
args = sys.argv[1:]
2626

2727
parser = argparse.ArgumentParser(description='Extract motion vectors from video.')
28-
parser.add_argument('video_url', type=str, nargs='?', default="vid.mp4", help='File path or url of the video stream')
28+
parser.add_argument('video_url', type=str, nargs='?', help='File path or url of the video stream')
2929
parser.add_argument('-p', '--preview', action='store_true', help='Show a preview video with overlaid motion vectors')
3030
parser.add_argument('-v', '--verbose', action='store_true', help='Show detailled text output')
3131
parser.add_argument('-d', '--dump', action='store_true', help='Dump frames, motion vectors, frame types, and timestamps to output directory')
@@ -111,4 +111,4 @@ def main(args=None):
111111

112112

113113
if __name__ == "__main__":
114-
sys.exit(main())
114+
sys.exit(main())

tests/tests.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from mvextractor.videocap import VideoCap
77

88

9-
video_url = os.getenv('VIDEO_URL', 'vid.mp4')
9+
video_url = os.getenv('VIDEO_URL', 'vid_h264.mp4')
1010

1111

1212
def validate_timestamp(timestamp, tolerance=10.0):
@@ -153,4 +153,4 @@ def test_timings(self):
153153

154154

155155
if __name__ == '__main__':
156-
unittest.main()
156+
unittest.main()

vid.mp4 vid_h264.mp4

File renamed without changes.

vid_mpeg4_part2.mp4

1.23 MB
Binary file not shown.

0 commit comments

Comments
 (0)