Giter VIP home page Giter VIP logo

haishinkit.kt's Introduction

Hi there 👋

haishinkit.kt's People

Contributors

bypass112 avatar chatelgu avatar dependabot[bot] avatar shogo4405 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

haishinkit.kt's Issues

Invalid Buffer size

Describe the bug

I have 2 applications one is the pubblish and the other is just the client. When I connect to stream in client i recive this:

FATAL EXCEPTION: com.haishinkit.codec.AudioCodec
Process: com.audioguiame.guidum, PID: 19985
java.lang.IllegalArgumentException: Invalid audio buffer size.
at android.media.AudioTrack.audioBuffSizeCheck(AudioTrack.java:1209)
at android.media.AudioTrack.(AudioTrack.java:615)
at android.media.AudioTrack.(AudioTrack.java:562)
at android.media.AudioTrack.(AudioTrack.java:516)
at android.media.AudioTrack.(AudioTrack.java:457)
at com.haishinkit.net.NetStream.createAudioTrack$haishinkit_release(NetStream.kt:152)
at com.haishinkit.rtmp.RtmpMuxer.onFormatChanged(RtmpMuxer.kt:262)
at com.haishinkit.codec.Codec.setOutputFormat(Codec.kt:170)
at com.haishinkit.codec.Codec.access$setOutputFormat(Codec.kt:18)
at com.haishinkit.codec.Codec$Callback.onOutputFormatChanged(Codec.kt:92)
at android.media.MediaCodec$EventHandler.handleCallback(MediaCodec.java:1712)
at android.media.MediaCodec$EventHandler.handleMessage(MediaCodec.java:1646)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)

We have this application in ios and is working well "pubblish" (ios, android) to ios client but with android receiving that.

To Reproduce

  1. Pubblish a stream
  2. Connect with Android client
  3. Crash with codec

Expected behavior

FATAL EXCEPTION: com.haishinkit.codec.AudioCodec
Process: com.audioguiame.guidum, PID: 19985
java.lang.IllegalArgumentException: Invalid audio buffer size.
at android.media.AudioTrack.audioBuffSizeCheck(AudioTrack.java:1209)
at android.media.AudioTrack.(AudioTrack.java:615)
at android.media.AudioTrack.(AudioTrack.java:562)
at android.media.AudioTrack.(AudioTrack.java:516)
at android.media.AudioTrack.(AudioTrack.java:457)
at com.haishinkit.net.NetStream.createAudioTrack$haishinkit_release(NetStream.kt:152)
at com.haishinkit.rtmp.RtmpMuxer.onFormatChanged(RtmpMuxer.kt:262)
at com.haishinkit.codec.Codec.setOutputFormat(Codec.kt:170)
at com.haishinkit.codec.Codec.access$setOutputFormat(Codec.kt:18)
at com.haishinkit.codec.Codec$Callback.onOutputFormatChanged(Codec.kt:92)
at android.media.MediaCodec$EventHandler.handleCallback(MediaCodec.java:1712)
at android.media.MediaCodec$EventHandler.handleMessage(MediaCodec.java:1646)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)

Version

0.11.1

Smartphone info.

No response

Additional context

No response

Screenshots

No response

Relevant log output

No response

java.lang.IllegalArgumentException when finalising an RTMP publish stream from Flutter library

Describe the bug

Hello, recently I've discovered that sometimes the opaque parametre contains a space in it's value that will generate a malformed URL.
For this I've used the https://github.com/shogo4405/HaishinKit.dart available for Flutter, but from what I've seen the issue is only reproducing on Android side with the error at the end, that's why this bug is submited directly to the Android project.

W/NetSocketImpl(30031): java.lang.IllegalArgumentException: Illegal character in query at index 122: rtmp://user:passwd@site:1935/mount/?authmod=adobe&user=user&opaque=Qul nQ==&challenge=080f28b6&response=sAUdK5ZAnzX1KKxadxK6zQ==
W/NetSocketImpl(30031): 	at java.net.URI.create(URI.java:848)
W/NetSocketImpl(30031): 	at com.haishinkit.rtmp.RtmpConnection.connect(RtmpConnection.kt:220)
W/NetSocketImpl(30031): 	at com.haishinkit.rtmp.RtmpAuthenticator.handleEvent(RtmpAuthenticator.kt:47)
W/NetSocketImpl(30031): 	at com.haishinkit.event.EventDispatcher.dispatchEvent(EventDispatcher.kt:37)
W/NetSocketImpl(30031): 	at com.haishinkit.event.EventDispatcher.dispatchEventWith(EventDispatcher.kt:60)
W/NetSocketImpl(30031): 	at com.haishinkit.rtmp.message.RtmpCommandMessage.execute(RtmpCommandMessage.kt:81)
W/NetSocketImpl(30031): 	at com.haishinkit.rtmp.RtmpConnection.listen$haishinkit_release(RtmpConnection.kt:308)
W/NetSocketImpl(30031): 	at com.haishinkit.rtmp.RtmpSocket.onInput(RtmpSocket.kt:126)
W/NetSocketImpl(30031): 	at com.haishinkit.net.NetSocketImpl.doInput(NetSocketImpl.kt:107)
W/NetSocketImpl(30031): 	at com.haishinkit.net.NetSocketImpl.doConnection(NetSocketImpl.kt:167)
W/NetSocketImpl(30031): 	at com.haishinkit.net.NetSocketImpl.access$doConnection(NetSocketImpl.kt:21)
W/NetSocketImpl(30031): 	at com.haishinkit.net.NetSocketImpl$connect$1.invokeSuspend(NetSocketImpl.kt:60)
W/NetSocketImpl(30031): 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
W/NetSocketImpl(30031): 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
W/NetSocketImpl(30031): 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
W/NetSocketImpl(30031): 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
W/NetSocketImpl(30031): 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
W/NetSocketImpl(30031): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
W/NetSocketImpl(30031): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
W/NetSocketImpl(30031): 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
W/NetSocketImpl(30031): Caused by: java.net.URISyntaxException: Illegal character in query at index 122: rtmp://user:passwd@site:1935/mount/?authmod=adobe&user=user&opaque=Qul nQ==&challenge=080f28b6&response=sAUdK5ZAnzX1KKxadxK6zQ==
W/NetSocketImpl(30031): 	at java.net.URI$Parser.fail(URI.java:2893)
W/NetSocketImpl(30031): 	at java.net.URI$Parser.checkChars(URI.java:3066)
W/NetSocketImpl(30031): 	at java.net.URI$Parser.parseHierarchical(URI.java:3156)
W/NetSocketImpl(30031): 	at java.net.URI$Parser.parse(URI.java:3098)
W/NetSocketImpl(30031): 	at java.net.URI.<init>(URI.java:584)
W/NetSocketImpl(30031): 	at java.net.URI.create(URI.java:846)
W/NetSocketImpl(30031): 	... 19 more

To Reproduce

  1. Try connecting to any rtmp ingest server, at some point the Exception will be thrown.

Expected behavior

  1. Opaque parametre shouldn't contain any spaces so it won't produce a malformed URL

Version

Latest version available on https://github.com/shogo4405/HaishinKit.dart

Smartphone info.

No response

Additional context

No response

Screenshots

No response

Relevant log output

No response

Is it possible to use without Vulkan module (to allow usage on API 21)?

Is your feature request related to a problem? Please describe.
The current minSdk setting for the vulkan module is 26, but it's 21 for the main haishinkit module.

Is it possible to use only the haishinkit module so that it can be used in an app that wishes to keep compatibility with API 21?

Would adding just the haishinkit module as a dependency work?

Describe the solution you'd like
Ability to use HaishinKit on API 21

Describe alternatives you've considered
Since I anyway have a fork to enable building with jitpack, I could revert the commit that uses features only available in API 26.

Video aspect ratio still incorrect with some resolution settings

Describe the bug
Followup from #48, It works fine when not setting any resolution (so letting it use the default of 640x360), but when I add cameraSource.resolution = Size(480, 640) in the onResume() method of the example app's CameraTabFragment, both the view on the phone and the stream are stretched.

To Reproduce
Steps to reproduce the behavior:

  1. Add cameraSource.resolution = Size(480, 640) in the onResume() method of the example app's CameraTabFragment
  2. Hold phone in portrait mode
  3. Tap publish
  4. Open Stream
  5. Both the video on the phone and the stream are stretched.

Expected behavior
Video should not be stretched

Screenshots

Phone VLC

Desktop (please complete the following information):

  • OS: macOS 11.6
  • VLC media player 3.0.12.1 Vetinari (revision 3.0.12.1-0-g170157402b)

Smartphone (please complete the following information):

  • Device: Samsung Galaxy A02
  • OS: Android 11

CAMERA_ERROR (3): submitRequestList - cannot use a surface that wasn't configured

Hi, Iv'e tested the example app with 3 devices:

Samsung J7, Android version 8.1.0:
As soon as I click the "publish" button:
Screen freeze but the audio still working and broadcasting

Samsung 9+ , Android version 10:
As soon as I click the "publish" button:
Working but crashing after few minutes for unknown reason

Xiaomi Mi A2 , Android version 10:
As soon as I click the "publish" button:
crash with this exception:
CAMERA_ERROR (3): submitRequestList - cannot use a surface that wasn't configured

Can you provide a workaround for this issue please?

Please reset jitpack artifact

Describe the bug
Gradle can't use packages with dots in the name, so the library must be referred to as HaishinKit~kt. On the JitPack page for the correctly named package, the 0.9.4 build failed. However, specifying the commit of the 0.9.4 tag in JitPack builds fine, so can you please delete the artifact so it can be rebuilt?

To Reproduce
Steps to reproduce the behavior:

  1. Add implementation 'com.github.shogo4405.HaishinKit~kt:haishinkit:0.9.4' to a build.gradle

Expected behavior
Project can sync and build

JitPack build log
https://jitpack.io/com/github/shogo4405/HaishinKit~kt/0.9.4/build.log

Build log of 0.9.4 commit
https://jitpack.io/com/github/shogo4405/HaishinKit~kt/5bab74f/build.log

Can u add appendBuffer () menthod

Is your feature request related to a problem? Please describe.
I want to forward a video Stream to a VMS server, the video is captured by a different source and streamed to my phone via an HTTP connection, I want to forward it to a VMS Server
Right now I can see a method appendBuffer() available in swift, but it is not available in haishinkit.kt

Describe the solution you'd like
Can I use the haishinkits RTMP stream class to append a video buffer to stream to a VMS server, as well as append an audio buffer?

Describe alternatives you've considered
I have looked into the module but unable to find a method to stream out a buffer

Additional context
N/A

Camera 3 is not available. Ignore physical camera status change

Describe the bug

android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): createDefaultRequest:1290: Camera 0: Error creating default request for template 1: Function not implemented (-38)

To Reproduce

run demo on the phone

Expected behavior

Could not compile shader 35633

Version

0.13.6

Smartphone info.

oppo pfvm10 (oppo A56 5G),android 12

Additional context

No response

Screenshots

No response

Relevant log output

Camera 3 is not available. Ignore physical camera status change
 android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): createDefaultRequest:1290: Camera 0: Error creating default request for template 1: Function not implemented (-38)
 Caused by: android.os.ServiceSpecificException: createDefaultRequest:1290: Camera 0: Error creating default request for template 1: Function not implemented (-38) (code 10)

Aws Elemental MediaLive showing no-video/no-audio

Describe the bug

  1. Setup a channel on AWS Elemental MediaLive
  2. Configured the output of AWS Elemental MediaLive to send the stream to YouTube
  3. Used this sample project to send the RTMP stream to Elemental MediaLive
  4. Elemental MediaLive showing showing the "No Video", "No Audio" errors in the CloudWatch
    Below are the CloudWatch logs
    {
    "encoder_pipeline": 0,
    "severity": "I",
    "timestamp": "2020-12-10T18:45:53.474738",
    "channel_arn": "arn:aws:medialive:us-east-2:xxxxxxxxxxx:channel:1562284",
    "logger_name": "rtmp",
    "message": "RTMP reader for rtmp://[URL] read 2 buffers for a total of 147 bytes, closing."
    }
    {
    "encoder_pipeline": 0,
    "severity": "W",
    "timestamp": "2020-12-10T18:45:53.474923",
    "channel_arn": "arn:aws:medialive:us-east-2:xxxxxxxxxxx:channel:1562284",
    "logger_name": "",
    "message": "Failed to probe input: Input rtmp://localhost:1935/5d7fdfad-3f2d-42fd-ae96-4bcc20d57d04-ac8fe2f4-558c-463d-a59e-7dc84002c54b contains no video."
    }

Expected behavior
CloudWatch logs should not show any error. RTMP stream should go to YouTube. Stream should be visible in YouTube.

Smartphone (please complete the following information):

  • Device: [Android]

Additional context
Posted this question on aws-forum for the same. Below is there response:

  1. The source being pushed to MediaLive is corrupt.
  2. The RTMP metadata reports the video resolution as 0x0 with no bit rate being defined.
  3. The audio setup is also missing the sampling frequency and the audio bit rate.
  4. Additionally the source is intermittent, and it seems that the source device may not be sending the RTMP handshake info required at the start of any RTMP session. In an RTMP Push session, it is the responsibility of the source device that will push the RTMP content to the destination to initiate the RTMP session, which consists of the RTMP handshake.

Please help me to fix this issue. iOS variant of your library works with same Elemental MediaLive setup.

Do you still working on it?

Hi friend,

We are using this lib swift version and it is good.
Now, we are working for Android, and I would to now when you can release this lib for Android version.

Please let me know about it!

Thanks friend!

BufferOverflowException

Describe the bug

 com.magicpolygon.storycircles.debug  W  java.nio.BufferOverflowException
                                                                                                	at java.nio.Buffer.nextPutIndex(Buffer.java:542)
                                                                                                	at java.nio.HeapByteBuffer.putDouble(HeapByteBuffer.java:539)
                                                                                                	at com.haishinkit.amf.Amf0Serializer.putDouble(Amf0Serializer.kt:17)
                                                                                                	at com.haishinkit.amf.Amf0Serializer.putObject(Amf0Serializer.kt:89)
                                                                                                	at com.haishinkit.amf.Amf0Serializer.putMap(Amf0Serializer.kt:39)
                                                                                                	at com.haishinkit.rtmp.message.RtmpCommandMessage.encode(RtmpCommandMessage.kt:28)
                                                                                                	at com.haishinkit.rtmp.RtmpChunk.encode(RtmpChunk.kt:15)
                                                                                                	at com.haishinkit.rtmp.RtmpConnection.doOutput$haishinkit_release(RtmpConnection.kt:263)
                                                                                                	at com.haishinkit.rtmp.RtmpSocket.onInput(RtmpSocket.kt:121)
                                                                                                	at com.haishinkit.net.NetSocketImpl.doInput(NetSocketImpl.kt:107)
                                                                                                	at com.haishinkit.net.NetSocketImpl.doConnection(NetSocketImpl.kt:167)
                                                                                                	at com.haishinkit.net.NetSocketImpl.access$doConnection(NetSocketImpl.kt:21)
                                                                                                	at com.haishinkit.net.NetSocketImpl$connect$1.invokeSuspend(NetSocketImpl.kt:60)
                                                                                                	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                                                                                                	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                                                                                                	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
                                                                                                	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
                                                                                                	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
                                                                                                	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
                                                                                                	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
                                                                                                	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

To Reproduce

When user multipal time start and stop live telecast.

Expected behavior

When user multipal time start and stop live telecast.

Version

0.11.0

Smartphone info.

No response

Additional context

No response

Screenshots

No response

Relevant log output

No response

GLES10.glOrthof fail with error 0x502

Describe the bug
The test application always fails at start time on my phones.

Adding some GlUtil.checkGlError, I find out that it's the call to GLES10.glOrthof line 133 of GlKernel.kt on last main branch that failed with error 0x502

Skipping this line, the application is launching (the camera preview do not take all the phone screen and the image is not as clean as expected, but that's probably fair)

To Reproduce
Steps to reproduce the behavior:

  1. Launch the app
    The application crash

Expected behavior
The application is not crashing

Smartphone:

  • Device: Pixel 6; OS: Android 12
  • Device: Samsung Galaxy S9; OS: Android 8.0.0

Streaming to Amazon IVS

Hello.
Trying to use HaishinKit to stream to Amazon Interactive Video Service.
I'm able to connect to IVS and don't get any error, but the IVS console never shows the stream.

Has HaishinKit been used with IVS? Any suggestion or insight how to debug the connection?
Help will be appreciated.

Audio and video out of sync

Describe the bug

Using HaishinKit to stream, when viewing the stream the audio and video appear to not be synced. From what I've observed the audio seems to be delayed anywhere from about 100ms to 1 second.

This happens on all devices I've tested, from both the example project in this repository, as well as my own app with using this library.

To Reproduce

  1. Run the example app on an Android device.
  2. Tap the publish button
  3. Watch the stream from a video player
  4. The audio is delayed

Expected behavior

The audio should be in sync with the video.

Version

0.11.0

Smartphone info.

  • Device: Google Pixel 2XL

  • OS: Android 11

  • Device: Samsung Galaxy Tab A7 Lite

  • OS: Android 13

  • Device: Samsung Galaxy S20 FE

  • OS: Android 11

Additional context

No response

Screenshots

No response

Relevant log output

No response

While switching front camera to back camera or vice versa

Describe the bug

While switching from the front camera to the back camera or vice versa, the current camera preview is changed to 180 degrees, and switching camera (version 0.10.3)

To Reproduce

cameraSource.switchCamera()

Expected behavior

It should change the front camera to the back camera and vice versa.

Version

0.10.3

Smartphone info.

No response

Additional context

No response

Screenshots

No response

Relevant log output

No response

Audio live streaming stopped working after upgrading it from 0.11.2 to latest version 0.13.6 due to some encoders related changes

Describe the bug

We are getting encoder related debug log while doing Http live streaming for audio using RTMP in the latest version 0.13.6. We are not doing video streaming inside our app.

Previously we are using 0.11.2 version and in that audio live streaming was working fine.

Here is the log : ```
{code=NetConnection.Connect.Success, clientid=1.628338297E9, data=Amf0EcmaArray{{version=3,5,7,7009}}, level=status, description=Connection succeeded., objectEncoding=0.0}
NetConnection.Connect.Success
NetStream.Publish.Start
NetConnection.Connect.Success
Hn RTMP Broadcast started 1
current=INITIALIZED, change=OPEN
current=OPEN, change=PUBLISH
{code=NetStream.Publish.Denied, clientid=1.628338297E9, level=error, description=RTMP Publishing not allowed. Client is not in list of valid encoders.}
NetStream.Publish.Denied
NetStream.Publish.Start
NetConnection.Connect.Success
{code=NetConnection.Connect.Closed, level=status}
NetConnection.Connect.Closed
NetStream.Publish.Start
NetConnection.Connect.Success


### To Reproduce

While doing Http live streaming for audio using RTMP in the latest version 0.13.6

### Expected behavior

It should be work same as older version 0.11.2

### Version

0.13.6

### Smartphone info.

One plus nord 2 -  5G
Android operating system - 13

(Not working for all the other devices and different OS version)

### Additional context

Due to encoder related changes in the latest version it stopped working.  How can I overcome this issue?

### Screenshots

_No response_

### Relevant log output

```shell
{code=NetConnection.Connect.Success, clientid=1.628338297E9, data=Amf0EcmaArray{{version=3,5,7,7009}}, level=status, description=Connection succeeded., objectEncoding=0.0}
  NetConnection.Connect.Success
  NetStream.Publish.Start
 NetConnection.Connect.Success
 Hn RTMP Broadcast started 1
 current=INITIALIZED, change=OPEN
 current=OPEN, change=PUBLISH
  {code=NetStream.Publish.Denied, clientid=1.628338297E9, level=error, description=RTMP Publishing not allowed.  Client is not in list of valid encoders.}
  NetStream.Publish.Denied
NetStream.Publish.Start
 NetConnection.Connect.Success
 {code=NetConnection.Connect.Closed, level=status}
 NetConnection.Connect.Closed
  NetStream.Publish.Start
NetConnection.Connect.Success

Getting only RtmpConnection Success RTMP_STATUS Event

Describe the bug
Adding event listener into RtmpConnection object is returning only one status event - code=NetConnection.Connect.Success. It's not possible to get other statuses like REJECTED, CLOSED, FAILED.

To Reproduce
Steps to reproduce the behavior:

  1. Create new RtmpConnection object val connection = RtmpConnection()
  2. Add event listener into object connection.addEventListener(Event.RTMP_STATUS, this)
  3. Connect to rtmp stream connection.connect("rtmpStreamUrl")
  4. Listen for changes and see that only SUCCESS status is appearing.

Expected behavior
Get other statuses than SUCCESS, like CLOSED, FAILED.

Smartphone (please complete the following information):

  • Device: Xiaomi Mi Note Lite 10
  • OS: Android 12

Additional context
I've also tried adding listener with IO_ERROR, but this is not returning any error/message/status.

Audio playback issue at receiver end during audio live streaming after upgrading from 0.11.2 to latest version 0.13.6

Describe the bug

Here is the link for the audio live streaming issue which is already closed. After your comment in that issue, I have made changes accordingly but audio playback stopped working at receiver end.

#266

We have implemented the changes based on your comments. However, following this update, we are encountering an audio playback issue on the receiver's end during live audio streaming. I do not see any obvious errors on the streaming side.Attached the logs for the streaming side as well for your review here, the receiver is experiencing a SocketTimeoutException while listening.

Is there any other change made in the latest version apart from the encoder? Is there any change related to the streaming side?

Any suggestions to fix this issue? Please let me know.

We have checked again with the older version v0.11.2, in which audio streaming and playback was working fine.

Scenario: I am starting live audio streaming from android device and playback it from another device, but the playback stalls every time, resulting in a SocketTimeoutException. We have also tried playback with iPhone/iPad, and it was not working on those devices either.

Here I am attaching log for streaming end and playback end.
live audio playback log.txt
live streaming log.txt

To Reproduce

Scenario: I am starting live audio streaming from android device and playback it from another device, but the playback stalls every time, resulting in a SocketTimeoutException. We have also tried playback with iPhone/iPad, and it was not working on those devices either.

Expected behavior

Audio playback should be work fine at the receiver end.

Version

0.13.6

Smartphone info.

No response

Additional context

No response

Screenshots

No response

Relevant log output

No response

The videoSetting.frameRate setting is not working.

Describe the bug

Hi, I've observed that the videoSetting.frameRate method's configuration is not effective in main branch. Additionally, the default frameRate you have set is 30, but the actual frameRate outputted in your FrameTracker is 60.

To Reproduce

1.Open the sample app.
2.Set videoSetting.frameRate to 30.
3.Monitor the frameRate of the video status in the FrameTracker logs in Logcat.

Expected behavior

1.Open the sample app.
2.Set videoSetting.frameRate to 30.
3.Monitor the frameRate of the video status in the FrameTracker logs in Logcat.

Expected frameRate is 30.

Version

latest main branch

Smartphone info.

No response

Additional context

No response

Screenshots

image
image

Relevant log output

No response

No audio after restarting stream (close & reconnect)

Describe the bug

No audio in the stream after calling connection.close() and then connection.connect(RTMP_URL). Works after restarting Activity (init-ing connection again).

To Reproduce

  1. Create RtmpConnection and RtmpStream with camera and audio source.
  2. User presses button to stop streaming, which calls connection.close().
  3. User resumes streaming, code calls connection.connect(RTMP_URL) (RTMP_URL is a valid rtmp:// URL, audio works on the first connection, but not this second one).

Expected behavior

Audio should continue

Version

0.10.4

Smartphone info.

Android 12 (One UI 4.1)

Additional context

Using nginx RTMP module as backend (and manually viewing recorded files on the server).

Screenshots

No response

Relevant log output

No response

HkSurfaceViewを使うと配信終了処理でクラッシュしてしまいます。

Describe the bug
HkSurfaceView利用時、RtmpConnection.close()を呼んだタイミングで
次の例外が繰り返し発生しクラッシュしてしまいました。

2022-03-11 09:03:56.606 6720-6720/com.haishinkit.studio E/AndroidRuntime:     at com.haishinkit.view.HkSurfaceView.stopRunning(HkSurfaceView.kt:86)
        at com.haishinkit.media.Camera2Source.stopRunning(Camera2Source.kt:176)
        at com.haishinkit.view.HkSurfaceView.stopRunning(HkSurfaceView.kt:86)
        at com.haishinkit.media.Camera2Source.stopRunning(Camera2Source.kt:176)
        at com.haishinkit.view.HkSurfaceView.stopRunning(HkSurfaceView.kt:86)
        ...以下 StackOverflowが発生するまで繰り返し

To Reproduce

  1. サンプルのHaishinStudioを実機で起動します
  2. Publichボタンをクリックします。
  3. Stopボタンをクリックします。

Smartphone

  • Device: Lenovo M10 Tab
  • OS: Android10.0
    --
  • Device: LG Nexus 5X
  • OS: Android8.1

Video Aspect Ratio is not correct

Describe the bug
When streaming using HaishinStudio, the stream has a resolution of 640x360, but the resolution in Camera2Source is 640x480. I looked at the code, and it seems like the resolution variable is never set in Camera2Source, so the stream resolution isn't set either. Even if I manually set the stream resolution to be equal to the source resolution, the video still has the wrong aspect ratio.

I'm testing this with commit 513e551, since the next commit seems to have broken video streaming (only the audio is available in VLC).

To Reproduce
Steps to reproduce the behavior:

  1. Run HaishinStudio
  2. Open the stream in VLC
  3. See wrong aspect ratio

Expected behavior
The video has the correct aspect ratio.

I don't actually understand how/where the "correct" aspect ratio comes from, the variable setting seems a bit circular to me.

Screenshots

(The object in frame is a cube)

On Phone In VLC

Desktop (please complete the following information):

  • OS: macOS 11.6
  • VLC media player 3.0.12.1 Vetinari (revision 3.0.12.1-0-g170157402b)

Smartphone (please complete the following information):

  • Device: Samsung Galaxy A02
  • OS: Android 11

Typo in Jitpack Artifact location in README

Describe the bug

The jitpack artifact location is listed as
com.github.shogo4405:HaishinKit~kt:(...) with a colon (":") separating the group from the module. This should be:
com.github.shogo4405.HaishinKit~kt:(...) -- with a period (".") separating the artifcat group from the module.

In current README:

dependencies {
  implementation 'com.github.shogo4405:HaishinKit~kt:haishinkit:x.x.x'
  implementation 'com.github.shogo4405:HaishinKit~kt:vulkan:x.x.x'
}

To Reproduce

In an Android project, attempt to import the HaishinKit dependency using the location provided:

dependencies {
  implementation 'com.github.shogo4405:HaishinKit~kt:haishinkit:0.11.0'
}

Result: package can't be resolved.

Expected behavior

With a period separating the artifact group from the module, the package resolves:

dependencies {
  implementation 'com.github.shogo4405.HaishinKit~kt:haishinkit:0.11.0'
}

Version

N/A

Smartphone info.

No response

Additional context

No response

Screenshots

No response

Relevant log output

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.