FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Modify the SRS server support H.265 encoding (RTMP protocol)

     

    "================================================= ================= Greatly srs (simple rtmp server) to modify the code to support server-side code, and increase the push h.265 h.265 bare streaming client, srs server itself push does not support h.265 and h.265 rtmp protocol bare runoff srs Download:. https: //github.com/ossrs/srs (downloaded 3.0release) csdn Download: https: //download.csdn. net / download / qq_44895902 / 12405623 A. Modify srs server-side code support h.265 1) vim src / app / srs_app_source.cpp srs_error_t In this function SrsSource :: on_video (SrsCommonMessage * shared_video) to find if (SrsFlvVideo :: acceptable (shared_video-> payload, shared_video-> size!)), Jump to SrsFlvVideo: : () function defines acceptable, the following modifications are as follows: bool SrsFlvVideo :: acceptable (char * data, int size) { // 1bytes required. if (size <1) { Return False; } char frame_type = data [0]; char codec_id = frame_type & 0x0f; frame_type = (frame_type >> 4) & 0x0f; if (frame_type <1 || frame_type> 5) // 1 <= x <= 5 { Return False; } / * 2020-03-31 head to solve the problem * / if (codec_id <2 || codec_id> 12) {// 2 <= x <= 7 Return False; } Return True; } 1234567891011121314151617181920 2) vim src / app / srs_app_source.cpp this function srs_error_t SrsSource :: on_video_imp (SrsSharedPtrMessage * msg) found bool is_sequence_header = SrsFlvVideo :: sh (msg-> payload, msg-> size) of the line to jump to sh ( ) function definition bool SrsFlvVideo :: sh (char * data, int size) {// determines whether h264 if (h264 (data, size)) { char frame_type = data [0]; frame_type = (frame_type >> 4) & 0x0F; char avc_packet_type = data [1]; // srs_trace ( "" h264 **** data [0] =% # x, data [1] =% # x,% d,% d "", data [0], data [1], frame_type, avc_packet_type ); return frame_type == SrsVideoAvcFrameTypeKeyFrame // 1 && avc_packet_type == SrsVideoAvcFrameTraitSequenceHeader; // 0 } // determine whether the h265 if (h265 (data, size)) { char frame_type = data [0]; frame_type = (frame_type >> 4) & 0x0F; char avc_packet_type = data [1]; // srs_trace ( "" h265 #### data [0] =% # x, data [1] =% # x,% d,% d "", data [0], data [1], frame_type, avc_packet_type ); return frame_type == SrsVideoHevcFrameTypeKeyFrame // 1 && avc_packet_type == SrsVideoHevcFrameTraitSequenceHeader; // 0 } if (size <2) { Return False; } Return True; } // Do not forget to add their own functions defined in the .h bool SrsFlvVideo :: h265 (char * data, int size) { if (size <1) Return False; char codec_id = data [0]; codec_id = codec_id & 0x0F; return codec_id == SrsVideoCodecIdHEVC; } 1234567891011121314151617181920212223242526272829303132333435363738 srs server-side support for h.265 encoding modified completed, srs recompile the code ./configure && make && make install Start the server: ./objs/srs -c conf / srs.conf see if the server is started successfully: ps -ef | grep srs II. H.265 bare increase flow push client, the push h.265 bare flows srs Look at a demo, the project has been uploaded as shown below Note: Pull Stream Player, VLC does not support the h.265, h.265 want to play, with Daniel Live SDK: https: //github.com/daniulive/SmarterStreaming III. The demo, verification testing Streaming - server >> - >> pull push h.265 stream demo bare flow 1) Start srs server / nginx-rtmp-server server (there is a patch to take own support h.265) to determine the server ip: 192.168.43.49 port number: 19352) began to push the stream: cd / srs / bin directory: ./srs_h265_raw_publish xxx.h265 rtmp: //192.168.43.49: 1935 / live / livestream 25 3) Daniel SDK pull live streaming rtmp: // It can be known from the figure 192.168.43.49:1935/live/livestream normal playback, description modify srs support server-side code encoding h.265 Four .ffmpeg command to extract the bare stream from MP4 files 1) h.264 encoded MP4 file ffmpeg -i input.mp4 -vcodec copy -an output.h264 2) h.265 encoded MP4 file ffmpeg -i xxx.mp4 -vcodec copy -an -bsf hevc_mp4toannexb -f hevc xxx .hevc "

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us