<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [https://blog.csdn.net/sweibd/article/details/79175541](https://blog.csdn.net/sweibd/article/details/79175541) ## 1、需要在編碼中使能CODEC\_FLAG\_GLOBAL\_HEADER AVCodecContext的flags |= CODEC\_FLAG\_GLOBAL\_HEADER 設置這個標志位后,才能在AVCodecContext中的extradata和extradata\_size得到對應的音視頻頭信息。 視頻: AVCDecoderConfigurationRecord+ sps + pps 音頻: ASC FLAG ## 2、設置rtmp發送中的頭信息 ``` AVCodecContext\* dest \= pStream\->codec; if (\_pSendCtx\->oformat\->flags & AVFMT\_GLOBALHEADER) { dest\->flags |= CODEC\_FLAG\_GLOBAL\_HEADER; HostLogInfo("video oformat->flags=0x%08x, extradata\_size=%d", \_pSendCtx\->oformat\->flags, \_pVCodeCtx\->extradata\_size); // for flv, we should avoid invoking ff\_avc\_parse\_nal\_units\_buf() in flvenc.c if (\_pVCodeCtx\->extradata\_size \> 0) { int extra\_size \= (uint64\_t)\_pVCodeCtx\->extradata\_size + FF\_INPUT\_BUFFER\_PADDING\_SIZE; dest\->extradata \= (uint8\_t\*)av\_mallocz(extra\_size); memcpy(dest\->extradata, \_pVCodeCtx\->extradata, \_pVCodeCtx\->extradata\_size); dest\->extradata\_size \= \_pVCodeCtx\->extradata\_size; } } ``` 關鍵點: 1. 設置dest中的flag信息 2. 設置dest中的extradata, extradata\_size信息 這樣在avformat\_write\_header函數中才會頭幾幀寫入sps/pps asc
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看