ffmpeg_avcodec_log bad cseq #1485
Replies: 10 comments
-
What issue do you have? Corrupted picture? Can you please elaborate |
Beta Was this translation helpful? Give feedback.
-
Well it's not that easy to explain. So I've a camera connected to motion in a regular way. One highres stream for recording and another lores for detection. Sometimes weird things starting to happen. First of all I see tones of such messages coming into log file (bad cseq). In the mean time i see that motion starts to detect motion on video artefacts produced by corrupted stream. That at the end leads to issuing dozens of motion events with no actual movement. There are several problems:
So in order to improve this situation, would be nice to have:
|
Beta Was this translation helpful? Give feedback.
-
Are you using RTSP over UDP? |
Beta Was this translation helpful? Give feedback.
-
Nope, tcp only. It doesn't happen often, for instance last no errors period was about two weeks long. Then at some point, baaang, and Im getting it. Now the only way for me to fix that, is rebooting camera manually after tailing log file. If you need log, i can give it to you. And one more time: i dont think that its motion or ffmpeg issue. My camera is one of those cheapest and crappy AliExpress cams, so i blame camera. Whole this thing is more about letting user know that something bad is going on, rather than investigating ffmpeg codec streams tcp udp stuff (that might also be good of course, but I think its camera issue at the end). |
Beta Was this translation helpful? Give feedback.
-
There were few discussions about corrupted RTSP frames: So far there is no way for motion to know whether frame was corrupted or not. Decoder either provides a decoded picture as is or fails. Both ffmpeg and libjpeg can throw warnings, but that does not affect the process I have multiple cheap cameras that produce tons of ffmpeg errors, but work fine. So despite the that warning motion does not know if frame was fully decoded or just partially |
Beta Was this translation helpful? Give feedback.
-
Okay, but what about logging camera id into log file? So far that would be acceptable solution for monitoring such problems. |
Beta Was this translation helpful? Give feedback.
-
My log looks like this:
Here mk808b is the camera id In your log I see |
Beta Was this translation helpful? Give feedback.
-
Haha, yeah, now its starting to make sense, the thing is that I use mac addresses as camera name, so it looks like motion just takes a part of it and the rest is removed. |
Beta Was this translation helpful? Give feedback.
-
This is how my config look like: camera_name 00:12:31:04:10:56 |
Beta Was this translation helpful? Give feedback.
-
The log prints the thread name which is built from internal thread name and camera name variable and is hardcoded to 16 chars: https://github.com/Motion-Project/motion/blob/master/motion.c#L4093 |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm getting this in motion.log
[2:nc2:00:12:31:04] [INF] [ENC] [May 16 22:19:20] ffmpeg_avcodec_log: RTP: PT=60: bad cseq 0000 expected=d394
[2:nc2:00:12:31:04] [INF] [ENC] [May 16 22:19:20] ffmpeg_avcodec_log: RTP: PT=60: bad cseq d394 expected=000a
[2:nc2:00:12:31:04] [INF] [ENC] [May 16 22:19:20] ffmpeg_avcodec_log: RTP: PT=60: bad cseq 000a expected=d39e
[2:nc2:00:12:31:04] [INF] [ENC] [May 16 22:19:20] ffmpeg_avcodec_log: RTP: PT=60: bad cseq d39e expected=0014
[2:nc2:00:12:31:04] [INF] [ENC] [May 16 22:19:20] ffmpeg_avcodec_log: RTP: PT=60: bad cseq 0014 expected=d3a8
[2:nc2:00:12:31:04] [INF] [ENC] [May 16 22:19:20] ffmpeg_avcodec_log: RTP: PT=60: bad cseq d3a8 expected=001e
I understand that the issue is related with the corrupted RTSP stream, but there is no reaction from motion side on it, which means that motion is continuing to detect motion events in a corrupted stream which leads to constantly emiting video fragments.
Would be great if you can fix it in one of the following ways:
Beta Was this translation helpful? Give feedback.
All reactions