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
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章