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

OpenCV FFMPEG mp4 codec error #14

Open
LemonPi opened this issue Oct 1, 2020 · 4 comments
Open

OpenCV FFMPEG mp4 codec error #14

LemonPi opened this issue Oct 1, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@LemonPi
Copy link
Member

LemonPi commented Oct 1, 2020

Recording videos is having trouble using the mp4 format, with the fallback producing gigantic video sizes (~200MB for a 1 minute video). This is with the latest master (3a3d1dea020843704e0a4cf89433e8275d614437).

[rosout]: Starting recording for /home/victorrope/catkin_ws/src/arm_video_recorder/Captures/1601573755.8293712.mp4
OpenCV: FFMPEG: tag 0x7634706d/'mp4v' is not supported with codec id 13 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x00000020/' ???'

(also tried with different filenames such as "video.mp4")

@LemonPi LemonPi added the bug Something isn't working label Oct 1, 2020
@LemonPi
Copy link
Member Author

LemonPi commented Oct 1, 2020

ffmpeg is not installed separately on this machine; will try again after installing ffmpeg

@LemonPi
Copy link
Member Author

LemonPi commented Oct 1, 2020

Separately installing ffmpeg version 2.8.17-0ubuntu0.1 did not change this problem (after catkin_make and resourcing).
Running opencv_version returns 3.3.1-dev

@bsaund
Copy link
Contributor

bsaund commented Oct 1, 2020

Here is where the fourcc code is set. You could ty changing that.
https://github.com/UM-ARM-Lab/arm_video_recorder/blob/master/scripts/video_recording.py#L38

Separately, isn't victorrope the virtual machine? You may encounter additional challenges when trying to record inside the VM

@LemonPi
Copy link
Member Author

LemonPi commented Oct 1, 2020

Good point, running the service on the host machine without changing anything else does not raise this issue. That can be the solution for now; I will play around a bit with the code inside the VM to see if that can also be resolved.

A separate issue is the size of the videos. I'm still getting around 200MB for a 1 minute mp4, even without any codec issues. I remember the mp4 format being much more compact?

Update: changing the FourCC code cannot solve the problem inside the VM (could be a cv2 version issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants