Comments (2)
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 tocompression_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.
-
Also, The code you said https://github.com/abhiTronix/vidgear/wiki/Non-Compression-Mode:-OpenCV#1-writegear-bare-minimum-examplenon-compression-mode is working absolutely fine at my machine and all CLI test are passing too without any error whatsoever.
-
Finally,
macOS (OSX) is not officially supported by vidgear but may work.(Resolved in #42, MacOS is now officially supported.)
Troubleshooting
@iflyingboots Kindly share the following files:
- Kindly post the code of original
"cam_demo.py"
file that you are using. - Secondly, if you are using a video file as an input source then share the video URL here.
from vidgear.
Closed. Kindly provide necessary information/evidence related to issue for further troubleshooting.
from vidgear.
Related Issues (20)
- [Question]: Change default video path in WebGear HOT 3
- [Question]: Transforms size keep growing. HOT 3
- [Question]: I edit individual frames, but the original unearthly video still ends up on YouTube. Why? HOT 15
- [Question]: Fetch Multiple Video from Youtube HOT 3
- [Proposal]: Dropped support for Python 3.7.x legacy HOT 2
- [Question]: How to get original video fps with VideoGear. HOT 8
- [Bug]: ScreenGear's options wrong names HOT 13
- [Bug]: CamGear - Error when loading first segment , while taking picture from youtube streaming HOT 2
- [Bug]: In NetGear client.recv() stucking in a some non returnable loop HOT 4
- [Proposal]: Add type annotations to the code or add stub files HOT 2
- [Proposal]: Add ffmpeg creationflag in Writegear API HOT 1
- [Bug]: frame desynchronization HOT 6
- [Question]: Does VidGear support downloading arbitrary frames and getting video sizes? HOT 4
- Putting a client IP into the Server code? HOT 2
- [Bug]: Stream gear imposes simplified aspect ratios, which does not seem necessary HOT 1
- [Bug]: no sound on output video with bare minimum code on google colab HOT 4
- [Bug]: No video shown on RTSP tested with VLC HOT 2
- [Question]: how to stream frames from opencv capture already in use? HOT 2
- Exception in thread NetGear, zmq.error.Again: Resource temporarily unavailable HOT 7
- [Question]: looping? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vidgear.