Giter Site home page Giter Site logo

flvpusher's Introduction

README for the flvpusher
===============================
A tool for pushing flv/mp4/ts/rtmp/rtsp/hls source to rtmp/rtspserver.
Compile it on a Linux operating system.

Compile
====================
./compile.sh

Run
====================
flvpusher (V: 2)

Usage: flvpusher <-i source|-w> <-L liveurl [--loop] [-a dump_audio] [-v dump_video] [-s tspath] [-f flvpath]|--hls_playlist filename [--hls_time time]> [-h] [--no_logfile]
Description: 
-i, --input
       input source, file category: *.flv, *.mp4, *.3gp, *.ts
                     protocol category: rtmp://*, rtsp://*, http://*.m3u8
-L, --live
       liveurl, inject audio&video to rtmp-server or rtsp-server,
       format: rtmp://<ip>[:port]/live/<rtmp-stream-name>
               rtsp://<ip>[:port]/<rtsp-sdp-name>.sdp
       note: this option is exclusive with -p and -w
-p, --hls_playlist
       pre-process flv or mp4 file to generate *.m3u8, *.m3u8.seek and hls_info.txt for dynamic hls vod
       note: this option is exclusive with -L and -w
-t, --hls_time
       specify the ts-segment's duration in hls vod
-w, --webserver
       start webserver
       note: this option is exclusive with -L and -p
-T, --loop
       if input source is done, start it over again
-N, --no_logfile
       do NOT generate log file, run this program in slience
-v, --dvfile
       dump raw video into file (format: H.264)
-a, --dafile
       dump raw audio into file (format: AAC)
-f, --flvpath
       dump video&audio into flv
-s, --tspath
       dump video&audio into ts
-h, --help
       show this help message and quit


Sample:
1. stream mp4 to rtmpserver (other input sources are the same)
$ flvpusher -i ~/Video/omn.mp4 -L rtmp://127.0.0.1:1935/live/va

2. stream mp4 to rtspserver (ditto)
$ flvpusher -i ~/Video/omn.mp4 -L rtsp://192.168.119.1/va.sdp

3. pre-process mp4 to prepare for hls dynamic vod
$ flvpusher -i ~/Video/omn.mp4 --hls_playlist html/omn/omn.m3u8 --hls_time 5

4. start webserver for hls vod
$ flvpusher -w
note: a. webserver server's root directory is default to ./html
      b. webserver server's port is default to 9877
      c. use player(e.g. vlc) to play this hls vod: http://<this-server-ip:9877>/omn/omn.m3u8
      d. you can modify root directory and listen port in flvpusher_cfg.txt, and put it in the same
         directory with this tool

Other
====================
mail: [email protected]

flvpusher's People

Contributors

dengxiayehu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flvpusher's Issues

Rtmp to Rtmp not work

Hi
i try this small test :

./flvpusher -i rtmp://1.1.1.1:1935/in2/test1 -L rtmp://2.2.2.2:1935/in2/test2
2020-03-07-01:14:39.546 4495 [rtmp_sink.cpp:96] [INFO] Connect to rtmp server with url "rtmp://2.2.2.2:1935/in2/test2" ok
2020-03-07-01:14:39.547 4495 [rtmp_module:-1] [ERROR] Problem accessing the DNS. (addr: )
2020-03-07-01:14:39.547 4495 [rtmp_source.cpp:86] [ERROR] RTMP_Connect failed for source: "rtmp://1.1.1.1:1935/in2/test1"
2020-03-07-01:14:39.547 4495 [rtmp_source.cpp:123] [ERROR] RtmpSource's prepare() failed
2020-03-07-01:14:39.547 4495 [rtmp_sink.cpp:110] [INFO] Disconnect from rtmp server (url: rtmp://2.2.2.2:1935/in2/test2)

Any help ?

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.