This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const ffmpeg = child_process.spawn('ffmpeg', [ | |
| // the input | |
| '-i', | |
| '-', | |
| // video codec config: low latency, adaptive bitrate, | |
| // list of presets: https://trac.ffmpeg.org/wiki/Encode/H.264 | |
| // tune zerolatency is good for fast encoding and low-latency streaming | |
| // g:v 60 ==> https://www.reddit.com/r/ffmpeg/comments/redaa2/while_livestreaming_to_youtube_using_ffmpeg_i_get/ | |
| '-c:v', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const ffmpegTee = (youtube, twitch, facebook) => { | |
| return [ | |
| '-i', | |
| '-', | |
| // select first stream intended for output | |
| '-map', | |
| '0', | |
| // video codec config: low latency, adaptive bitrate | |
| '-c:v', | |
| 'libx264', |
OlderNewer