Score:0

Why can push mp4 into a rtmp stream instead of rtsp stream?

in flag

I build stream server with nginx, and can push the MP4 into a rtmp stream with :

ffmpeg -re -i /mnt/hls/m7.mp4  -vcodec libx264 -vprofile baseline -g 30 -acodec aac -strict -2 -f flv rtmp://127.0.0.1/live

Now I want to push it with rtsp format:

ffmpeg -re  -i /mnt/hls/m7.mp4  -f rtsp -rtsp_transport tcp rtsp://127.0.0.1/live

Error info encountered:

[tcp @ 0x55c7d6a157c0] Connection to tcp://127.0.0.1:554?timeout=0 failed: Connection refused
Could not write header for output file #0 (incorrect codec parameters ?): Connection refused
Error initializing output stream 0:0 -- 
[aac @ 0x55c7d65b6500] Qavg: nan
[aac @ 0x55c7d65b6500] 1 frames left in the queue on closing
Conversion failed!
djdomi avatar
za flag
imho, it seems that you remove or missing the correct encoding value, why are you changing the syntax completely?
Score:0
in flag

It is not that seems that you remove or missing the correct encoding value.
No rtsp server build on my vps,only rtmp server ebedded in nginx on my vps.

url="https://github.com/aler9/rtsp-simple-server/releases/download/v0.18.2/rtsp-simple-server_v0.18.2_linux_amd64.tar.gz"
curl  -L $url -O 
tar -xzf rtsp-simple-server_v0.18.2_linux_amd64.tar.gz
./rtsp-simple-server

Now we can push rtsp stream on the server with ffmpeg:

ffmpeg -re  -i /mnt/hls/m7.mp4  -f rtsp -rtsp_transport tcp rtsp://127.0.0.1/live

It works fine!.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.