We are having an issue to display JVC camera’s H.264 stream by gstreamer.
Stream seems fine at first, but about 4 hours later it starts dropping frames from queue.
We have used the gstreamer pipeline below to receive the stream:
We have confirmed that this issue happens only when gstreamer is receiving H.264 stream from JVC cameras.
We have also tried these below, but not improved.
Use nvv4l2decoder instead of omxh264dec.
Increase the amount of queue buffer’s threshold.
On the other hand, streams looks fine on the camera web UI even if this problem is happening.
From these results, our suspicion is that gstreamer plugin omxh264dec and nvv4l2decoder do not work correctly only in this case.
Are these any known issues or compatibility problems?
And we also want to solve this problem. So Could you please assist?
Hi,
We have deprecated omx plugin. Please use nvv4l2decoder and enabler the property:
enable-max-performance: Set to enable max performance
flags: readable, writable
Boolean. Default: false
And default gstreamer version is 1.14.5. You may try the default version and see it is more stable. The default system image has done and passed SQA tests before it is published.
Thanks for reply, we tried the option you mentioned by enabling enable-max-performance property.
We’re not sure what this property does to be honest, but the problem didn’t get improved.
We got these logs only after pipeline starts dropping frames.
0:34:15.321717472 9933 0x7f600736d0 WARN h264parse gsth264parse.c:1351:gst_h264_parse_handle_frame:<h264parse> broken/invalid nal Type: 1 Slice,
Size: 4473 will be dropped
0:34:15.321993504 9933 0x7f600736d0 WARN h264parse gsth264parse.c:1351:gst_h264_parse_handle_frame:<h264parse> broken/invalid nal Type: 1 Slice,
Size: 5429 will be dropped
0:34:15.322148384 9933 0x7f600736d0 WARN h264parse gsth264parse.c:1351:gst_h264_parse_handle_frame:<h264parse> broken/invalid nal Type: 1 Slice,
Size: 5041 will be dropped
This is the warning of h264parse , so we don’t think this parse element is also working well.
We also tested this pipeline on Orin AGX (Revision 35.3.1, gstreamer 1.16.3), and this issue did not happen.
We haven’t tested on the default gstreamer version yet.
Hi,
The issue looks to be in rtspsrc ! h264parse of 1.14.5. Looks like it does not handle the packets well and cannot send valid h264 stream to next nvv4l2decoder. One possible solution is to manually build 1.16.3 and upgrade to the version for a try. Please refer to guidance in developer guide
Sorry for being late. We took a bit time to find TX2 reference board to test default gstreamer version 1.14.5.
This issue still happened even at gstreamer 1.14.5.
We will try it on TX2 (Revision 32.7.4) with gstreamer 1.16.3.
As we already said, the issue didn’t happened on Orin AGX (Revision 35.3.1, gstreamer 1.16.3).
So if this still exists on new version, we guess nvv4l2decoder at R32.7.4 might have some issues or bugs.
In that case, can’t we fix this issue at R32 environment for now?
Hi,
It doesn’t seem to be an issue in nvv4l2decoder. If valid and continuous bitstream can be fed to decoder , we would expect it to work well. We would suggest investigate why h264parse drops the bitstream intermittently.
link fakesink after h264parse ( queue | h264parse | fakesink ) → no stack frames on queue
link fakesink after nvv4l2decoer ( queue | h264parse | nvv4l2decoder | fakesink) → frames stacked on queue
From this results, we agree with your comment.
The issue looks to be in rtspsrc ! h264parse of 1.14.5. Looks like it does not handle the packets well and cannot send valid h264 stream to next nvv4l2decoder .
And we also tried this down below.
One possible solution is to manually build 1.16.3 and upgrade to the version for a try.
We upgraded gstreamer 1.16.3 on TX2 (R. 32.7.4), but it did not solve the problem.
As I already said, orin AGX (Revision 35.3.1, gstreamer 1.16.3) didn’t cause any issues.
The results are different even though nvv4l2decoder version is same between Orin AGX and TX2.
These two have only revision difference.
We tried all options that you suggested, but unfortunately things haven’t being well.
We are investigateing h264parsebut we’ve been getting nothing right now.
If software decoder can decode the stream without issue and hardware decoder malfunctions, please attach the dumped stream so that we can try and debug further.
First, there was no issue for dumped stream to decode by whichever software decoder or hardware decoder.
So we are thinking nvv4l2decoder is not main reason of this issue.
Next, we also thought that timestamp might cause this issue, So we dumped the RTP packets and replayed them by tcpreplay command.
However replaying them, there was no issue on that.
The only difference between receiving normal stream and replaying stream is the src element, rtspsrc and udpsrc.
rtspsrc is created by combining udpsrc and rtpbin, so rtpbin might be the main reason for this issue on whatever the gstreamer version is. (at least between gstreamer1.14.5 and 1.16.3.)
We couldn’t attach dumped RTP packets because of file size.
This issue happens after a while from receiving stream, so it is a bit hard to make attachable size file.
Is there any way to share the packet file?
If rtpbincauses this issue, we have two questions,
Is there anything to solve this? (It happens both of gstreamer versions 1.14.5 and 1.16.3)
On Orin AGX(R 35.3.1, gst1.16.3), there is no issue. What is the difference?
Hi,
The rtspsrc and h264parse plugins are open source, so you may add prints to the plugins to catch more information. To clarify why invalid nal Type is reported in the error condition.
Thanks for reply, we will continue on it.
Lastly, we have one question related to nvidia decoder element.
As we said before, this issue doesn’t happen on Orin AGX(R35.3.1, gst1.16.3).
But it does happen on TX2(R32.7.3, gst1.14.5 and 1.16.3).
Because of using same gstreamer version, we’re thinking only difference is nvv4l2decoder made by nvidia which does HW decode.
Does that mean Orin AGX can decode stream data which include invalid nal type sent from rtpbin ! h264parse, and TX2 cannot do that?
Are there any difference between them?