ffmpeg stream rtsp to mpegts

3.6k views Asked by At

I'm trying to transcode an rtsp stream into something that Android can read.

I need to take a input of rtsp: Transcode it to H.264 AVC (Baseline) MPEGTS + AAC LC audio. Broadcast out onto the localhost socket.

Currently I have: bash ffmpeg -re -i rtsp://admin:12345@remote-address:55266/videoMain -c:a copy -c:v libx264 -r 25 -preset ultrafast -profile:v baseline -f mpegts udp://127.0.0.1:65440

I see ffmpeg printing out that it's copying frames to the output. But if I try to connect to the stream in VLC, I see nothing. (The original source works fine in VLC).

Can anyone see if I am doing something wrong?

1

There are 1 answers

0
avnr On

You should send the stream to a multicast address, for example udp://224.0.0.100.

Note that without an announcement this will work only if the stream consumer knows what to expect. Otherwise it is better to use RTSP so that the stream details are announced in an sdp file.

Hope this helps.