FS#77019 - [python-opencv] fail to write video file with `VideoWriter`

Attached to Project: Arch Linux
Opened by DarcyHu (DarcyHu) - Friday, 06 January 2023, 09:13 GMT
Last edited by Antonio Rojas (arojas) - Saturday, 07 January 2023, 08:20 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
1. I could not write video file with `VideoWriter` using python-opencv 4.6.7-7.
2. python-opencv 4.7.0-1 from testing repo works, but then I need to update other pkg depends on python-opencv, eg: python-pytorch.
3. python-opencv 4.6.7-6 not working due to libtiff soname changes.
If python-opencv 4.7.0-1 is not going to Extra repo soon enough, maybe rebuild python-opencv as 4.6.7-8?


Additional info:
* python-opencv: 4.6.0-7
* ffmpeg 2:5.1.2-1
* gstreamer 1.20.5-2

Steps to reproduce:

```python
import cv2
from skimage.data import astronaut

img = astronaut()
h, w = img.shape[:2]
writer = cv2.VideoWriter("tmp.mp4", cv2.VideoWriter_fourcc(*"avc1"), 25, (h, w))
for i in range(100):
writer.write(img)
writer.release()
```

log:
```
[ WARN:0@14.168] global /build/opencv/src/opencv-4.6.0/modules/videoio/src/cap_gstreamer.cpp (2180) open OpenCV | GStreamer warning: cannot link elements
```
This task depends upon

Closed by  Antonio Rojas (arojas)
Saturday, 07 January 2023, 08:20 GMT
Reason for closing:  Fixed
Additional comments about closing:  opencv 4.7.0-1
Comment by DarcyHu (DarcyHu) - Saturday, 07 January 2023, 03:39 GMT
I could confirm that rebuild python-opencv 4.6.0-7 works as expected.

Loading...