H264 NAL Unit Not Found Error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

H264 NAL Unit Not Found Error

unalozten
frame.pcap
<http://gstreamer-devel.966125.n4.nabble.com/file/t378626/frame.pcap>  

Hello,

We've using gstreamer to play and record h264 live video stream, but
recently we've encountered a problem during one of the tests.

The problem is that h264parse element sent an error message says that “H264
NAL Unit not found”. When we investigated the problem, we saw that in one of
the frames, consecutive bytes of 00s followed by 01 was taken as a new
frame.

However, in h264 protocol, it’s stated that in order to distinguish
consecutive 00s in the data from the start of the frame, third byte of 00s
should be changed with 03, we’re aware that this is a problem with encoding
the raw video.

However we were wondering if there is a way to go around this problem on the
gstreamer side.

You can find the related wireshark capture of the erroneous frame in the
attachment.

Thank you in advance for your reply.

Sincerely,
Unal




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: H264 NAL Unit Not Found Error

Nicolas Dufresne-5
Le mardi 06 novembre 2018 à 00:38 -0600, unalozten a écrit :
> frame.pcap
> <http://gstreamer-devel.966125.n4.nabble.com/file/t378626/frame.pcap>  

The pcap does not include any pps/sps, as a side effect, the
depayloader drops the stream as it can't create caps for it. Can you
provide an sprop of a pcap with sps/pps packet ?

>
> Hello,
>
> We've using gstreamer to play and record h264 live video stream, but
> recently we've encountered a problem during one of the tests.
>
> The problem is that h264parse element sent an error message says that “H264
> NAL Unit not found”. When we investigated the problem, we saw that in one of
> the frames, consecutive bytes of 00s followed by 01 was taken as a new
> frame.

You mean a new NALU. This would be strictly forbidden by the H264 spec,
and pretty hard to workaround. Though, I'd like to check the bitstream
myself before jumping to conclusions.

>
> However, in h264 protocol, it’s stated that in order to distinguish
> consecutive 00s in the data from the start of the frame, third byte of 00s
> should be changed with 03, we’re aware that this is a problem with encoding
> the raw video.
>
> However we were wondering if there is a way to go around this problem on the
> gstreamer side.
>
> You can find the related wireshark capture of the erroneous frame in the
> attachment.
>
> Thank you in advance for your reply.
>
> Sincerely,
> Unal
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: H264 NAL Unit Not Found Error

unalozten
This post was updated on .
Frame.pcap

Hello again,

After some fixes, we started a H264 stream and we didn't receive the "H264 NAL Unit not found" error when we played this stream using Gstreamer, but we've encountered another warning message saying that "input stream is corrupt; it contains a NAL unit of length 1". This warning message comes from "h264parse" element.

You can find the new .pcap file which contains two-frame data, in the attachment.

The pipeline which was used to play and record the stream is below:

gst-launch-1.0.exe -vvv -e --gst-debug=2 udpsrc port=6670 caps="application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=101" buffer-size=1200000 ! rtph264depay ! video/x-h264, stream-format=byte-stream, width=1920, height=1080, framerate=25/1 ! h264parse ! queue2 ! tee name="splitter" ! queue ! avdec_h264 ! queue2 ! videoconvert ! video/x-raw, format=YUY2 ! d3dvideosink sync=false splitter. ! queue ! avimux ! filesink location="LOCATION"

Thank you in advance for your reply.
Reply | Threaded
Open this post in threaded view
|

Re: H264 NAL Unit Not Found Error

Nicolas Dufresne-5
Le jeudi 15 novembre 2018 à 06:21 -0600, unalozten a écrit :
> Hello again,
>
> After some fixes, we started a H264 stream and we didn't receive the "H264
> NAL Unit not found" error when we played this stream using Gstreamer, but
> we've encountered another warning message saying that *"; 1"*. This warning message comes
> from "h264parse" element.

Enable more debugging to find our more about why it's broken.

GST_DEBUG=3 gst-launch-1.0 ...

>
> You can find the new .pcap file which contains two-frame data, in the
> attachment.
>
> The pipeline which was Frame.pcap
> <http://gstreamer-devel.966125.n4.nabble.com/file/t378626/Frame.pcap>   used
> to play and record the stream is below:

I cannot confirm/reproduce your issue as you didn't make your PCAP long
enough. It should contain at least one PPS and SPS NALU.

> gst-launch-1.0.exe -vvv -e --gst-debug=2 udpsrc pNALU.=6670
> caps="application/x-rtp, media=video, clock-rate=90000, encoding-name=H264,
> payload=101" buffer-size=1200000 ! rtph264depay ! video/x-h264,
> stream-format=byte-stream, width=1920, height=1080, framerate=25/1 !
> h264parse ! queue2 ! tee name="splitter" ! queue ! avdec_h264 ! queue2 !
> videoconvert ! video/x-raw, format=YUY2 ! d3dvideosink sync=false splitter.
> ! queue ! avimux ! filesink location="LOCATION"
>
> Thank you in advance for your reply.
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment