vlc 에서 pps 와 sps 를 받 지 못 했 습 니 다.

문제 packetizerh264 packetizer warning: waiting for SPS/PPS
디코더 가 처음 인 코딩 을 실 행 했 을 때 만 SPS, PPS, I 를 인 코딩 했 기 때 문 입 니 다.Frame; 
h264 packetizer has set so, that it sends sps/pps only first keyframe,
 I'm trying to figure what breaks if that is changed so sps/pps is written in every keyframe. 
[  | http://trac.videolan.org/vlc/ticket/1384]

해결 방법:
1. 인 코더 가 모든 관건 적 인 프레임 에 SPS, PPS 를 인 코딩 하 는데 보통 인 코더 가 만 든 SPS, PPS 가 똑 같 기 때문에 이런 방법 은 자원 을 소모 한다 고 합 니 다.
2. 서버 에서 클 라 이언 트 요청 을 받 았 을 때 첫 번 째 package 에 SPS, PPS 를 보 냅 니 다.
구체 적 으로 다음 과 같다.
1. 있다 VideoOpenFileSource 변 수 를 추가 합 니 다 isFirst Frame;
2. 구조 시 isFirst Frame = true 초기 화;
3. int 에서 VideoOpenFileSource:: readFromBufferChain () 수정 은 다음 과 같 습 니 다.
  1  if(isFirstFrame == true)
 2  {
 3  memcpy(fTo, h264_header, sizeof(h264_header)); /* h264_header = pps +sps*/
 4  offset = sizeof(h264_header);
 5  framesize = BufferChain_get(fInput.video_bufs, fTo + offset);
 6  offset += framesize;
 7  isFirstFrame = false;
 8  printf("this is the first fime
");
9 sleep(1); 10 } 11 else 12 { 13 framesize = BufferChain_get(fInput.video_bufs, fTo + offset); 14 offset += framesize; 15 } 1
[http://topic.csdn.net/u/20100801/17/ef35e664-92ff-4144-a35f-3984dcf11da3.html|   ] 


========================================================================
sdp   pps sps   :
packetization-mode          ,   NALU    (0);   (non-interleaved)    (1);  (interleaved)    (2)
sprop-parameter-sets   H.264             NAL  ,base64  ;( = sps+pps)
profile-level-id          H.264    profile      。         

        www.cppblog.com/czanyou/
ffmpeg decode   pps sps  :
stackoverflow.com/questions/3493742/problem-to-decode-h264-video-over-rtp-with-ffmpeg-libavcodec/3500432#3500432

   http://hi.baidu.com/yuan07804017/blog/item/a4f54e3ee4d3d0c99e3d624f.html

좋은 웹페이지 즐겨찾기