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

twitch streaming guide #726

Closed
rembomy opened this issue Jan 3, 2017 · 7 comments
Closed

twitch streaming guide #726

rembomy opened this issue Jan 3, 2017 · 7 comments
Assignees
Labels
Codec HEVC, FFmpeg for ingesting, trascoding or codec. EnglishNative This issue is conveyed exclusively in English. Won't fix We won't fix it.
Milestone

Comments

@rembomy
Copy link

rembomy commented Jan 3, 2017

Sorry for a dumb question, but is there a guide for setting this up to use for transcoding and streaming to twitch for not so gifted guys with basic understanding of how stuff works? Thanks!

@winlinvip
Copy link
Member

What's the guide or API of twitch? For example, how can you publish stream to twitch by ffmpeg?

@winlinvip winlinvip added this to the srs 2.0 release milestone Jan 3, 2017
@rembomy
Copy link
Author

rembomy commented Jan 3, 2017

It should basically be 'push rtmp://live-lhr.twitch.tv/app/twitch_key;' and it should be flv

for ffmpeg i've been using:
ffmpeg -re -i rtmp://localhost:1935/trans/$name -vcodec libx264 -preset medium -x264opts nal-hrd=cbr:force-cfr=1:keyint=60 -r 30 -b:v 2500k -maxrate 2500k -bufsize 2500k -threads 12 -s hd1080 -sws_flags spline -acodec copy -f flv rtmp://localhost:1935/live/${name};

This was done with arut/nginx-rtmp-module, but since it is no longer being updated I would like to move to something that is an maybe get better results in the long run :)

@mbeacom
Copy link

mbeacom commented Jan 3, 2017

You can stream to twitch the same way that you stream to any other RTMP FLV consumer via some push.
@rembomy You should be able to use the functionality outlined in: #367 or https://github.com/ossrs/srs/wiki/v1_EN_SampleRTMP

@winlinvip
Copy link
Member

Maybe you can try SRS edge, which proxy all stream to upstream server, without any transcoding. BTW, why transcode by ffmpeg in your previous scenario? Must you transcode it? Or just ok to proxy the stream to twitch server? The transcoding takes lots of CPU, so we should never use it unless it's necessary.

@winlinvip
Copy link
Member

SRS EDGE to proxy stream to one upstream: https://github.com/ossrs/srs/wiki/v1_EN_Edge
Or use forward to proxy to many upstreams. Recommend to use EDGE, which is more convinent.

@rembomy
Copy link
Author

rembomy commented Jan 4, 2017

I want to transcode on server side because this way I can keep my gaming PC CPU free, I can send 50000k video with NVENC to server (almost 0 impact on gaming pc) and then server makes it ready for twitch with good quality at 2500k. If I would use same 2500k on PC then NVENC would screw with quality and x264 would just eat up CPU.

I'll start experimenting on this and see what I can come up with, thanks!

@winlinvip
Copy link
Member

You must use transcoding of SRS by FFMPEG, you can write the output url to use variables, please read the transcode wiki.

@winlinvip winlinvip self-assigned this Sep 18, 2021
@winlinvip winlinvip added Codec HEVC, FFmpeg for ingesting, trascoding or codec. Won't fix We won't fix it. labels Sep 18, 2021
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jul 28, 2023
@ossrs ossrs locked and limited conversation to collaborators Jul 28, 2023
@winlinvip winlinvip converted this issue into discussion #3725 Jul 28, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Codec HEVC, FFmpeg for ingesting, trascoding or codec. EnglishNative This issue is conveyed exclusively in English. Won't fix We won't fix it.
Projects
None yet
Development

No branches or pull requests

3 participants