EasyDarwin ffmpeg+EasyDarwin开源流媒体服务器平台试用笔记(视频流rtsp)

服务

  • Github https://github.com/EasyDarwin/EasyDarwin , server will invoking ffmpeg.

1. download server

  • 下载EasyDarwin-windows-8.1.0-1901141151

  • 双击EasyDarwin.exe
    EasyDarwin ffmpeg+EasyDarwin开源流媒体服务器平台试用笔记(视频流rtsp)_第1张图片

  • 访问http://127.0.0.1:10008/#/

  • EasyDarwin ffmpeg+EasyDarwin开源流媒体服务器平台试用笔记(视频流rtsp)_第2张图片

  • 2. download FFmpeg

  • 下载FFmpeg : https://github.com/BtbN/FFmpeg-Builds/releases

  • ffmpeg -re -stream_loop -1 -i YourVideoName.mp4 -vcodec copy -codec copy -f rtsp rtsp://127.0.0.1:YourPort/video1(格式:rtsp://www.easydarwin.org:10086/your_stream_id)

  • cmd:ffmpeg -re -stream_loop -1 -i a.mp4 -vcodec copy -codec copy -f rtsp rtsp://127.0.0.1:10086/video1

  • rtsp://127.0.0.1:YourPort/video1(rtsp://127.0.0.1:10086/video1)访问即可

查看

VLC Media Player

  • 下载地址 : http://www.videolan.org/vlc/

rtsp地址

  • `湖南卫视 : rtmp://58.200.131.2:1935/livetv/hunantv

  • 广东卫视:rtmp://58.200.131.2:1935/livetv/gdtv

  • 东方卫视:rtmp://58.200.131.2:1935/livetv/dftv

  • 伊拉克 Al Sharqiya 电视台:rtmp://ns8.indexforce.com/home/mystream

  • rtsp地址原文链接:https://blog.csdn.net/peng2hui1314/article/details/109582426

保存

EasyDarwin ffmpeg+EasyDarwin开源流媒体服务器平台试用笔记(视频流rtsp)_第3张图片

  • 或者使用python-opencv保存
import cv2

cap = cv2.VideoCapture("rtsp://103.229.215.117:1554/s?dev=b80fd652-5097-401c-b187-b439365bd9be&sup=dev116&supip=103.229.215.117&support=8000&ch=1&type=1")

fps = cap.get(cv2.CAP_PROP_FPS)
print(fps)

size = (int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)),
    int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)))
print(size)


fourcc = cv2.VideoWriter_fourcc('M', 'P', '4', '2')

outVideo = cv2.VideoWriter('saveRTSP.avi',fourcc,fps,size)


if cap.isOpened():
  rval,frame = cap.read()
  print('ture')
else:
  rval = False
  print('False')

tot=1
c=1
i=0

while i<90000:
  rval,frame = cap.read()
  cv2.imshow('test',frame)

  tot+=1
  i+=1
  print('tot=',tot)

  outVideo.write(frame)
  cv2.waitKey(1)
cap.release()
outVideo.release()
cv2.destroyAllWindows()
# https://blog.csdn.net/qq_43440707/article/details/96320864

potplayer

网络流地址

  • rtmp://mobliestream.c3tv.com:554/live/goodtv.sdp

  • EasyDarwin ffmpeg+EasyDarwin开源流媒体服务器平台试用笔记(视频流rtsp)_第4张图片

  • 保存
    EasyDarwin ffmpeg+EasyDarwin开源流媒体服务器平台试用笔记(视频流rtsp)_第5张图片

参考与更多

  • EasyDarwinGo录像功能发布:https://blog.csdn.net/jyt0551/article/details/84189498
  • 如何下载保存m3u8 ts视频文件?强大的VLC新用法
  • https://github.com/dmlc/decord
  • DeepStream应用程序将深度神经网络和其他复杂的处理任务引入到流处理管道中,以实现对视频和其他传感器数据的近实时分析。从这些传感器中提取有意义的见解为提高运营效率和安全性创造了机会。例如,摄像头是当前使用最多的物联网传感器。
  • https://github.com/aler9/rtsp-simple-server/releases

linux version

在这里插入图片描述

(base) ~/Downloads/video_rtsp/EasyDarwin-linux-8.1.0-1901141151$ sudo bash ./start.sh 
[sudo] pdd 的密码: 
[EasyDarwin] 2023/02/26 22:31:01 main.go:186: git commit code:0351aed
[EasyDarwin] 2023/02/26 22:31:01 main.go:187: build date:2019-01-14 11:49:59
  _____                         ____                              _
 | ____|   __ _   ___   _   _  |  _ \    __ _   _ __  __      __ (_)  _ __
 |  _|    / _` | / __| | | | | | | | |  / _` | | '__| \ \ /\ / / | | | '_ \
 | |___  | (_| | \__ \ | |_| | | |_| | | (_| | | |     \ V  V /  | | | | | |
 |_____|  \__,_| |___/  \__, | |____/   \__,_| |_|      \_/\_/   |_| |_| |_|
                        |___/
[EasyDarwin] 2023/02/26 22:31:01 main.go:216: EasyDarwin_Service install ...
[EasyDarwin] 2023/02/26 22:31:01 main.go:221: EasyDarwin_Service install ok
[EasyDarwin] 2023/02/26 22:31:01 main.go:186: git commit code:0351aed
[EasyDarwin] 2023/02/26 22:31:01 main.go:187: build date:2019-01-14 11:49:59
[EasyDarwin] 2023/02/26 22:31:01 main.go:216: EasyDarwin_Service start ...
[EasyDarwin] 2023/02/26 22:31:01 main.go:221: EasyDarwin_Service start ok

EasyDarwin ffmpeg+EasyDarwin开源流媒体服务器平台试用笔记(视频流rtsp)_第6张图片

ffmpeg -re -stream_loop -1 -i output.avi -vcodec copy -codec copy -f rtsp rtsp://127.0.0.1:10086/video1

你可能感兴趣的:(语言学习笔记,媒体,音视频)