|
1 | 1 | import gstreamer from "gstreamer-superficial"; |
2 | 2 | import { stream } from "./state"; |
3 | 3 |
|
4 | | -export const pipeline = new gstreamer.Pipeline(`videotestsrc ! fakesink`); |
5 | | -// export const pipeline = new gstreamer.Pipeline(` |
6 | | -// v4l2src device=/dev/video0 ! video/x-raw, width=1920, height=1080, format=YUY2 ! nvvidconv interpolation-method=5 output-buffers=10 ! queue ! video/x-raw(memory:NVMM), width=1280, height=720, format=NV12 ! \ |
7 | | -// nvv4l2h265enc name=enc bitrate=${Math.floor( |
8 | | -// stream.bitrate * 1000 * 1000 |
9 | | -// )} control-rate=1 iframeinterval=-1 preset-level=4 profile=0 insert-sps-pps=1 maxperf-enable=1 SliceIntraRefreshInterval=60 EnableTwopassCBR=1 ! video/x-h265, stream-format=byte-stream ! queue ! mux. \ |
10 | | -// alsasrc device=hw:2 ! opusenc audio-type=voice ! queue ! mux. |
11 | | -// mpegtsmux alignment=7 name=mux ! srtsink name=srt uri="srt://${ |
12 | | -// process.env.SRT_IP |
13 | | -// }?streamid=input/live/pack" latency=300 sync=true |
14 | | -// `); |
| 4 | +// export const pipeline = new gstreamer.Pipeline(`videotestsrc ! fakesink`); |
| 5 | +export const pipeline = new gstreamer.Pipeline(` |
| 6 | +v4l2src device=/dev/video0 ! video/x-raw, width=1920, height=1080, format=YUY2 ! nvvidconv interpolation-method=5 output-buffers=10 ! queue ! video/x-raw(memory:NVMM), width=1280, height=720, format=NV12 ! \ |
| 7 | + nvv4l2h265enc name=enc bitrate=${Math.floor( |
| 8 | + stream.bitrate * 1000 * 1000 |
| 9 | + )} control-rate=1 iframeinterval=-1 preset-level=4 profile=0 insert-sps-pps=1 maxperf-enable=1 SliceIntraRefreshInterval=60 EnableTwopassCBR=1 ! video/x-h265, stream-format=byte-stream ! queue ! mux. \ |
| 10 | + alsasrc device=hw:2 ! opusenc audio-type=voice ! queue ! mux. |
| 11 | + mpegtsmux alignment=7 name=mux ! srtsink name=srt uri="srt://${ |
| 12 | + process.env.SRT_IP |
| 13 | + }?streamid=input/live/pack" latency=300 sync=true |
| 14 | +`); |
0 commit comments