欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

srt学习笔记零:srt总结帖 博客分类: ffmpegsrt ffmpegsrt 

程序员文章站 2024-03-14 16:08:58
...
1。无服务的方式:udp,
2。srs作为服务端:rtmp推收都可用 ;srt推,rtmp播放可用,支持264 https://haoningabc.iteye.com/admin/blogs/2513514
3。srt-live-server作为服务端: srt协议推收测试可用,支持264 https://haoningabc.iteye.com/admin/blogs/2513939
4。nginx-rtmp-module && pingos作为服务端:rtmp推收都可用, 可以支持265 https://haoningabc.iteye.com/admin/blogs/2514035

5。ffserver还没看,live555

#!/bin/sh
# 1 udp
#ffmpeg -re -i chrome.mp4 -f h264 udp://127.0.0.1:6666
#ffplay udp://127.0.0.1:6666

# 2 srs rtmp
#ffmpeg -re -i chrome.mp4 -vcodec copy -acodec copy -f mpegts 'srt://127.0.0.1:10080?streamid=#!::h=live/livestream,m=publish'
#ffplay -loglevel verbose  "rtmp://127.0.0.1/live/livestream live=1"

#ffmpeg -re  -i chrome.mp4 -vcodec libx264 -preset veryfast -f flv rtmp://127.0.0.1/live/livestream


# 3 srs rtmp  and camera
#ffmpeg -f avfoundation -video_size 640x480 -framerate 30 -i 0:0 -vcodec libx264 -preset veryfast -f flv rtmp://127.0.0.1/live/livestream
#ffplay -loglevel verbose  "rtmp://127.0.0.1/live/livestream live=1"


# 4  srs rtmp desktop and camera
#ffmpeg -f avfoundation -i "1" -vcodec libx264 -preset ultrafast -acodec libfaac -f flv rtmp://127.0.0.1/live/livestream
#ffplay -loglevel verbose  "rtmp://127.0.0.1/live/livestream live=1"


# 5 srt-live-server and camera

ffmpeg -f avfoundation -framerate 30 -i "0:0" -vcodec libx264 -preset ultrafast -tune zerolatency -flags2 local_header -acodec libmp3lame -g 30 -pkt_size 1316 -flush_packets 0 -f mpegts "srt://127.0.0.1:8080?streamid=uplive.sls.com/live/test"

#ffplay -fflags nobuffer -i "srt://127.0.0.1:8080?streamid=live.sls.com/live/test"


#6 jinshan ffmepg push 265 to pingos
#/opt/hao/ffmpeg/FFmpeg/ffmpeg -re -i ~/Desktop/chrome.mp4 -c:a copy -c:v libx265 -f flv rtmp://127.0.0.1/live/livestream
#/opt/hao/ffmpeg/FFmpeg/ffplay -loglevel verbose  "rtmp://127.0.0.1/live/livestream live=1"

#7

#/opt/hao/ffmpeg/FFmpeg/ffmpeg -f avfoundation -framerate 30 -i "0:0" -c:a copy -c:v libx265 -f flv rtmp://127.0.0.1/live/livestream
#/opt/hao/ffmpeg/FFmpeg/ffmpeg -f avfoundation -framerate 30 -i "0:0" -c:a copy -c:v libx265 -g 30 -pkt_size 1316 -flush_packets 0 -f flv rtmp://127.0.0.1/live/livestream

#/opt/hao/ffmpeg/FFmpeg/ffmpeg -f avfoundation -framerate 30 -i "0:0" -vcodec libx265 -preset ultrafast -tune zerolatency -flags2 local_header  -g 30 -pkt_size 1316 -flush_packets 0 -f flv rtmp://127.0.0.1/live/livestream

#8 zhuanhuan

#ffmpeg -re -i chrome.mp4 -vcodec copy -acodec copy -f mpegts "udp://127.0.0.1:5000?pkt_size=1316"
#srt-live-transmit   -s:10  udp://:5000   srt://:1234
#ffplay -fflags nobuffer -i "srt://127.0.0.1:1234"
相关标签: ffmpeg srt