Ask Your Question
0

Uncompressed avi

asked 2019-10-08 06:46:54 -0600

updated 2019-10-08 07:29:19 -0600

supra56 gravatar image

How can I write an uncompressed avi with opencv 3 and python? It MUST be uncompressed.

fourcc = cv2.VideoWriter_fourcc(*'DIB ')

does not produce an avi at all, but fourcc = cv2.VideoWriter_fourcc(*'HFYU') does. However, I do not want any compression, even lossless compression. Thanks

edit retag flag offensive close merge delete

Comments

This should be accurate fourcc = cv2.VideoWriter_fourcc(*'DIB '). But I don't see nothing.

supra56 gravatar imagesupra56 ( 2019-10-08 07:39:17 -0600 )edit

Btw, this will work for OpenCV 3.1 and python 3.5

supra56 gravatar imagesupra56 ( 2019-10-08 07:41:42 -0600 )edit

Thanks, I will try this, but if this is the case, then something is broken in later versions

sjwastronomer gravatar imagesjwastronomer ( 2019-10-08 07:45:08 -0600 )edit

try fourcc = cv.VideoWriter_fourcc(*'RGBA')

LBerger gravatar imageLBerger ( 2019-10-08 07:53:44 -0600 )edit

DIB is discontinued. And is not available on FOURCC

supra56 gravatar imagesupra56 ( 2019-10-08 08:13:19 -0600 )edit

Wow, so fourcc now has no way to specify an uncompressed avi?

sjwastronomer gravatar imagesjwastronomer ( 2019-10-08 08:34:18 -0600 )edit

@sjwastronomer. Followed example from @LBerger. It will worked on OpenCV 4.

supra56 gravatar imagesupra56 ( 2019-10-08 08:37:06 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-10-08 07:53:59 -0600

LBerger gravatar image

try fourcc = cv.VideoWriter_fourcc(*'RGBA')

edit flag offensive delete link more

Comments

Good catch, Berger.

supra56 gravatar imagesupra56 ( 2019-10-08 08:12:13 -0600 )edit

I tried that. It wrote an avi that I could not play or read with the software I need to use. Does this specify an alpha channel?

sjwastronomer gravatar imagesjwastronomer ( 2019-10-08 08:35:32 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2019-10-08 06:46:54 -0600

Seen: 5,304 times

Last updated: Oct 08 '19