Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1116 commits
Select commit Hold shift + click to select a range
4c41a19
test remove allow rotation preview
pedroSG94 Mar 30, 2025
d984eaa
remove error
pedroSG94 Mar 30, 2025
e850eb2
allow set preview and output filters
pedroSG94 Mar 30, 2025
55ccee2
remove unused code
pedroSG94 Mar 30, 2025
5a21005
fix possible error on loop
pedroSG94 Apr 2, 2025
315929e
sanity make current
pedroSG94 Apr 2, 2025
aba549f
remove unnecessary code
pedroSG94 Apr 3, 2025
a6578e5
Merge pull request #1770 from pedroSG94/fix/rtmp-incrementalts
pedroSG94 Apr 7, 2025
4be77b9
fix camera2 taptofocus and add getFacingCamera to CameraX
pedroSG94 Apr 8, 2025
6d5a896
Merge branch 'master' of https://github.com/pedroSG94/RootEncoder
pedroSG94 Apr 8, 2025
2bcdfaf
Bump coroutines from 1.10.1 to 1.10.2
dependabot[bot] Apr 8, 2025
d2e0a5a
fix startPreview auto handle
pedroSG94 Apr 11, 2025
6bc32b3
Camera2Source check fps supported on init source
pedroSG94 Apr 11, 2025
342e179
refactor Camera2Source get supported fps
pedroSG94 Apr 11, 2025
a9680f9
Add setMpeg2TsService method to SrtStream and SrtClient; update SrtSe…
8thgencore Apr 12, 2025
ebe37fd
Bump androidx.media3:media3-exoplayer from 1.6.0 to 1.6.1
dependabot[bot] Apr 14, 2025
c54c2d1
remove Camera2Source check fps
Apr 15, 2025
a2ea2b5
revert remove isPortraitPreview
Apr 15, 2025
c935fc7
Refactor SrtStream and SrtStreamClient: remove setMpeg2TsService from…
Apr 15, 2025
771ca2b
Merge pull request #1801 from 8thgencore/master
pedroSG94 Apr 17, 2025
15ac12c
remove unnecessary securesubmit
pedroSG94 Apr 17, 2025
75cca63
Merge pull request #1786 from pedroSG94/fix/gl-thread-error
pedroSG94 Apr 17, 2025
7ead220
Merge pull request #1802 from pedroSG94/dependabot/gradle/androidx.me…
pedroSG94 Apr 17, 2025
9b7404b
Merge pull request #1799 from pedroSG94/dependabot/gradle/coroutines-…
pedroSG94 Apr 17, 2025
e017e0d
Merge pull request #1766 from pedroSG94/dependabot/gradle/org.jetbrai…
pedroSG94 Apr 17, 2025
4227aed
capture decoder errors
pedroSG94 Apr 18, 2025
3ce81e3
fix rotation filter
pedroSG94 Apr 18, 2025
84970a1
allow set custom preview and stream viewport
pedroSG94 Apr 18, 2025
4bcfbda
Add Media3VideoSource and Media3AudioSource
pedroSG94 Apr 27, 2025
ae07b57
add sanity checks and fixs
May 5, 2025
ce44c2e
merge with master
May 5, 2025
65bf599
Merge pull request #1769 from pedroSG94/fix/media3-decoder-loop
pedroSG94 May 5, 2025
6574e79
Merge pull request #1813 from pedroSG94/feat/add-media3-sources
pedroSG94 May 5, 2025
9954e8f
fix tests
May 5, 2025
dfea510
version 2.6.0
pedroSG94 May 6, 2025
942c480
remove unused class
pedroSG94 May 12, 2025
c0d5341
version 2.6.1
pedroSG94 May 12, 2025
1d6ba9c
update readme
pedroSG94 May 12, 2025
a88731b
added frame capture started callback callback which includes frame ti…
aminsepahan May 17, 2025
bf67190
fixed the nullability of the parameters so that we can remove the lis…
aminsepahan May 20, 2025
197f670
Merge pull request #1826 from aminsepahan/dev/add_timestamp_callback
pedroSG94 May 21, 2025
5c62b94
fix textureloader crash
pedroSG94 Jun 8, 2025
6180827
fix gl record resolution
pedroSG94 Jun 12, 2025
2a8ddcf
fix screen app example
pedroSG94 Jun 19, 2025
e6ee9b9
change getOrientationConfig in VideoSources
pedroSG94 Jun 19, 2025
45e6774
add setRequiredResolution method and sanity check on disable glresources
pedroSG94 Jun 25, 2025
f6aa9c7
fix ScreenSource getOrientationConfig
pedroSG94 Jun 25, 2025
41e5845
update gradle
pedroSG94 Jun 26, 2025
6865ba2
update docs and fix jvm target
pedroSG94 Jun 26, 2025
8724455
target to sdk 36
pedroSG94 Jun 26, 2025
62654f2
fix compilation error
pedroSG94 Jun 26, 2025
aab8b35
remove debug gl on release apps
pedroSG94 Jun 26, 2025
16ab303
fix conflicts
pedroSG94 Jun 28, 2025
058e103
Merge pull request #1850 from pedroSG94/feature/gradle-updates
pedroSG94 Jun 28, 2025
449cd3d
add sanity checks to gl renders
pedroSG94 Jun 28, 2025
dbb4722
fix fiter actions
pedroSG94 Jun 30, 2025
6abbfe9
update multistream guide
pedroSG94 Jun 30, 2025
82f6a96
update multistream guide 2
pedroSG94 Jun 30, 2025
ef06e08
clear surfacetexture if possible on release VideoSource
pedroSG94 Jul 1, 2025
0ab507a
fix adaptFpsRange
pedroSG94 Jul 2, 2025
fdbf35e
avoid record negative ts
pedroSG94 Jul 2, 2025
a603f06
allow record only 1 track
pedroSG94 Jul 2, 2025
7f7b86c
Bump ktor from 2.3.13 to 3.2.1
dependabot[bot] Jul 3, 2025
e1b6c98
update ktor socket
pedroSG94 Jul 6, 2025
7914468
Merge pull request #1858 from pedroSG94/dependabot/gradle/ktor-3.2.1
pedroSG94 Jul 7, 2025
85cbcc9
version 2.6.2
pedroSG94 Jul 7, 2025
a630ee4
fix npe if use glInterface before start it
pedroSG94 Jul 11, 2025
d69176a
fix disableAutoWhiteBalance and add SilenceAudioSource
pedroSG94 Jul 25, 2025
9ca7964
optimize imports and remove warnings
pedroSG94 Jul 25, 2025
d9a1026
avoid decrement audio ts
pedroSG94 Jul 29, 2025
8c726df
fix handshake conclusion
pedroSG94 Jul 30, 2025
9d7f24b
Merge pull request #1883 from pedroSG94/fix/srt-passphrase
pedroSG94 Jul 30, 2025
37111cc
update gradle dependencies
pedroSG94 Jul 31, 2025
d0c03c7
add srt stats: rtt, packetslost and bytessend
pedroSG94 Aug 5, 2025
4097614
refactor gradle
pedroSG94 Aug 6, 2025
8235b87
Merge pull request #1890 from pedroSG94/feature/refactor-gradle
pedroSG94 Aug 7, 2025
de7599e
Merge pull request #1889 from pedroSG94/feature/srt-stats
pedroSG94 Aug 11, 2025
a62cc0c
version 2.6.3
pedroSG94 Aug 11, 2025
42c6eeb
fix mix audio by @itsmeinteger
pedroSG94 Aug 13, 2025
d007175
Bump org.jetbrains.kotlin.android from 2.2.0 to 2.2.10
dependabot[bot] Aug 14, 2025
27cfd99
optmize AudioUtils
pedroSG94 Aug 14, 2025
944532f
Merge pull request #1896 from pedroSG94/dependabot/gradle/org.jetbrai…
pedroSG94 Aug 14, 2025
27962be
fix calculateAmplitude by @itsmeinteger
pedroSG94 Aug 15, 2025
5e43bda
remove duplicated code
pedroSG94 Aug 15, 2025
f8a615f
optimize now and noise filters
pedroSG94 Aug 15, 2025
b7305ae
optimize beauty filter
pedroSG94 Aug 15, 2025
4c0b6c9
add chromatic aberration and distorted tv filters
pedroSG94 Aug 15, 2025
2cdb86c
fix rtmp url parser
pedroSG94 Aug 17, 2025
69ee33a
Merge pull request #1895 from pedroSG94/fix/audio-mix
pedroSG94 Aug 17, 2025
37d68a3
improve quality in fbo texture
pedroSG94 Aug 17, 2025
6b29e1f
Merge branch 'master' of https://github.com/pedroSG94/RootEncoder
pedroSG94 Aug 17, 2025
3ee0e4d
Bump agp from 8.12.0 to 8.12.1
dependabot[bot] Aug 19, 2025
d132fdc
Merge pull request #1900 from pedroSG94/dependabot/gradle/agp-8.12.1
pedroSG94 Aug 19, 2025
c066dc9
version 2.6.4
pedroSG94 Aug 19, 2025
07f53ff
fix BufferVideoSource
pedroSG94 Aug 19, 2025
dbec9e7
add license to pom
pedroSG94 Aug 22, 2025
1770668
change license url
pedroSG94 Aug 25, 2025
8ed02a6
Merge pull request #1904 from pedroSG94/feature/license-to-pom
pedroSG94 Aug 27, 2025
97ad1e3
Bump agp from 8.12.1 to 8.12.2
dependabot[bot] Aug 28, 2025
da8b29a
add camera2 callback availability
pedroSG94 Aug 28, 2025
24b8ab4
Merge pull request #1909 from pedroSG94/dependabot/gradle/agp-8.12.2
pedroSG94 Aug 31, 2025
53959fa
add support for custom AMF object in streaming clients
xiuminga Sep 1, 2025
cbc1313
fix possible npe on VideoEncoder
pedroSG94 Sep 2, 2025
a484758
remove unused custom AMF object handling from streaming clients
Sep 2, 2025
da5e4be
add support for custom AMF object in RTMP clients
xiuminga Sep 3, 2025
8b23a17
Bump agp from 8.12.2 to 8.13.0
dependabot[bot] Sep 3, 2025
fc1cbbe
remove unnecessary code
pedroSG94 Sep 3, 2025
faf64a6
fix java tls protocol error on create socket
pedroSG94 Sep 3, 2025
78d0a7c
Merge pull request #1917 from pedroSG94/feature/customamf0
pedroSG94 Sep 4, 2025
4ecc833
Merge pull request #1910 from pedroSG94/feature/camera2-callback-avai…
pedroSG94 Sep 4, 2025
c4bf0c9
Bump com.herohan:UVCAndroid from 1.0.9 to 1.0.10
dependabot[bot] Sep 8, 2025
7ee3871
Merge pull request #1920 from pedroSG94/dependabot/gradle/com.herohan…
pedroSG94 Sep 9, 2025
e596cb7
Bump camerax from 1.4.2 to 1.5.0
dependabot[bot] Sep 10, 2025
52a1046
Merge branch 'master' into fix/record-audio-ts
pedroSG94 Sep 19, 2025
3ffb636
update branch and add debug logs
pedroSG94 Sep 19, 2025
2e0d87d
add handle NetConnection.Connect.Closed command
pedroSG94 Sep 19, 2025
b9b893b
add onConnected failed if read packet fail
pedroSG94 Sep 23, 2025
a0665ee
add setSocketTimeout method and add speed parameter to Media3 sources
pedroSG94 Sep 23, 2025
12dafce
fix tests
pedroSG94 Sep 23, 2025
ae68742
update ts fix and discard frame if invalid ts
pedroSG94 Sep 25, 2025
140827d
add log to frame discarded
pedroSG94 Sep 25, 2025
e141e0b
fixing audio ts
pedroSG94 Sep 27, 2025
99fec7f
add finish callback and loopmode option
pedroSG94 Sep 27, 2025
8b402c9
Merge pull request #1915 from pedroSG94/fix/npe-VideoEncoder
pedroSG94 Sep 27, 2025
c733a8e
Merge pull request #1932 from pedroSG94/fix/rtmp-handle-close
pedroSG94 Sep 27, 2025
de7a858
Merge pull request #1916 from pedroSG94/dependabot/gradle/agp-8.13.0
pedroSG94 Sep 27, 2025
b7af768
Merge pull request #1922 from pedroSG94/dependabot/gradle/camerax-1.5.0
pedroSG94 Sep 27, 2025
74565a8
Bump org.jetbrains.kotlin.android from 2.2.10 to 2.2.20
dependabot[bot] Sep 27, 2025
2fec72a
Bump ktor from 3.2.3 to 3.3.0
dependabot[bot] Sep 27, 2025
0272d79
Merge pull request #1921 from pedroSG94/dependabot/gradle/org.jetbrai…
pedroSG94 Sep 27, 2025
c8badbc
Merge pull request #1923 from pedroSG94/dependabot/gradle/ktor-3.3.0
pedroSG94 Sep 27, 2025
38dda7d
avoid reuse bufferinfo class in each frame
pedroSG94 Sep 29, 2025
40e7814
change fix timestamp logic
pedroSG94 Sep 30, 2025
5b3aae7
Implement multi-preview surface rendering
chenqinggang001 Oct 6, 2025
bd12324
Bump ktor from 3.3.0 to 3.3.1
dependabot[bot] Oct 8, 2025
d2bd9a1
Bump camerax from 1.5.0 to 1.5.1
dependabot[bot] Oct 8, 2025
a085b3a
fix SRT extensionField calculation
pedroSG94 Oct 8, 2025
6481329
add extensionfield calculation test
pedroSG94 Oct 8, 2025
4489702
Downward compatibility processing of the multi-preview rendering inte…
chenqinggang001 Oct 9, 2025
727a76b
Fix the encoding format error
chenqinggang001 Oct 9, 2025
e6c84ff
Fix the encoding format error
chenqinggang001 Oct 9, 2025
6016c56
Merge pull request #1947 from pedroSG94/dependabot/gradle/ktor-3.3.1
pedroSG94 Oct 13, 2025
d5ddd07
Merge branch 'master' into dependabot/gradle/camerax-1.5.1
pedroSG94 Oct 13, 2025
5273552
Merge pull request #1948 from pedroSG94/dependabot/gradle/camerax-1.5.1
pedroSG94 Oct 13, 2025
173d1f6
Merge pull request #1944 from chenqinggang001/master
pedroSG94 Oct 13, 2025
491e496
move preview new classes outside of GlInterface and add access to new…
pedroSG94 Oct 13, 2025
f600ade
version 2.6.5
pedroSG94 Oct 18, 2025
1b18d16
add docs
pedroSG94 Oct 18, 2025
87ac138
Merge pull request #1952 from pedroSG94/v2.6.5
pedroSG94 Oct 18, 2025
9545f70
Bump org.jetbrains.kotlin.android from 2.2.20 to 2.2.21
dependabot[bot] Oct 23, 2025
c2b77fd
Merge pull request #1882 from pedroSG94/fix/record-audio-ts
pedroSG94 Oct 29, 2025
ed4301a
Merge pull request #1961 from pedroSG94/dependabot/gradle/org.jetbrai…
pedroSG94 Oct 29, 2025
d2c8575
add flip to rotation filter
pedroSG94 Oct 29, 2025
4668b29
rtmp fail on read is configurable now
pedroSG94 Oct 29, 2025
d6d740e
Added CameraXSource.openCamera to open a specific camera.
sw-orjan Oct 31, 2025
1af26b2
Merge pull request #1967 from sw-orjan/camerax-opencamera
pedroSG94 Nov 3, 2025
bf7c344
avoid crash on setAuth with GenericStream and update dependencies
pedroSG94 Nov 7, 2025
660cd2f
add setCustomRequest to Camera2Source
pedroSG94 Nov 7, 2025
3da506e
version 2.6.6
pedroSG94 Nov 7, 2025
bdebdbf
add sponsor to readme
pedroSG94 Nov 10, 2025
6d2e4c5
Bump agp from 8.13.0 to 8.13.1
dependabot[bot] Nov 10, 2025
a39625b
Merge pull request #1975 from pedroSG94/feature/add-sponsor
pedroSG94 Nov 10, 2025
0799695
Merge pull request #1976 from pedroSG94/dependabot/gradle/agp-8.13.1
pedroSG94 Nov 10, 2025
b83e962
Add setCustomOnCaptureCompletedCallback
Griselda4774 Nov 14, 2025
7a8f566
Merge pull request #1978 from noho501/feature/add_custom_capture_comp…
pedroSG94 Nov 14, 2025
d5f1b5a
fix crash on invalid rtmp url
pedroSG94 Nov 22, 2025
f2970bf
Bump ktor from 3.3.2 to 3.3.3
dependabot[bot] Nov 26, 2025
76fa8c4
limit StreamBlockingQueue size
pedroSG94 Dec 2, 2025
5dc1671
improve record start time
pedroSG94 Dec 3, 2025
d2d5525
adding support to h265 and av1 to flv record
pedroSG94 Dec 4, 2025
d4fe56c
add code fix and set codecs on change bsecontroller
pedroSG94 Dec 4, 2025
d8f2df5
reset sendInfo on stop record
pedroSG94 Dec 4, 2025
2b9dcb8
Bump camerax from 1.5.1 to 1.5.2
dependabot[bot] Dec 4, 2025
7e0f4b1
adding opus support to rtmp
pedroSG94 Dec 4, 2025
fb090cd
add rtmp opus support and record opus flv files
pedroSG94 Dec 5, 2025
304c174
add rtmp opus tests
pedroSG94 Dec 5, 2025
b649ae6
fix negative array size error
pedroSG94 Dec 10, 2025
1ac6ca5
Bump agp from 8.13.1 to 8.13.2
dependabot[bot] Dec 11, 2025
49d8ec8
Merge pull request #1998 from pedroSG94/feature/flv-record-h265-av1
pedroSG94 Dec 29, 2025
a588bb7
Merge pull request #1986 from pedroSG94/dependabot/gradle/ktor-3.3.3
pedroSG94 Dec 29, 2025
0f2eaa6
Merge branch 'master' into dependabot/gradle/camerax-1.5.2
pedroSG94 Dec 29, 2025
11e0b14
Merge pull request #2003 from pedroSG94/dependabot/gradle/agp-8.13.2
pedroSG94 Dec 29, 2025
3889e45
add setPreviewRotation to glstreaminterface
pedroSG94 Dec 29, 2025
d06ae6c
Merge pull request #1999 from pedroSG94/dependabot/gradle/camerax-1.5.2
pedroSG94 Dec 29, 2025
6d45da3
version 2.6.7
pedroSG94 Dec 29, 2025
913e4a7
make all metrics atomics
pedroSG94 Jan 4, 2026
8e26ad6
fix streamblockingqueue
pedroSG94 Jan 4, 2026
f294ea6
add edge detection customizable using performance mode false in the f…
pedroSG94 Jan 4, 2026
33d5eab
fix edgefilter
pedroSG94 Jan 4, 2026
63f2b2d
Fix UrlParser for encoded url queries
Jan 6, 2026
6f0abf3
Merge pull request #2020 from dunkpi/dunkpi_encodedUrlQuery
pedroSG94 Jan 8, 2026
47c812a
add get rtt and send shouldsendpings in rtmp
pedroSG94 Jan 19, 2026
8a99fdc
read SRT data packet on received
pedroSG94 Jan 25, 2026
b3023cc
Merge pull request #2022 from pedroSG94/feature/rtmp-rtt
pedroSG94 Jan 25, 2026
c8984cd
re-use ping scope
pedroSG94 Jan 25, 2026
5d8a5f7
return onfail on rtmp when publish failed
pedroSG94 Feb 6, 2026
c4aa283
add setIgnoredCommandCallback to rtmp
pedroSG94 Feb 13, 2026
b4b8d69
fix srt handshake flags and support add passphrase in url
pedroSG94 Feb 23, 2026
74599b5
Merge pull request #2041 from pedroSG94/fixing-srt-handshake
pedroSG94 Feb 25, 2026
749929e
Merge pull request #2037 from pedroSG94/ignoredcomandcallback
pedroSG94 Feb 25, 2026
8fde4d0
discard frames with invalid ts
pedroSG94 Feb 25, 2026
ab2efc5
fix send buffer
pedroSG94 Feb 25, 2026
d03cb0c
change record controller to async mode
pedroSG94 Mar 4, 2026
087eb3e
fix tests
pedroSG94 Mar 4, 2026
2ff7957
fixed tests
pedroSG94 Mar 4, 2026
1671850
Various performance improvements
Mar 4, 2026
b01ea17
bt709 optional, add ViewSurfaceFilterRender
pedroSG94 Mar 10, 2026
b25a9f6
remove unnessary changes
pedroSG94 Mar 10, 2026
cc49870
move new filter to kotlin
pedroSG94 Mar 10, 2026
e49da50
finish record asyn refactor
pedroSG94 Mar 11, 2026
04f3fdf
Merge pull request #2050 from pedroSG94/ts-changes
pedroSG94 Mar 12, 2026
12f9502
keep BaseRecordController without changes for compatibility, change B…
pedroSG94 Mar 13, 2026
4171cb4
Merge pull request #2045 from pedroSG94/async-record
pedroSG94 Mar 13, 2026
5e3938f
version 2.7.0
pedroSG94 Mar 13, 2026
927abd7
update docs and gradle dependencies
pedroSG94 Mar 13, 2026
166a330
fix crash on fixHeader and remove duplicated code getStartCodeSize me…
pedroSG94 Mar 17, 2026
880855b
add Mpeg2TsMuxerRecordController
pedroSG94 Mar 17, 2026
1706fb8
Merge pull request #2054 from pedroSG94/discard-frames-invalid-ts
pedroSG94 Mar 18, 2026
496c7f2
fix OpenGlView render timestamp
pedroSG94 Mar 19, 2026
f70d78e
Merge pull request #2055 from pedroSG94/fix-opengl
pedroSG94 Mar 19, 2026
0bb205e
update dependencies
pedroSG94 Mar 22, 2026
2c1e83b
version 2.7.1
pedroSG94 Mar 22, 2026
9016b91
update docs
pedroSG94 Mar 22, 2026
cdafdd5
secure codecs set as low priority
pedroSG94 Mar 29, 2026
01007e3
fix possible gl render ANR
pedroSG94 Mar 30, 2026
1cd54c2
fix possible gl render ANR 2
pedroSG94 Mar 30, 2026
7ccc9eb
fix timestamp on second record
pedroSG94 Apr 1, 2026
37c4903
version 2.7.2
pedroSG94 Apr 1, 2026
243a2e8
fix: CalledFromWrongThreadException on cameraFragment
TroyTheGod Apr 1, 2026
cfb8b1a
Merge pull request #2060 from TroyTheGod/fix-call-method-from-wrong-t…
pedroSG94 Apr 1, 2026
0ea2fcd
Bump ktor from 3.4.1 to 3.4.2
dependabot[bot] Apr 1, 2026
1adf730
Bump androidx.media3:media3-inspector from 1.9.3 to 1.10.0
dependabot[bot] Apr 1, 2026
2abb596
Bump org.jetbrains.dokka from 2.1.0 to 2.2.0
dependabot[bot] Apr 1, 2026
b960545
Merge pull request #2062 from pedroSG94/dependabot/gradle/ktor-3.4.2
pedroSG94 Apr 1, 2026
319006b
Merge pull request #2063 from pedroSG94/dependabot/gradle/androidx.me…
pedroSG94 Apr 1, 2026
cb11aa9
Merge pull request #2065 from pedroSG94/dependabot/gradle/org.jetbrai…
pedroSG94 Apr 1, 2026
cf2d101
update agp version
pedroSG94 Apr 1, 2026
4bb5511
revert remove compileOptions
pedroSG94 Apr 1, 2026
56581b7
add dummy test for udp
pedroSG94 Apr 1, 2026
d1612a5
remove secure codecs and use only regular codecs
pedroSG94 Apr 7, 2026
63499cf
Bump androidx.annotation:annotation from 1.9.1 to 1.10.0
dependabot[bot] Apr 8, 2026
a3efad9
Merge pull request #2068 from pedroSG94/dependabot/gradle/androidx.an…
pedroSG94 Apr 9, 2026
aaa1029
Bump agp from 9.1.0 to 9.1.1
dependabot[bot] Apr 13, 2026
c6ad854
Merge pull request #2071 from pedroSG94/dependabot/gradle/agp-9.1.1
pedroSG94 Apr 13, 2026
b5c9fac
Bump ktor from 3.4.2 to 3.4.3
dependabot[bot] Apr 22, 2026
6f5025b
Bump org.jetbrains.kotlin.android from 2.3.20 to 2.3.21
dependabot[bot] Apr 23, 2026
eda4d28
fix: addresses slow frame emission due to time unit mismatch
lcintron Apr 23, 2026
dad7782
Merge pull request #2081 from lcintron/fix/audio-source-sleeptime-mis…
pedroSG94 Apr 24, 2026
09e459d
Merge pull request #2080 from pedroSG94/dependabot/gradle/org.jetbrai…
pedroSG94 Apr 24, 2026
5155416
Merge pull request #2079 from pedroSG94/dependabot/gradle/ktor-3.4.3
pedroSG94 Apr 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 3 additions & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# These are supported funding model platforms
github: [pedroSG94]
custom: ['https://www.paypal.com/paypalme/pedroSG94'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
patreon: pedroSG94
custom: ['https://www.paypal.com/paypalme/pedroSG94']
# Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Smartphone (please complete the following information):**
- Library version [e.g. 2.2.7]
- Device: [e.g. Pixel 6a]
- OS: [e.g. Android13]
- Media server [e.g. srs, version 5.0]
- Class used [e.g. RtmpCamera1]


**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Question
about: Describe the quesiton here.
title: ''
labels: ''
assignees: ''

---


11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
26 changes: 26 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Android CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run tests with Gradle
run: ./gradlew test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/.idea
/build
.DS_Store
/.kotlin
196 changes: 103 additions & 93 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,96 +1,150 @@
# rtmp-rtsp-stream-client-java
# RootEncoder for Android

[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-rtmp%20rtsp%20stream%20client%20java-green.svg?style=true)](https://android-arsenal.com/details/1/5333)
[![Release](https://jitpack.io/v/pedroSG94/rtmp-rtsp-stream-client-java.svg)](https://jitpack.io/#pedroSG94/rtmp-rtsp-stream-client-java)
[![Release](https://jitpack.io/v/pedroSG94/RootEncoder.svg)](https://jitpack.io/#pedroSG94/RootEncoder)
[![Documentation](https://img.shields.io/badge/library-documentation-orange)](https://pedroSG94.github.io/RootEncoder)

<p align="center">
<strong>Sponsored with 💖 &nbsp by</strong><br />
<a href="https://getstream.io/?utm_source=github.com/pedroSG94/rtmp-rtsp-stream-client-java&utm_medium=github&utm_campaign=oss_sponsorship" target="_blank">
<img src="https://stream-blog-v2.imgix.net/blog/wp-content/uploads/f7401112f41742c4e173c30d4f318cb8/stream_logo_white.png?w=350" alt="Stream Chat" style="margin: 8px" />
<img src="assets/images/stream-logo.png" alt="Stream Chat" style="margin: 8px; width: 350px" />
</a>
<br />
Enterprise Grade APIs for Feeds & Chat. <a href="https://getstream.io/tutorials/android-chat/?utm_source=https://github.com/pedroSG94/rtmp-rtsp-stream-client-java&utm_medium=github&utm_content=developer&utm_term=java" target="_blank">Try the Android Chat tutorial</a> 💬
</p>

</br>

Library for stream in RTMP and RTSP. All code in Java.

If you need a player see this project:

https://github.com/pedroSG94/vlc-example-streamplayer
## Recall.ai - Mobile Recording SDK

## iOS version (under develop):
If you’re looking for a hosted mobile recording API, consider checking out [Recall.ai](https://www.recall.ai/product/mobile-recording-sdk?utm_source=github&utm_medium=sponsorship&utm_campaign=pedrosg94-rootencoder), an API that records phone calls and in-person meetings.

https://github.com/pedroSG94/rtmp-rtsp-stream-client-swift
---

RootEncoder (rtmp-rtsp-stream-client-java) is a stream encoder to push video/audio to media servers using protocols RTMP, RTSP and SRT with all code written in Java/Kotlin

Note: The library was renamed from rtmp-rtsp-stream-client-java to RootEncoder after add SRT protocol because the name has no sense anymore


## iOS version:

https://github.com/pedroSG94/RootEncoder-iOS

## Wiki

https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/wiki
https://github.com/pedroSG94/RootEncoder/wiki

## Permissions:

```xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!--Optional for play store-->
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
```

## Compile

To use this library in your project with gradle add this to your build.gradle:

<details open>
<summary>Last version</summary>

```gradle
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.1.7'
implementation "com.github.pedroSG94.RootEncoder:library:2.7.2"
//Optional, allow use CameraXSource and CameraUvcSource
implementation "com.github.pedroSG94.RootEncoder:extra-sources:2.7.2"
}

```

</details>

<details close>
<summary>Old versions (2.2.6 or less)</summary>

```gradle
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.pedroSG94.RootEncoder:rtplibrary:2.2.6'
}
```

</details>

## Features:

- [x] Android min API 16.
- [x] Extra video sources minAPI 21+ (BitmapSource, CameraXSource and CameraUvcSource)

### Encoder:

- [x] Support [camera1](https://developer.android.com/reference/android/hardware/Camera.html) and [camera2](https://developer.android.com/reference/android/hardware/camera2/package-summary.html) API
- [x] Encoder type buffer to buffer.
- [x] Encoder type surface to buffer.
- [x] RTMP/RTSP auth.
- [x] Audio noise suppressor.
- [x] Audio echo cancellation.
- [x] Disable/Enable video and audio while streaming.
- [x] Switch camera while streaming.
- [x] Change video bitrate while streaming (API 19+).
- [X] Get upload bandwidth used.
- [x] AV1, H264, H265, G711, AAC and OPUS hardware/software encoding.
- [x] Force video and audio Codec to use hardware/software encoding (Not recommended).
- [X] Record MP4 file while streaming (API 18+).
- [x] H264, H265 and AAC hardware encoding.
- [x] Force H264 and AAC Codec hardware/software encoding (Not recommended).
- [x] RTSP TCP/UDP.
- [x] Stream from video and audio files like mp4, webm, mp3, etc (Limited by device decoders). [More info](https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/wiki/Stream-from-file)
- [x] Stream device display (API 21+).
- [X] Set Image, Gif or Text to stream on real time.
- [X] OpenGL real time filters. [More info](https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/wiki/Real-time-filters)
- [X] RTMPS and RTSPS.
- [X] RTSP H265 support (Waiting FLV official packetization to add RTMP support).
- [X] OpenGL real time filters. [More info](https://github.com/pedroSG94/RootEncoder/wiki/Real-time-filters)
- [x] Stream from video and audio files like mp4, webm, mp3, etc (Limited by device decoders). [More info](https://github.com/pedroSG94/RootEncoder/wiki/Stream-from-file)
- [x] Stream device screen (API 21+).

### Beta:
### RTMP:

- [X] RTMPT and RTMPTS (HTTP and HTTPS tunneled). Actually working but a request take so much time producing drop frames.
- [X] Get upload bandwidth used.
- [x] RTSP auth (adobe and llnw).
- [x] AV1, H265 ([Using RTMP enhanced](https://github.com/veovera/enhanced-rtmp/tree/main)), H264, AAC and G711 support.
- [x] RTMPS (under TLS)
- [x] RTMPT and RTMPTS (tunneled and tunneled under TLS)
- [x] AMF0
- [ ] AMF3

## Other related projects:
### RTSP:

https://github.com/pedroSG94/RTSP-Server
- [X] Get upload bandwidth used.
- [x] RTMP auth (basic and digest).
- [x] AV1, H264, H265, AAC, G711 and OPUS support.
- [x] TCP/UDP.
- [x] RTSPS.

### SRT (beta):

- [X] Get upload bandwidth used.
- [X] H264, H265, AAC and OPUS support.
- [X] Resend lost packets
- [X] Encrypt (AES128, AES192 and AES256)
- [ ] SRT auth.

https://haivision.github.io/srt-rfc/draft-sharabayko-srt.html

### UDP (beta):

- [X] Get upload bandwidth used.
- [X] H264, H265, AAC and OPUS support.
- [X] Unicast, Multicast and Broadcast support.
- [X] MPEG2-TS support.

https://github.com/pedroSG94/AndroidReStreamer

https://github.com/pedroSG94/Stream-USB-test
## Other related projects:

https://github.com/pedroSG94/RTSP-Server

### 3rd party projects:

Expand All @@ -104,77 +158,33 @@ https://github.com/FunnyDevs/rtmp-rtsp-stream-client-java-recordcontrollers
### NOTE:
In library version 2.0.9, the filters was refactored. Check the wiki link to migrate your implementation.

https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/wiki/Real-time-filters
https://github.com/pedroSG94/RootEncoder/wiki/Real-time-filters

## Use example:
## Looking for sponsors

This code is a basic example.
I recommend you go to Activities in app module and see all examples.
This library need sponsors to get new devices or pay platforms to test and debug errors. Any donation or sponsor is welcome!
If you are interested. You can contact me by email or donate directly on [Github](https://github.com/sponsors/pedroSG94) or [Paypal](https://www.paypal.com/paypalme/pedroSG94)
Thank you!

### RTMP:
## Use examples:

```java
### Rotation example

//default
This is the recommend way to use the library.
This example support screen rotation, stream orientation (vertical, horizontal) filters and change video/audio sources on fly:
https://github.com/pedroSG94/RootEncoder/tree/master/app/src/main/java/com/pedro/streamer/rotation

//create builder
RtmpCamera1 rtmpCamera1 = new RtmpCamera1(openGlView, connectCheckerRtmp);
//start stream
if (rtmpCamera1.prepareAudio() && rtmpCamera1.prepareVideo()) {
rtmpCamera1.startStream("rtmp://yourEndPoint");
} else {
/**This device cant init encoders, this could be for 2 reasons: The encoder selected doesnt support any configuration setted or your device hasnt a H264 or AAC encoder (in this case you can see log error valid encoder not found)*/
}
//stop stream
rtmpCamera1.stopStream();

//with params

//create builder
RtmpCamera1 rtmpCamera1 = new RtmpCamera1(openGlView, connectCheckerRtmp);
//start stream
if (rtmpCamera1.prepareAudio(int bitrate, int sampleRate, boolean isStereo, boolean echoCanceler,
boolean noiseSuppressor) && rtmpCamera1.prepareVideo(int width, int height, int fps, int bitrate, int rotation)) {
rtmpCamera1.startStream("rtmp://yourEndPoint");
} else {
/**This device cant init encoders, this could be for 2 reasons: The encoder selected doesnt support any configuration setted or your device hasnt a H264 or AAC encoder (in this case you can see log error valid encoder not found)*/
}
//stop stream
rtmpCamera1.stopStream();
### Screen example

```
Example to stream using Screen as video source using a service to stream in background:
https://github.com/pedroSG94/RootEncoder/tree/master/app/src/main/java/com/pedro/streamer/screen

### RTSP:
### From file example

```java
Code example to stream using a video file as video/audio source:
https://github.com/pedroSG94/RootEncoder/tree/master/app/src/main/java/com/pedro/streamer/file

//default
### Old Api example

//create builder
//by default TCP protocol.
RtspCamera1 rtspCamera1 = new RtspCamera1(openGlView, connectCheckerRtsp);
//start stream
if (rtspCamera1.prepareAudio() && rtspCamera1.prepareVideo()) {
rtspCamera1.startStream("rtsp://yourEndPoint");
} else {
/**This device cant init encoders, this could be for 2 reasons: The encoder selected doesnt support any configuration setted or your device hasnt a H264 or AAC encoder (in this case you can see log error valid encoder not found)*/
}
//stop stream
rtspCamera1.stopStream();

//with params

//create builder
RtspCamera1 rtspCamera1 = new RtspCamera1(openGlView, connectCheckerRtsp);
rtspCamera1.setProtocol(protocol);
//start stream
if (rtspCamera1.prepareAudio(int bitrate, int sampleRate, boolean isStereo, boolean echoCanceler,
boolean noiseSuppressor) && rtspCamera1.prepareVideo(int width, int height, int fps, int bitrate, int rotation)) {
rtspCamera1.startStream("rtsp://yourEndPoint");
} else {
/**This device cant init encoders, this could be for 2 reasons: The encoder selected doesnt support any configuration setted or your device hasnt a H264 or AAC encoder (in this case you can see log error valid encoder not found)*/
}
//stop stream
rtspCamera1.stopStream();

```
Code example for low API devices (Android API 16+):
https://github.com/pedroSG94/RootEncoder/tree/master/app/src/main/java/com/pedro/streamer/oldapi
Loading