oddity-ai / oddity-rtsp

Oddity's suite of tools for handling RTSP streams.
Apache License 2.0
45 stars 7 forks source link

Cannot run example from README #23

Closed jerafs closed 1 year ago

jerafs commented 1 year ago

Issue

When I run the example snippet from the README, I get:

   Compiling oddity-rtsp-server v0.1.0 (/home/jer/repos/oddity-rtsp/oddity-rtsp-server)
error[E0308]: mismatched types
  --> src/media/video/rtp_muxer.rs:32:3
   |
32 | /   task::spawn_blocking(move || {
33 | |       rtp_muxer.finish()
34 | |     })
35 | |     .await
36 | |     .unwrap()
   | |_____________^ expected struct `Vec`, found enum `std::option::Option`
   |
   = note: expected enum `std::result::Result<Vec<_>, _>`
              found enum `std::result::Result<std::option::Option<Vec<_>>, _>`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `oddity-rtsp-server` due to previous error

Steps to reproduce

sudo apt-get install -y libavutil-dev libavformat-dev libavfilter-dev libavdevice-dev
git clone git@github.com:oddity-ai/oddity-rtsp.git
cd oddity-rtsp
cd oddity-rtsp-server
echo 'server:
  host: 0.0.0.0
  port: 5554
media:
  - name: "Big Buck Bunny"
    path: "/example"
    kind: file
    source: "https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"' >> config.yaml
LOG=oddity_rtsp_server=info cargo run --release -- config.yaml

Versions

gerwin3 commented 1 year ago

Newest version of video-rs wasn't compatible with master-branch yet. Not sure how you got the newer version since it was pinned to 0.2.2 but either way I upgrade the dependency and made the change to fix it. Should work again!

jerafs commented 1 year ago

Yes, that fixed it. Thanks!