Giter Site home page Giter Site logo

media-server-doc's Introduction

基于 lalserver 和 FFmpeg 搭建本地流媒体服务测试环境

安装 lalserver

lalserver仓库 下载对应版本的已编译好的二进制可执行文件,然后解压缩

安装 FFmpeg

参考 FFmpeg 官网,安装对应系统版本,例如 Ubuntu:

sudo apt install ffmpeg

可能需要额外安装某些编解码器,根据提示执行即可

启动 lalserver

./bin/lalserver -c conf/lalserver.conf.json

FFmpeg 推流

ffmpeg -re -stream_loop -1 -i ./video.mp4 -c copy -f rtsp rtsp://localhost:5544/live/test
  • -re 表示根据视频文件的帧率模拟实时视频流
  • -stream_loop -1 表示循环播放
  • -i 用于指定输入文件路径
  • -c copy 表示复制视频而不进行重新编码
  • -f rtsp rtsp://localhost:5544/live/test 指定输出格式为 RTSP 流,并指定输出流地址

其他协议的推流地址参考:lalserver 各协议推拉流url地址列表

播放 RTSP 流

ffplay rtsp://localhost:5544/live/test

media-server-doc's People

Contributors

junglehico avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.