angelcam / rust-ac-ffmpeg

Simple and safe Rust interface for FFmpeg libraries.
MIT License
197 stars 33 forks source link

how to create demuxer from url instead of local file? #83

Open snowway opened 3 months ago

snowway commented 3 months ago
 // I want to create stream from rtmp:// rtsp:// http:// protocol
 let stream = File::open("./sample.mp4").unwrap();
 let io = IO::from_read_stream(stream);
 let mut demuxer = Demuxer::builder()
      .build(io).unwrap()
      .find_stream_info(None)
      .map_err(|(_, err)| err).unwrap();