Ask Your Question
0

Uncompressed avi

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

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

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 -0500 )edit

Btw, this will work for OpenCV 3.1 and python 3.5

supra56 gravatar imagesupra56 ( 2019-10-08 07:41:42 -0500 )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 -0500 )edit

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

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

DIB is discontinued. And is not available on FOURCC

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

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

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

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

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

1 answer

Sort by ยป oldest newest most voted
1

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

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 -0500 )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 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 20 times

Last updated: Oct 08