react-native-vision-camera to ffmpeg input device - react-native

I am trying to build an streaming app using react-native.
I am using android_camera as input device on ffmpeg.
My question is it possible to use camera package (e.g rn-vision-camera) and use it as device input/format?

Related

React native m3u radio player

I am trying to make a radio streaming app using react native but it doesn't work.
I tried expo-av with Expo CLI, and react-native-radio-player, react-native-video from react native CLI
all of them work well with mp3 and mp4 extensions but don't work with m3u extension..
RadioPlayer.radioURL('https://radio.therockeg.com/clv_64.m3u');
I use https://icecast.org/ for the radio streaming, any help?
m3u is just a text format with a list of sources inside, you can read this data on your app side, extract sources and play it with any player you prefer.

Live Broadcasting React-Native Sdk not found

I am developing app on react native for video calling and live broadcasting. I have found react-native sdk for video calling but unfortunately i did not find any react-native sdk for live broadcasting. Is there any react-native sdk for live broadcasting of Agora? If any one can help me regarding this, i would be very thankful.
You can perform live broadcasting by using the video calling SDK itself.
You can set the role of a user as "broadcaster" or "audience" using the setClientRole method.
e.g RTCEngine.setClientRole(0); (audience: 0, host: 1)
https://agora-rn-uikit.netlify.com/docs/api/classes/_rtcengine_native_.rtcengine#static-setclientrole

Force encoding method in expo camera

I am using react native and expo camera to build an app that can upload videos to my website. Everything works fine on Android but on newer iPhones it uploads a blank video that still has audio. I think this is because of the new iOS encoding method HEVC rather than the typical H264. Is there any way to force expo camera to encode in H264?

Is there any libraries or way to convert video (mp4, mov) to gif in React Native for both Android and iOS?

I'm implementing the feature of video recording in React Native, and want to have the features of convert the video that recorded to GIF before send to server. Is there any libraries or ways to convert the video such as mp4, mov to gif in React Native for both Android and iOS?
Instal library
npm install react-native-video-to-gif --save
Using lib
import RNGif from 'react-native-video-to-gif';
Try FFMPEG
FFMPEG is known for all kinds of video manipulations. Including converting video to gif. And the package below is React-Native compatible, available on both iOS and Android.
https://www.npmjs.com/package/react-native-ffmpeg

How to get the current running camera instance and give a particular file as input in IOS Real Device?

The problem
Can I get the current running camera instance and and give a particular file as input in IOS Real Device
Is this possible with appium ?
Please Advise
More Details:
I am trying to feed my camera an image during runtime. So basically my application has a feature: search a product by scanning a barcode, Since I am trying to automate this, I want to provide an image with barcode and have camera take that image while scanning.
Environment
Appium version: 1.3.2
Desktop OS/version used to run Appium: MAC OS High Sierra (10.13.4)
Mobile platform/version under test: iPhone 8 Plus, OS 11.3
Real device or emulator/simulator: REAL DEVICE
Please Advise
Appium is a black-box testing framework, so it cannot set image for your app directly in the runtime.
However, Appium exposes push_file functionality that places a file onto the device in a particular place.
For iOS it works only on Simulators (running Xcode SDK 8.1+)
driver.pushFile(
"/path/to/device/image.jpg",
new File("/Users/dev/files/image.jpg")
);
If your app supports image selection from gallery, you can push file and then select it in the gallery.
In case it doesn't work, you may look into writing tests directly using XCTest/XCUITest framework