[Live-devel] H264 ipcamera problem

Serge Grondin serge.grondin at gmail.com
Wed Sep 22 14:28:47 PDT 2010


Hi Francisco,

I had this kind of problem before when talking to some RTSP server.
Sometimes the SPS (type 7) and PPS (type 8) NAL units are encoded in base64 
and given to client inside the SDP description.  When you want to decode 
such a stream you have to reinsert them before each IDR (type 5) NAL units. 
Also you need to reinsert the start code 0x00000001 before all NAL units 
that you receive, otherwise your decoder won't recognize this as a valid 
h.264 data stream.

Good luck!
Serge

--------------------------------------------------
From: "Francisco Esparza" <fesparza at itesm.mx>
Sent: Wednesday, September 22, 2010 11:43
To: <live-devel at ns.live555.com>
Subject: [Live-devel] H264 ipcamera problem

> Hello,
>
> I'm using openRTSP to capture the video stream from a
> h264 ip camera, I use
>
> openRTSP -t -v -n rtsp://ip_camera:8888 > video
>
> I send the video to a pipe and when I play the video with openCV I get
> the following:
>
> non-existing PPS referenced
> non-existing PPS 0 referenced
> decode_slice_header error
> no frame!
>
> max_analyze_duration reached
> Estimating duration from bitrate, this may be inaccurate
>
> This error repeats a lot of times, and finnaly I can watch the video for
> about 5 seconds and then it freezes. I read about this and I think is
> because there is no header in the NAL units, I saw in h264VideoFileSink
> file that there is a header 00000001
>
>   unsigned char start_code[4] = {0x00, 0x00, 0x00, 0x01};
>   addData(start_code, 4, presentationTime);
>
> Any help will be really appreciated.
>
> Thanks,
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
> 


More information about the live-devel mailing list