Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WriteGear Bare-Minimum example (Non-Compression) not working #40

Closed
5 tasks done
iflyingboots opened this issue Jul 27, 2019 · 2 comments
Closed
5 tasks done

WriteGear Bare-Minimum example (Non-Compression) not working #40

iflyingboots opened this issue Jul 27, 2019 · 2 comments
Labels
INVALID 🛑 This doesn't seem right or non-applicable or missing information

Comments

@iflyingboots
Copy link

iflyingboots commented Jul 27, 2019

Description

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

  2. Run the code

  3. 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 <module>
    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

Acknowledgment

  • A brief but descriptive Title of your issue
  • I have searched the issues for my issue and found nothing related or helpful.
  • I have read the FAQ.
  • I have read the Wiki.
  • I have read the Contributing Guidelines.

Environment

  • VidGear version: 0.1.5
  • Branch: PyPi
  • Python version: 3.7.3
  • pip version: 19.1.1
  • Operating System and version: macOS 10.14.3

Expected Behavior

Write frame to file.

Actual Behavior

Frames in different sizes.

Possible Fix

WriteGear specify the output frame size?

Steps to reproduce

(Write your steps here:)

See description.

Optional

@abhiTronix abhiTronix added the MISSING : INFORMATION 🔍 Requested proper information/evidence about the Issue/PR in context. label Jul 28, 2019
@abhiTronix
Copy link
Owner

abhiTronix commented Jul 28, 2019

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.

@abhiTronix abhiTronix added INVALID 🛑 This doesn't seem right or non-applicable or missing information and removed MISSING : INFORMATION 🔍 Requested proper information/evidence about the Issue/PR in context. labels Jul 29, 2019
@abhiTronix
Copy link
Owner

abhiTronix commented Jul 29, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INVALID 🛑 This doesn't seem right or non-applicable or missing information
Projects
None yet
Development

No branches or pull requests

2 participants