ffmpeg 推RTSP流 、本地流到本地、nginx服务器的命令

公测码流地址: rtsp://184.72.239.149/vod/mp4://BigBuckBunny_175k.mov


ffmpeg  -i /hefu/live/zip.flv -f flv rtmp://192.168.1.160:1935/live

子码流推流: sudo ffmpeg -i "rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream "  -f flv -y "rtmp://192.168.1.160:1935/live"

sudo ffmpeg -i "rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream "-ar 22050 "rtmp://192.168.1.160:1935/live"

sudo ffmpeg -i "rtsp://admin:Admin@[email protected]:554//Streaming/Channels/101"-f flv -y "rtmp://192.168.1.160:1935/hls_alic"

ffmpeg -i "rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream" -f flv -r 25 -s 640x360 -an rtmp://192.168.1.160:1935/live


ffmpeg -i "rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream" -f  http://localhost:9999/feed1.ffm

RTSP 转为 RTMP 推流

ffmpeg -f rtsp -rtsp_transport tcp -i rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream -f flv -r 25 -an rtmp://192.168.1.160:1935/live
ffmpeg -f rtsp -rtsp_transport tcp -i rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream -f flv -r 25 -an rtmp://192.168.1.160:1935/hls_alic

ffmpeg -f rtsp -rtsp_transport tcp  -i rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream?videoCodecType=H.264  http://192.168.1.160:9999/feed1.ffm

ffmpeg -re -f rtsp -rtsp_transport tcp -i rtsp://admin:Admin@[email protected]:554/h264/ch1/main/av_stream?videoCodecType=H.264 -vcodec libx264 -vprofile baseline  -f flv -r 25 -s 704*576  -an rtmp://192.168.1.160/hls/test

ffmpeg -re -i rtsp://admin:Admin@[email protected]:554/h264/ch1/main/av_stream?videoCodecType=H.264 -vcodec libx264 -vprofile baseline  -f flv -r 25 -s 704*576  -an rtmp://192.168.1.160/hls/test

ffmpeg -re -i rtsp://admin:Admin@[email protected]:554/h264/ch1/main/av_stream?videoCodecType=H.264 -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 500x400 -q 10 rtmp://192.168.1.160/hls/test

ffmpeg -f rtsp -rtsp_transport tcp  -i rtsp://admin:Admin@[email protected]:554/h264/ch1/main/av_stream?videoCodecType=H.264 -vcodec libx264 -vprofile baseline -acodec aac -ar 44100 -strict -2 -ac 1 -f flv -s 500x400 -q 10 rtmp://192.168.1.160/hls/test

本地推流:
sudo ffmpeg -i /hefu/live/zip.flv  -f flv -y  "rtmp://192.168.1.160:1935/live"

循环推流: 
sudo ffmpeg  -threads 2 -re -fflags +genpts -stream_loop -1 -i /hefu/live/zip.flv -vcodec libx264 -vprofile baseline -acodec aac -c copy -f flv -y  "rtmp://192.168.1.160:1935/live"

sudo ffmpeg  -threads 2 -re -fflags +genpts -stream_loop -1 -f rtsp -rtsp_transport tcp  -i /hefu/live/zip.mp4 -vcodec libx264 -vprofile baseline -acodec aac -c copy -f flv -y  "rtmp://192.168.1.160/hls/movie"


推流命令:ffmpeg -f rtsp -rtsp_transport tcp  -i rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream  http://localhost:9999/feed1.ffm
(注意要RTSP 转 TCP)

实时流存本地:
ffmpeg -f rtsp -rtsp_transport tcp -i rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream  -acodec copy -vcodec copy -f /hefu/live/20190815.mp4
ffmpeg -re  -rtsp_transport tcp -i  rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream -acodec copy -vcodec copy -f /hefu/live/20190815.mp4

ffmpeg -re -rtsp_transport tcp -i rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream  -acodec copy -vcodec copy  /hefu/live/20190815.mp4

ffmpeg -re -rtsp_transport tcp -i rtsp://admin:Admin@[email protected]:554/h264/ch1/sub/av_stream  -vcodec libx264 -vprofile baseline -acodec aac /var/www/html/mediaplay/zip.mp4

sudo ffmpeg -i /hefu/live/zip.mp4  -vcodec libx264 -vprofile baseline -acodec aac /tmp/live/zip.mp4
ffmpeg -re -rtsp_transport tcp -i /hefu/live/zip.mp4  -vcodec libx264 -vprofile baseline -acodec aac -f /tmp/live/zip.mp4
 

你可能感兴趣的:(ffmpeg,RTSP,RTMP)