Giter Club home page Giter Club logo

stream_media_ffmpeg's Introduction

Streaming videos over LAN using rtsp-simple-server and ffmpeg

Introduction

I have been looking for ways to stream x265(HEVC) videos to an old Android TV box which doesn't have hardware x265 codecs. Here is one solution able to stream smoothly with subtitle support.

Required

  1. FFmpeg
  2. rtsp-simple-server
  3. VLC or other clients which support rtsp playback

Steps

  1. Install FFmpeg

  2. Config FFmpeg font by following instructions here (Windows only)

  3. Install rtsp-simple-server by following instructions here

  4. Start rtsp-simple-server

    c:\path\to\rtsp-simple-server\rtsp-simple-server

  5. Publish a stream from a video file with FFmpeg, e.g.,

    "C:\Program Files\ffmpeg\bin\ffmpeg" -re -stream_loop -1 -i input.mkv -filter:v subtitles=input.mkv -vcodec libx264 -f rtsp -rtsp_transport udp rtsp://192.168.x.x:port#/streamname

    • the absolute path to ffmpeg executable is necessary, see here

    • input.mkv is the media file which may contain embedded subtitle; if the subtitle is in a separate file, e.g., sub.srt, replace subtitles=input.mkv with subtitles=sub.srt; for other subtitle formats, see here

    • libx264 is used here to encode streams, which has hardware support on almost all devices (even very old ones)

    • 192.168.x.x is the ip address of the machine as stream server

    • port# must be the same as specified in rtsp-simple-server.yml

      # port of the TCP RTSP listener

      rtspPort: 8554

    • pick a streamname

  6. Open VLC or other clients, choose rtsp as source rtsp://192.168.x.x:port#/streamname

  7. Enjoy

stream_media_ffmpeg's People

Contributors

bssrdf avatar

Stargazers

 avatar

Watchers

 avatar  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.