Skip to content

Commit 77bc1bb

Browse files
alexey-kravtsovSean-Der
authored andcommitted
Reduced GStreamer H264 encoder latency
Changed x264enc properties to reduce latency
1 parent cc18f0d commit 77bc1bb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contribu
6262
* [Lukas Herman](https://github.com/lherman-cs) - *C Data Channels example*
6363
* [EricSong](https://github.com/xsephiroth) - *Implement GstV4l2Alsa example*
6464
* [Tristan Matthews](https://github.com/tmatth)
65+
* [Alexey Kravtsov](https://github.com/alexey-kravtsov) - *GStreamer encoder tune*
6566

6667
### License
6768
MIT License - see [LICENSE](LICENSE) for full text

internal/gstreamer-src/gst.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func CreatePipeline(codecName string, tracks []*webrtc.Track, pipelineSrc string
5353
clockRate = videoClockRate
5454

5555
case webrtc.H264:
56-
pipelineStr = pipelineSrc + " ! video/x-raw,format=I420 ! x264enc bframes=0 speed-preset=veryfast key-int-max=60 ! video/x-h264,stream-format=byte-stream ! " + pipelineStr
56+
pipelineStr = pipelineSrc + " ! video/x-raw,format=I420 ! x264enc speed-preset=ultrafast tune=zerolatency key-int-max=20 ! video/x-h264,stream-format=byte-stream ! " + pipelineStr
5757
clockRate = videoClockRate
5858

5959
case webrtc.Opus:

0 commit comments

Comments
 (0)