I am using mediamtx
for starting RTSP server. The command that I am using for ffmpeg is as follows:
ffmpeg -re -stream_loop -1 -i ./clouds.mp4 -f rtsp -rtsp_transport tcp rtsp://localhost:8554
The tried various different options but not luck. I am not getting the ffmpeg to stream the video.
The file details are as follows:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './clouds.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42isomavc1
creation_time : 2023-01-12T20:44:34.000000Z
Duration: 00:00:56.34, start: 0.000000, bitrate: 2952 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080, 2758 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
Metadata:
creation_time : 2023-01-12T20:44:34.000000Z
handler_name : Vimeo Artax Video Handler
vendor_id : [0][0][0][0]
encoder : AVC Coding
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
Metadata:
creation_time : 2023-01-12T20:44:34.000000Z
handler_name : Vimeo Artax Audio Handler
vendor_id : [0][0][0][0]
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
The error on mediamtx
terminal window is:
2023/05/08 17:30:43 INF [RTSP] [session 298895e1] created by 127.0.0.1:38024
2023/05/08 17:30:43 INF [RTSP] [conn 127.0.0.1:38024] closed (invalid path)
rtsp://localhost:8554/mystream
... which is different to what you are using