Giter Site home page Giter Site logo

Comments (10)

sky9639 avatar sky9639 commented on May 12, 2024 8

Can I use HTTP API to dynamically call the streaming?

TRANS_BY_GPT3

from srs.

xugcheng avatar xugcheng commented on May 12, 2024 1

Just configure multiple ingets.

TRANS_BY_GPT3

from srs.

palmip avatar palmip commented on May 12, 2024 1

Try this solution.
ingest live2 {
enabled on;
input {
type file;
url ./doc/2.mp4;
}
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine sd1{
enabled off;
# output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;
output rtmp://127.0.0.1:[port]/live/live2_sd1;
}
engine sd2{
enabled off;
# output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;
output rtmp://127.0.0.1:[port]/live/live2_sd2;
}
engine sd3{
enabled off;
# output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;
output rtmp://127.0.0.1:[port]/live/live2_sd3;
}
}

ingest rtsp1{
    enabled      on;
    input {
        type    stream;
        #url     rtsp://admin:[email protected]:554/Streaming/Channels/501?transportmode=unicast;
    url rtsp://192.168.91.41;
    }
    ffmpeg      ./objs/ffmpeg/bin/ffmpeg;
    engine {
        enabled          on;
        perfile {
            rtsp_transport tcp;
        }
        vcodec copy;
        acodec copy;
       # output          rtmp://127.0.0.1:[port]/live?vhost=[vhost]/rtsp1;
   output rtmp://127.0.0.1:[port]/live/rtsp1;
    }
}

TRANS_BY_GPT3

from srs.

winlinvip avatar winlinvip commented on May 12, 2024

You can start an ingest, such as a bash script, or a python script, or a program. This ingest can sequentially push multiple files into an RTMP stream, or switch files according to its own strategy.

TRANS_BY_GPT3

from srs.

jskils avatar jskils commented on May 12, 2024

Can you provide a simple demo or example for this feature? I didn't understand your response.

TRANS_BY_GPT3

from srs.

cqbc avatar cqbc commented on May 12, 2024

I have tried multiple configuration methods but none of them work.
For example:
1> input {
type file;
url /home/appops/dvr/defaultVhost/live/live-wangsugq0-201911151509.flv;
url /home/appops/dvr/defaultVhost/live/live-wangsugq0-201911211614.flv;
}
2> input {
type file;
url /home/appops/dvr/defaultVhost/live/live-wangsugq0-201911151509.flv /home/appops/dvr/defaultVhost/live/live-wangsugq0-201911211614.flv
}

Please provide a demo example from the great author.

TRANS_BY_GPT3

from srs.

keysLo avatar keysLo commented on May 12, 2024

Try this solution
ingest live2 {
enabled on;
input {
type file;
url ./doc/2.mp4;
}
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine sd1{
enabled off;

output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;

output rtmp://127.0.0.1:[port]/live/live2_sd1;
}
engine sd2{
enabled off;

output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;

output rtmp://127.0.0.1:[port]/live/live2_sd2;
}
engine sd3{
enabled off;

output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;

output rtmp://127.0.0.1:[port]/live/live2_sd3;
}
}

ingest rtsp1{
    enabled      on;
    input {
        type    stream;
        #url     rtsp://admin:[email protected]:554/Streaming/Channels/501?transportmode=unicast;
    url rtsp://192.168.91.41;
    }
    ffmpeg      ./objs/ffmpeg/bin/ffmpeg;
    engine {
        enabled          on;
        perfile {
            rtsp_transport tcp;
        }
        vcodec copy;
        acodec copy;
       # output          rtmp://127.0.0.1:[port]/live?vhost=[vhost]/rtsp1;
   output rtmp://127.0.0.1:[port]/live/rtsp1;
    }
}

May I ask how to add the -re parameter to ffmpeg?

TRANS_BY_GPT3

from srs.

sonny420 avatar sonny420 commented on May 12, 2024

Try this solution
ingest live2 {
enabled on;
input {
type file;
url ./doc/2.mp4;
}
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine sd1{
enabled off;

output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;

output rtmp://127.0.0.1:[port]/live/live2_sd1;
}
engine sd2{
enabled off;

output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;

output rtmp://127.0.0.1:[port]/live/live2_sd2;
}
engine sd3{
enabled off;

output rtmp://127.0.0.1:[port]/live?vhost=[vhost]/livestream;

output rtmp://127.0.0.1:[port]/live/live2_sd3;
}
}

ingest rtsp1{
    enabled      on;
    input {
        type    stream;
        #url     rtsp://admin:[email protected]:554/Streaming/Channels/501?transportmode=unicast;
    url rtsp://192.168.91.41;
    }
    ffmpeg      ./objs/ffmpeg/bin/ffmpeg;
    engine {
        enabled          on;
        perfile {
            rtsp_transport tcp;
        }
        vcodec copy;
        acodec copy;
       # output          rtmp://127.0.0.1:[port]/live?vhost=[vhost]/rtsp1;
   output rtmp://127.0.0.1:[port]/live/rtsp1;
    }
}

May I ask how to add the -re parameter to ffmpeg?

If you select "file" type, the -re parameter will be added automatically.

TRANS_BY_GPT3

from srs.

palmip avatar palmip commented on May 12, 2024

from srs.

guoronghui avatar guoronghui commented on May 12, 2024

# The first pull stream starts
    ingest {
        enabled      on;
        input {
            type    stream;
            url     rtsp://10.0.0.11/tv1;
        }
        ffmpeg       ./objs/ffmpeg/bin/ffmpeg;
        engine {
            enabled          on;
            perfile {
                rtsp_transport tcp;
            }
            vcodec copy;
            acodec copy;
            output          rtmp://127.0.0.1:[port]/live/tv1;
        }
    }    
    
# The first pull stream ends

# The second pull stream begins
    ingest tv2 {
        enabled      on;
        input {
            type    stream;
            url     rtsp://10.0.0.12/tv2;
        }
        ffmpeg       ./objs/ffmpeg/bin/ffmpeg;
        engine tv2 {
            enabled          on;
            perfile {
                rtsp_transport tcp;
            }
            vcodec copy;
            acodec copy;
            output          rtmp://127.0.0.1:[port]/live/tv2;
        }
    }    
    
# The second pull stream ends

# Multiple pull streams can refer to the above format

TRANS_BY_GPT3

from srs.

Related Issues (20)

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.