Comments (10)
Can I use HTTP API to dynamically call the streaming?
TRANS_BY_GPT3
from srs.
Just configure multiple ingets.
TRANS_BY_GPT3
from srs.
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.
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.
Can you provide a simple demo or example for this feature? I didn't understand your response.
TRANS_BY_GPT3
from srs.
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.
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.
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.
from srs.
# 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)
- srs 4.0 memory leak HOT 1
- Bug: SrsHttpxConn SSL Key&Cert config problem. HOT 3
- Bug: Config http_api and rtc_server.tcp listen on same port. HOT 2
- RTSP: FFmpeg convert to RTMP, the HLS TS file size is too short. HOT 6
- How to set authentication for rtmp HOT 2
- Rtmp authentication HOT 1
- WebRTC WHEP URL playback is stuttering in Google Chrome browser. HOT 1
- HTTPS: SSL errors in safari and chrome. HOT 1
- RTMP: Response accurate error when rejecting OBS.
- Standalone binary HOT 1
- Version 6.0/5.0 configuration parsing options: Configuration file not found at conf/docker.conf. HOT 1
- API: The VmSize of SRS is huge and incorrect, if enabled asan. HOT 2
- WebRTC WHEP URL playback is stuttering in Google Chrome browser.
- C++ HOT 1
- When the DVR generates a segment, it sends a request to /ws/v1/update. HOT 1
- http_hooks always connect to localhost on Docker compose HOT 4
- RTMP to WebRTC fps drop by DJI mini 3. HOT 5
- Console: The HTTPS API and the HTTPS server share the same port. HOT 1
- RTMP2WebRTC: Stuttering when using flutter WebRTC HOT 4
- IO: network i/o and block i/o is shooting high HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srs.