Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with NodeCameraView #2

Open
safee-cases opened this issue Mar 6, 2024 · 5 comments
Open

Issue with NodeCameraView #2

safee-cases opened this issue Mar 6, 2024 · 5 comments

Comments

@safee-cases
Copy link

safee-cases commented Mar 6, 2024

Hey ! After upgrading the "react-native-nodemediaclient" I got some issue on one of my screen causing crash on my app.

I was previously working with version "^0.2.20" before upgrade to "^0.3.2".

here's the code I used which is not working anymore on new version:

const { NodeCameraView } = require('react-native-nodemediaclient');

<VideoWrapper
     width={SCREEN_WIDTH - 40}
     height={SCREEN_WIDTH - 40}
     title={authStore.me?.fullname || ''}>
          <NodeCameraView
            style={styles.cameraBack}
            ref={cameraViewRef}
            outputUrl={url + streamKey}
            camera={config.cameraConfig}
            audio={config.audioConfig}
            video={config.videoConfig}
            autopreview
            audioEnable={store.isMuted}/>
 </VideoWrapper>

Do you know how I can fix this error with the new version of the package ? Thank you for your response !

@Arjit0762
Copy link

NodeCameraView is not present in 0.3 version.
https://github.com/NodeMedia/iShow

You can visit this link to see how to proceed

@safee-cases
Copy link
Author

Thank you for your response!
Thanks to documentation I found I need to use 'NodePublisher' but it breaks the logic with Mux, my app doesn't crash anymore when streaming but my stream doesn't upload anymore to Mux when I end it

@safee-cases
Copy link
Author

Thank you for your response! Thanks to documentation I found I need to use 'NodePublisher' but it breaks the logic with Mux, my app doesn't crash anymore when streaming but my stream doesn't upload anymore to Mux when I end it

I used this guide to handle livestream on my app (which used deprecated version of your package https://www.mux.com/blog/live-streaming-with-react-native

@Arjit222830
Copy link

Arjit222830 commented Mar 7, 2024

I don't know about mux. I can tell you how I did it.

I used google-livestream api in backend. Created a channel which provided me a rtmp server and used google bucket to store m3u8 file. I passed that m3u8 to NodePublisher, hence I was able to stream video

@rizalafaandi
Copy link

rizalafaandi commented Mar 17, 2024

hi, I have tried on react-native-nodemediaclient version 0.3.3 here

<NodePublisher ref={np} style={{flex: 1}} url={url} audioParam={{ codecid: NodePublisher.NMC_CODEC_ID_AAC, profile: NodePublisher.NMC_PROFILE_AUTO, samplerate: 48000, channels: 1, bitrate: 64 * 1000, }} videoParam={{ codecid: NodePublisher.NMC_CODEC_ID_H264, profile: NodePublisher.NMC_PROFILE_AUTO, width: 720, height: 1280, fps: 30, bitrate: 2000 * 1000, }} frontCamera={frontCamera} HWAccelEnable={true} denoiseEnable={true} torchEnable={torchEnable} keyFrameInterval={2} volume={mute ? 0.0 : 1.0} videoOrientation={ NodePublisher.VIDEO_ORIENTATION_PORTRAIT }/>

but when I look at the log in the nodemediaserver "handle video" section, I see the video dimensions are 0x0 so when I play the video in VLC the result is only sound.

[rtmp publish] Handle video. id=CRO7UOB1 streamPath=/live/genta-F2WKcWWJ frame_type=1 codec_id=7 codec_name=H264 0x0

Meanwhile, if I comment HWAccelEnable it will be read.

[rtmp publish] Handle video. id=UJUN7E6K streamPath=/live/genta-F2WKcWWJ frame_type=1 codec_id=7 codec_name=H264 720x1280

but there is a new problem, I can't play it on Android with hls extenston with error message:

{"errorException": "com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(0, null, null, video/avc, avc1.7A001F, -1, null, [720, 1280, -1.0], [-1, -1]), format_supported=NO_EXCEEDS_CAPABILITIES", "errorString": "ExoPlaybackException type : 1"}

what do you think is wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants