So I've gotten it to kind of work. I changed my ffmpeg command to
ffmpeg -i rtmp://localhost:1935/live/pi -c:v libx264 -preset ultrafast -tune fastdecode -g 1 -f rtp rtp://localhost:8554
I need to learn what the "-g 1" part is for as it works without it, or with different values, but I haven't tested enough yet to see what difference it makes, nor have I read up on what it is supposed to do.
Now I can see my video in the streaming demo. However, after several seconds it always stops working. The client says the track is muted, and on the server side Janus spits out a bunch of the following and then the stream dies:
[WARN] [3352707444203379] ICE failed for component 1 in stream 1, but let's give it some time... (trickle received, answer received, alert not set)
[ERR] [ice.c:janus_ice_outgoing_traffic_handle:4559] [3352707444203379] ... only sent -1 bytes? (was 71)
[ERR] [ice.c:janus_ice_outgoing_traffic_handle:4559] [3352707444203379] ... only sent -1 bytes? (was 1500)
[ERR] [ice.c:janus_ice_outgoing_traffic_handle:4559] [3352707444203379] ... only sent -1 bytes? (was 1500)
[ERR] [ice.c:janus_ice_outgoing_traffic_handle:4559] [3352707444203379] ... only sent -1 bytes? (was 1500)
...
The video disappears from the demo page, but if I stop the stream and then start again, it works for a little while and the cycle repeats. The video glitches some, but that's almost certainly because I have a very poor internet connection, and streaming video out from the pi, in on my computer, plus having multiple ssh windows open is more than it likes to handle. The video also looks more pixelated in the Janus demo than it does when pulling the RTMP stream, which I assume can be fixed by changing how it is transcoded. The main problem is that the stream dies after a short time, so if anyone has any ideas about how to solve that issue I would greatly appreciate it.