Giter VIP home page Giter VIP logo

Comments (2)

abhiTronix avatar abhiTronix commented on May 11, 2024

I followed the demo here: https://github.com/abhiTronix/vidgear/wiki/Non-Compression-Mode:-OpenCV#1-writegear-bare-minimum-examplenon-compression-mode

Run the code

The following error showed:

Compression Mode is disabled, Activating OpenCV In-built Writer!
InputFrame => Height:360 Width:640 Channels:1
FILE_PATH: /*/Output.mp4, FOURCC = 1196444237, FPS = 30.0, WIDTH = 640, HEIGHT = 360, BACKEND =
OpenCV: FFMPEG: tag 0x47504a4d/'MJPG' is not supported with codec id 7 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x7634706d/'mp4v'
Warning: RGBA and 16-bit grayscale video frames are not supported by OpenCV yet, switch to compression_mode to use them!
Traceback (most recent call last):
File "cam_demo.py", line 31, in
writer.write(gray)
File "/Users/
/lib/python3.7/site-packages/vidgear/gears/writegear.py", line 221, in write
raise ValueError('All frames in a video should have same size')
ValueError: All frames in a video should have same size

My Insight

ValueError: All frames in a video should have same size

@iflyingboots This error arises because for a different size (width/height) or a different number of channels(dimensions) of input frames which is either due to incorrect code you are using in your application or the input video stream have the incorrect number of channels.

Troubleshooting

@iflyingboots Kindly share the following files:

  1. Kindly post the code of original "cam_demo.py" file that you are using.
  2. Secondly, if you are using a video file as an input source then share the video URL here.

from vidgear.

abhiTronix avatar abhiTronix commented on May 11, 2024

Closed. Kindly provide necessary information/evidence related to issue for further troubleshooting.

from vidgear.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.