Closed mohsundiod closed 2 weeks ago
Have you tried using the runOnNotReady
hook in combination with ffmpeg to stream a file?
tanx, runOnNotReady do it with this config:
paths:
udp:
source: udp://238.0.0.1:1234
runOnReady: ./ffmpeg.exe -i rtsp://localhost:$RTSP_PORT/$MTX_PATH -c:v copy -c:a copy -f rtsp -rtsp_transport tcp rtsp://localhost:$RTSP_PORT/live
runOnReadyRestart: no
runOnNotReady: ./ffmpeg.exe -re -f lavfi -i testsrc=size=1280x720:rate=30 -pix_fmt yuv420p -c:v libx264 -preset ultrafast -b:v 600k -f rtsp -rtsp_transport tcp rtsp://localhost:$RTSP_PORT/live
live:
Problem: the client dissconnect from server. can switch stream on the fly?
Again, you can use a hook: I think runOnDisconnect
is what you are looking for.
For posterity, as long as #3372 is open this issue is not solvable
This issue is a duplicate of #2214.
For posterity, as long as https://github.com/bluenviron/mediamtx/issues/3372 is open this issue is not solvable
This other issue is completely unrelated from this and is invalid.
Describe the feature
media server play default file in loop (mp4 or jpeg or other path) if publisher is not ready.