Git Product home page Git Product logo

Comments (5)

ThibaultBee avatar ThibaultBee commented on July 20, 2024

Hi,
All Android devices have H.264 encoders as specified here: https://developer.android.com/guide/topics/media/media-formats#video-formats
As you can see VP8 and VP9 encoders are not mandatory.
By the way, if you are looking to use VP8 or VP9 over RTMP, there aren't any official specification. Not sure about MPEG-TS (SRT container).

Anyway, I can add support for these encoders but as H.264 encoder are mandatory, I don't see the point.

from streampack.

rranjan14 avatar rranjan14 commented on July 20, 2024

Take these for e.g., Redmi K50i 5g, Xiaomi Mi 11 Ultra. When you'll check available codecs, you won't find H.264.

H.264 is only supported on Android devices with hardware support. VP8 is supported by all android devices.
Many low-end android devices don't have that hardware support for H.264.

It'll really be great if you add support for vp8 and vp9 as well.

from streampack.

ThibaultBee avatar ThibaultBee commented on July 20, 2024

Have you try to found H.264 in these devices? Do you have the Redmi K50i and the Xiami Mi 11 Ultra? In that case, could you dump the video encoders list (screenshot, API, or xml)?

As I said, h.264 encoder are in every Android device, that's the Android specifications.

from streampack.

rranjan14 avatar rranjan14 commented on July 20, 2024

Unfortunately, I do not own these devices. But I can attach a few screenshots taken from DeviceSpecifications

Redmi K50i 5g:
ScreenShot 2022-12-26 at 13 50 55

Xiaomi Mi 11 Ultra:
ScreenShot 2022-12-26 at 13 51 48

Pixel 6(this has H.264, attaching just to point out the difference):
ScreenShot 2022-12-26 at 14 12 18

Also, attaching crash logs for Redmi K50i 5g:

Caused by java.security.InvalidParameterException: Failed to create codec for: {mime=video/avc, width=720, height=1280}
       at io.github.thibaultbee.streampack.internal.encoders.MediaCodecEncoder.createCodec(MediaCodecEncoder.kt:185)
       at io.github.thibaultbee.streampack.internal.encoders.VideoMediaCodecEncoder.createVideoCodec(VideoMediaCodecEncoder.kt:81)
       at io.github.thibaultbee.streampack.internal.encoders.VideoMediaCodecEncoder.configure(VideoMediaCodecEncoder.kt:59)
       at io.github.thibaultbee.streampack.streamers.bases.BaseStreamer.resetVideo(BaseStreamer.kt:364)
       at io.github.thibaultbee.streampack.streamers.bases.BaseStreamer.stopStream(BaseStreamer.kt:321)
       at io.github.thibaultbee.streampack.streamers.bases.BaseCameraStreamer.stopPreview(BaseCameraStreamer.kt:126)
       at io.github.thibaultbee.streampack.streamers.bases.BaseCameraStreamer.release(BaseCameraStreamer.kt:134)
       at io.github.thibaultbee.streampack.streamers.bases.BaseStreamer.configure(BaseStreamer.kt:243)
       at video.api.livestream.ApiVideoLiveStream.setVideoConfig(ApiVideoLiveStream.kt:86)
       at video.api.reactnative.livestream.ReactNativeLiveStreamView.setVideoConfig(ReactNativeLiveStreamView.kt:59)
       at video.api.reactnative.livestream.ReactNativeLiveStreamViewManager.setVideoConfig(ReactNativeLiveStreamViewManager.kt:62)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:93)
       at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:136)
       at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:56)
       at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:86)
       at com.facebook.react.uimanager.ViewManager.createViewInstance(ViewManager.java:188)
       at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:115)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:281)
       at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:194)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1110)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1081)
       at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:29)
       at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:175)
       at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:85)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1166)
       at android.view.Choreographer.doCallbacks(Choreographer.java:920)
       at android.view.Choreographer.doFrame(Choreographer.java:830)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1150)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loopOnce(Looper.java:210)
       at android.os.Looper.loop(Looper.java:299)
       at android.app.ActivityThread.main(ActivityThread.java:8290)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:577)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073)

from streampack.

ThibaultBee avatar ThibaultBee commented on July 20, 2024

As there isn't any video encoder in the list, I guess that DeviceSpecifications is not reliatable in term of video encoders.
For your crash, we already discuss it there: apivideo/api.video-reactnative-live-stream#50.

This issue apivideo/api.video-reactnative-live-stream#39 has already been fixed in StreamPack. You will have to wait for its integration in the api.video RN live stream.

from streampack.

Related Issues (20)

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.