Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no ui+replay/cabana video stream on macOS #34042

Open
royjr opened this issue Nov 18, 2024 · 16 comments
Open

no ui+replay/cabana video stream on macOS #34042

royjr opened this issue Nov 18, 2024 · 16 comments
Labels
PC Issues related to running openpilot on PC

Comments

@royjr
Copy link
Contributor

royjr commented Nov 18, 2024

Describe the bug

Screenshot 2024-11-17 at 23 01 09 Screenshot 2024-11-17 at 23 05 01 Screenshot 2024-11-17 at 23 04 58

OS Version

macOS 15.1

openpilot version or commit

master

@royjr royjr added the PC Issues related to running openpilot on PC label Nov 18, 2024
@royjr royjr changed the title cabana: missing video no ui+replay/cabana video stream on macOS Nov 18, 2024
@royjr
Copy link
Contributor Author

royjr commented Dec 9, 2024

Seems to only affect road camera

Screenshot 2024-12-09 at 00 55 36 Screenshot 2024-12-09 at 00 55 29

@deanlee
Copy link
Contributor

deanlee commented Dec 10, 2024

Could you confirm if the route you’re working with includes road camera data?
Can you view the road camera by running cabana --demo with the demo route?

@royjr
Copy link
Contributor Author

royjr commented Dec 10, 2024

None of the cameras work for the demo route in replay.

All but the road camera works in cabana
./cabana --demo --qcam --ecam --dcam

If I swap file names f <-> e, f does show up instead of e, so its not a file/encoding issue

Screenshot 2024-12-10 at 06 23 42 Screenshot 2024-12-10 at 06 23 38 Screenshot 2024-12-10 at 06 23 51 Screenshot 2024-12-10 at 06 23 48

@royjr
Copy link
Contributor Author

royjr commented Dec 10, 2024

Confirmed flags are being set correctly and files urls are good

Screenshot 2024-12-10 at 06 50 09

@deanlee
Copy link
Contributor

deanlee commented Dec 10, 2024

It looks like this is a port conflict issue. VisionIPC on macOS uses fixed ports for streaming camera data over ZeroMQ:

  • 9000 for the road camera,
  • 9001 for the driver camera,
  • 9002 for the wide road camera.

Please check if port 9000 is currently occupied by another application on your system. You can verify this by running lsof -i :9000. If it's in use, you’ll need to free it to allow VisionIPC to function properly.

@royjr
Copy link
Contributor Author

royjr commented Dec 10, 2024

That worked, thanks!

@deanlee
Copy link
Contributor

deanlee commented Dec 10, 2024

Glad to hear that worked!

@royjr
Copy link
Contributor Author

royjr commented Dec 11, 2024

Video also freezes and doesn't recover until app is restarted. (let me know if this needs a new issue)

  • closing the stream and reopening using the menu doesn't help.
  • only freezes when seeking (both using the seek bar and using the signals)
  • happens on both local and remote routes
Starting listener for: camerad
Error sending a packet for decoding: -35
Error sending a packet for decoding: -35
Error sending a packet for decoding: -35
camera[0] failed to get frame: 905
Error sending a packet for decoding: -35
...
Error sending a packet for decoding: -35
camera[0] failed to get frame: 906
Error sending a packet for decoding: -35
...
Error sending a packet for decoding: -35
camera[0] failed to get frame: 907
Error sending a packet for decoding: -35
...
Error sending a packet for decoding: -35
camera[0] failed to get frame: 908
Error sending a packet for decoding: -35

@royjr
Copy link
Contributor Author

royjr commented Dec 11, 2024

Screenshot 2024-12-10 at 20 43 03 Screenshot 2024-12-10 at 20 45 23

Also tried passing REPLAY_FLAG_NO_HW_DECODER, but didnt seem to fix

@deanlee
Copy link
Contributor

deanlee commented Dec 11, 2024

What's your ffmpeg version? Use ffmpeg -version to check.

@royjr
Copy link
Contributor Author

royjr commented Dec 11, 2024

ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers
built with Apple clang version 16.0.0 (clang-1600.0.26.4)
configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/7.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags='-Wl,-ld_classic' --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libharfbuzz --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon
libavutil      59. 39.100 / 59. 39.100
libavcodec     61. 19.100 / 61. 19.100
libavformat    61.  7.100 / 61.  7.100
libavdevice    61.  3.100 / 61.  3.100
libavfilter    10.  4.100 / 10.  4.100
libswscale      8.  3.100 /  8.  3.100
libswresample   5.  3.100 /  5.  3.100
libpostproc    58.  3.100 / 58.  3.100

@deanlee
Copy link
Contributor

deanlee commented Dec 11, 2024

Could you help test if PR #34205 resolves the issue?

@royjr
Copy link
Contributor Author

royjr commented Dec 11, 2024

Its better but still freezes
Screenshot 2024-12-11 at 02 05 05
Screenshot 2024-12-11 at 02 04 56

@royjr
Copy link
Contributor Author

royjr commented Dec 11, 2024

It does unfreeze (by itself) at the start of the next segment (sometimes)

@deanlee
Copy link
Contributor

deanlee commented Dec 11, 2024

Have other users encountered the same issue on macOS? The decoder part in FrameReader has remained mostly unchanged for several years.

@royjr
Copy link
Contributor Author

royjr commented Dec 11, 2024

not sure, but its defenitely better, and no freezes using one camera

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PC Issues related to running openpilot on PC
Projects
None yet
Development

No branches or pull requests

2 participants