Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1057 commits
Select commit Hold shift + click to select a range
2e7b177
fix tests imports
pedroSG94 Mar 4, 2025
e2c3fa4
fix camera2 crash on low api level
pedroSG94 Mar 5, 2025
baef1bf
fix SensorRotationManager initial orientation
pedroSG94 Mar 6, 2025
29f89d8
Merge branch 'master' of https://github.com/pedroSG94/RootEncoder
pedroSG94 Mar 6, 2025
20c3de5
try fix BitmapSource wait to stop
pedroSG94 Mar 6, 2025
7beedfb
fix audio buffer timestamp with clock
pedroSG94 Mar 7, 2025
b3c1893
allow rotate only stream (all or camera only)
pedroSG94 Mar 10, 2025
7616104
set java.io and ktor socket optionals
pedroSG94 Mar 10, 2025
10d2a90
make all timestamp monotonic
pedroSG94 Mar 11, 2025
e3faf30
fix tests
pedroSG94 Mar 11, 2025
bcdd89d
remove test code
pedroSG94 Mar 11, 2025
797f838
optimize rotation
pedroSG94 Mar 11, 2025
ad2e898
fix udp java
pedroSG94 Mar 11, 2025
4a01f0e
Merge pull request #1745 from pedroSG94/feature/rotate-stream
pedroSG94 Mar 11, 2025
a4f4ade
refactoring
pedroSG94 Mar 11, 2025
8fdb283
remove securesubmit if possible
pedroSG94 Mar 11, 2025
1c5482d
Merge pull request #1748 from pedroSG94/fix/gl-crash
pedroSG94 Mar 11, 2025
cbe7e76
Merge pull request #1735 from pedroSG94/feature/java-io
pedroSG94 Mar 12, 2025
feefd7b
Merge branch 'master' into fix/audio-sync
pedroSG94 Mar 12, 2025
ad23edc
remove duplicate code
pedroSG94 Mar 12, 2025
0c2c12f
optimize srt packetizer
pedroSG94 Mar 12, 2025
1ae6210
fix rtmp tests
pedroSG94 Mar 12, 2025
e784873
change MixAudioSource
pedroSG94 Mar 12, 2025
c478285
fix npe release crash
pedroSG94 Mar 13, 2025
914f90e
Merge branch 'master' into fix/audio-sync
pedroSG94 Mar 13, 2025
76f63aa
optimize volume filter and mix
pedroSG94 Mar 15, 2025
378d9e5
fix mix problem
pedroSG94 Mar 15, 2025
63cdd8f
Merge pull request #1739 from pedroSG94/fix/audio-sync
pedroSG94 Mar 16, 2025
97dc35c
add buffer to buffer support in BufferDecoder
pedroSG94 Mar 16, 2025
ad74d1c
move Bitmap and BufferVideo sources to encoder module
pedroSG94 Mar 16, 2025
238972c
fix MPEGTS small PES packets
pedroSG94 Mar 16, 2025
4ba166e
fix MPEGTS small
pedroSG94 Mar 16, 2025
245ee3a
add small MPEGTS aac buffer test
pedroSG94 Mar 16, 2025
964c3b7
chunk SRT packets again
pedroSG94 Mar 16, 2025
d16332d
chunk psi packets
pedroSG94 Mar 16, 2025
2c2a7ff
fix srt tests
pedroSG94 Mar 16, 2025
047e1a8
adding srt optimizations
pedroSG94 Mar 16, 2025
4cfeb96
optimize mpegts packetization
pedroSG94 Mar 16, 2025
8d3e7ea
version 2.5.8
pedroSG94 Mar 18, 2025
78e98ab
add whitebalance support to camera1 and camera2
pedroSG94 Mar 20, 2025
7ddb05b
add AmplitudeEffect
pedroSG94 Mar 20, 2025
3f2a1e7
fix set color correction gain
pedroSG94 Mar 20, 2025
c9f5769
Bump org.jetbrains.kotlin.android from 2.1.10 to 2.1.20
dependabot[bot] Mar 20, 2025
41e4e20
add FlvMuxerRecordController and refactor AacMuxerRecordController
pedroSG94 Mar 20, 2025
dc6cf23
remove unnecessary lock
pedroSG94 Mar 20, 2025
c3087bd
fix ktor tls timeout
pedroSG94 Mar 21, 2025
f166dad
version 2.5.9
pedroSG94 Mar 21, 2025
e74bfd6
add multiple methods to CameraXSource
pedroSG94 Mar 21, 2025
292aa32
fix loop error
pedroSG94 Mar 22, 2025
517197f
modify rtmp incrementalts
pedroSG94 Mar 22, 2025
fdcdd2a
change rtmp incremental ts
pedroSG94 Mar 23, 2025
6cea478
fix screen example and use ktor version 2.3.13
pedroSG94 Mar 28, 2025
0906e78
add StreamBlockQueue
pedroSG94 Mar 28, 2025
90d8742
add setDelay method and fix error
pedroSG94 Mar 28, 2025
9680da7
avoid change state while drawing
pedroSG94 Mar 29, 2025
08bd3b6
fix makecurrent and change camera preview draw
pedroSG94 Mar 29, 2025
4e83fc9
use executor again
pedroSG94 Mar 30, 2025
a2f2032
OpenGlView to kotlin
pedroSG94 Mar 30, 2025
d35f999
draw offscreen only if necessary
pedroSG94 Mar 30, 2025
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
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.6.7"
//Optional, allow use CameraXSource and CameraUvcSource
implementation "com.github.pedroSG94.RootEncoder:extra-sources:2.6.7"
}

```

</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