dank074 / Discord-video-stream

Experiment for making video streaming work for discord selfbots.
183 stars 35 forks source link

stream rtp server #100

Closed leonimeloo closed 2 months ago

leonimeloo commented 2 months ago

can anyone let me know how to stream a rtp to discord?

dank074 commented 2 months ago

Just supply the rtp url to the stream function

leonimeloo commented 2 months ago

i tried custom-stream-copy-codec and the basic usage, i got these errors:

Unable to copy the codec: No suitable stream found

 streams: [
    {
      index: 0,
      codec_name: 'h264',
      codec_long_name: 'H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10',
      profile: 'unknown',
      codec_type: 'video',
      codec_tag_string: '[27][0][0][0]',
      codec_tag: '0x001b',
      width: 0,
      height: 0,
      coded_width: 0,
      coded_height: 0,
      closed_captions: 0,
      film_grain: 0,
      has_b_frames: 1,
      sample_aspect_ratio: 'N/A',
      display_aspect_ratio: 'N/A',
      pix_fmt: 'unknown',
      level: '-99',
      color_range: 'unknown',
      color_space: 'unknown',
      color_transfer: 'unknown',
      color_primaries: 'unknown',
      chroma_location: 'unspecified',
      field_order: 'unknown',
      refs: 1,
      is_avc: 'false',
      nal_length_size: 0,
      id: 'N/A',
      r_frame_rate: '30000/1001',
      avg_frame_rate: '30000/1001',
      time_base: '1/90000',
      start_pts: 2603475,
      start_time: 28.9275,
      duration_ts: 'N/A',
      duration: 'N/A',
      bit_rate: 'N/A',
      max_bit_rate: 'N/A',
      bits_per_raw_sample: 'N/A',
      nb_frames: 'N/A',
      nb_read_frames: 'N/A',
      nb_read_packets: 'N/A',
      disposition: [Object]
    }
  ],
  format: {
    filename: 'rtp://127.0.0.1:8722',
    nb_streams: 1,
    nb_programs: 1,
    format_name: 'rtp',
    format_long_name: 'RTP input',
    start_time: 28.9275,
    duration: 'N/A',
    size: 'N/A',
    bit_rate: 'N/A',
    probe_score: 100
  },
  chapters: []
}

could u help me?

longnguyen2004 commented 2 months ago

ffmpeg is failing to detect the pixel format (pix_fmt: unknown). Not sure if this is something we can help you with. You can try other protocols, personally I've had great luck with RTSP and SRT.

leonimeloo commented 2 months ago

ffmpeg is failing to detect the pixel format (pix_fmt: unknown). Not sure if this is something we can help you with. You can try other protocols, personally I've had great luck with RTSP and SRT.

Nice, I've tested RTSP protocol and it works fine. Thank you so much!