Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

StreamCaster: Support PUSH-FLV/TS/HLS. #2611

Closed
2 of 4 tasks
winlinvip opened this issue Sep 15, 2021 · 1 comment
Closed
2 of 4 tasks

StreamCaster: Support PUSH-FLV/TS/HLS. #2611

winlinvip opened this issue Sep 15, 2021 · 1 comment
Assignees
Labels
EnglishNative This issue is conveyed exclusively in English. Feature It's a new feature.
Milestone

Comments

@winlinvip
Copy link
Member

winlinvip commented Sep 15, 2021

FFmpeg and OBS can both push FLV/TS/HLS streams, which means they can send FLV/TS/HLS streams to the server via HTTP POST/PUSH. The application scenarios are as follows:

  • Corporate firewalls that only support HTTP or HTTPS protocols.
  • Serverless deployment of servers, which only support HTTP or HTTPS gateways, more in line with the habits of nodejs backend.
  • Other scenarios, please leave a message in the comments section.

Note: Serverless is only suitable for HLS streams. The reason is: Serverless does not support HTTP Chunked, so it cannot use FLV/TS push streaming; in addition, Serverless is completely stateless, so it cannot locate the source of FLV/TS streams.

This feature is mainly for the convenience of deploying and using streaming media services in the nodejs backend. Regarding the protocol:

  • POST-TS, send TS stream to the server, mainly supporting the 265 encoding format.
  • POST-FLV, send FLV stream to the server, mainly supporting 264/AAC encoding format.
  • POST-HLS, send HLS stream to the server and write it to storage. FFmpeg and Web services can be completed.

There is also a UDP TS push stream:

FFmpeg

The FFmpeg FLV push stream command is as follows:

ffmpeg -re -f flv -i doc/source.flv -c copy \
    -f flv http://127.0.0.1:8936/live/livestream.flv

The FFmpeg TS push stream command is as follows (SRS does not support this yet):

ffmpeg -re -f flv -i doc/source.flv -bsf:v h264_mp4toannexb \
    -c copy -f mpegts http://127.0.0.1:8937/live/livestream.ts

OBS

For OBS push streaming, go to Settings -> Stream -> Custom...

Server configuration:

  • Push FLV stream: http://127.0.0.1:8936/live/livestream.flv
  • Push TS stream: http://127.0.0.1:8937/live/livestream.ts

SRS

SRS currently supports FLV push streaming:

./objs/srs -c conf/push.flv.conf

Nginx

Previously, the nginx-ts-module supported TS push streaming, but it was converted to HLS or DASH and could not be converted to RTMP/FLV/WebRTC and other streaming media protocols.

FLV push streaming is not supported.

@winlinvip winlinvip added the Feature It's a new feature. label Sep 15, 2021
@winlinvip winlinvip added this to the 5.0 milestone Sep 15, 2021
@winlinvip winlinvip self-assigned this Sep 15, 2021
@winlinvip winlinvip changed the title Support POST-TS for live streaming. 支持TS推流。 Support POST-TS/FLV for live streaming. 支持TS/FLV推流。 Sep 16, 2021
@winlinvip winlinvip changed the title Support POST-TS/FLV for live streaming. 支持TS/FLV推流。 Support POST-FLV/TS/HLS for live streaming. 支持FLV/TS/HLS推流。 Sep 16, 2021
@winlinvip winlinvip changed the title Support POST-FLV/TS/HLS for live streaming. 支持FLV/TS/HLS推流。 Nodejs: Support POST-FLV/TS/HLS. 支持FLV/TS/HLS推流。 Sep 16, 2021
@winlinvip winlinvip changed the title Nodejs: Support POST-FLV/TS/HLS. 支持FLV/TS/HLS推流。 Nodejs: Support PUSH-FLV/TS/HLS. 支持FLV/TS/HLS推流。 Sep 16, 2021
@billyriantono
Copy link

how to use this one ?
try to use :
stream_caster {
enabled on;
caster ts;
output rtmp://127.0.0.1/[app]/[stream];
listen 8937;
}

but failed.

Thank you @winlinvip

@winlinvip winlinvip changed the title Nodejs: Support PUSH-FLV/TS/HLS. 支持FLV/TS/HLS推流。 StreamCaster: Support PUSH-FLV/TS/HLS. 支持FLV/TS/HLS推流。 Sep 17, 2022
@winlinvip winlinvip modified the milestones: 5.0, 6.0 Jan 2, 2023
@winlinvip winlinvip changed the title StreamCaster: Support PUSH-FLV/TS/HLS. 支持FLV/TS/HLS推流。 StreamCaster: Support PUSH-FLV/TS/HLS. Jul 18, 2023
@ossrs ossrs locked and limited conversation to collaborators Jul 18, 2023
@winlinvip winlinvip converted this issue into discussion #3645 Jul 18, 2023
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jul 29, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
EnglishNative This issue is conveyed exclusively in English. Feature It's a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants