Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure virtual live streaming with multiple video files using Ingest? #55

Closed
winlinvip opened this issue Apr 30, 2015 · 10 comments
Assignees
Labels
Codec HEVC, FFmpeg for ingesting, trascoding or codec. TransByAI Translated by AI/GPT.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented Apr 30, 2015

https://github.com/winlinvip/simple-rtmp-server/issues/55

TRANS_BY_GPT3

@winlinvip winlinvip added this to the srs 1.0 release milestone Apr 30, 2015
@winlinvip
Copy link
Member Author

winlinvip commented Apr 24, 2017

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

@jskils
Copy link

jskils commented Nov 18, 2019

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

TRANS_BY_GPT3

@cqbc
Copy link

cqbc commented Nov 26, 2019

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

@sky9639
Copy link

sky9639 commented Nov 28, 2019

Can I use HTTP API to dynamically call the streaming?

TRANS_BY_GPT3

@xugcheng
Copy link

xugcheng commented Apr 22, 2020

Just configure multiple ingets.

TRANS_BY_GPT3

@keysLo
Copy link

keysLo commented Aug 19, 2020

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:12345678@192.168.2.21: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

@sonny420
Copy link

sonny420 commented Dec 3, 2020

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:12345678@192.168.2.21: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

@winlinvip winlinvip added the Codec HEVC, FFmpeg for ingesting, trascoding or codec. label Aug 23, 2021
@winlinvip winlinvip self-assigned this Aug 26, 2021
@guoronghui
Copy link

guoronghui commented May 23, 2022


# 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

@winlinvip winlinvip changed the title ingest如何配置虚拟直播多个视频文件? How to configure virtual live streaming with multiple video files using Ingest? Jul 27, 2023
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Codec HEVC, FFmpeg for ingesting, trascoding or codec. TransByAI Translated by AI/GPT.
Projects
None yet
Development

No branches or pull requests

9 participants