-
Notifications
You must be signed in to change notification settings - Fork 545
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
Could not find codec parameters for stream 0 (Video: h264, none): unspecified size #1735
Comments
Here is how to patch ffmpeg and force camera to TCP to workaround a non-compliant RTSP camera
|
Nice. Whats the downsize of doing it this way? It seems like out of the box, motion does not support h.264 codec. |
Packaged Motion uses ffmpeg libs to decode H264 and it comes out of the box. It's only a problem with some non-compliant cameras that require a custom ffmpeg build with a workaround to force TCP |
After writing the comment, I figured that mkv for example is h264 encoded, so that worked. Sorry for the irrelevant weight to the issue. |
Can you explain this issue more? Generally, we don't want UDP we want For general issues with the camera not being detected or failing to analyze, the solution is usually to lower the camera GOP/I-Frame interval. |
The issue here is that ffmpeg out of the box tries to follow RTSP protocol. The camera in turn, supports TCP, but does not advertise it correctly, and motion fails to connect since motion forces TCP by default (perfectly explained by @eusoubrasileiro at https://stackoverflow.com/questions/66280861/ffmpeg-nonmatching-transport-in-server-reply-but-openrtsp-works) There are two workarounds here.
|
I'm still not following the issue/problem for Motion to resolve. Is this just a FYI/"How to" for those that have one of these cameras? |
Yes, this was more like FYI for everyone as there were many users affected |
Did you read the guide?
Yes
What is the base version number of Motion being used?
4.6.x
What was the install method?
Installed via package tool
What is base architecture?
x86
What is the distro being used?
Ubuntu
Disto version number
22.04
Camera type(s) being used?
Network camera with RTSP
Describe the issue/problem and steps to reproduce
Motion fails with error:
The same error is given by ffprobe:
However, the newer ffmpeg is able to read the stream:
Motion log output at log_level 8
The text was updated successfully, but these errors were encountered: