react-native-nodemediaclient icon indicating copy to clipboard operation
react-native-nodemediaclient copied to clipboard

Documentation for video property

Open nicoladj77 opened this issue 4 years ago • 3 comments

Hi, is there any documentation on what the video property parameters do? Some are obvious, but what about preset and profile?


			<NodeCameraView
				style={{ width: WIDTH, height: HEIGHT }}
				ref={(vb) => {
					setVbRef(vb);
				}}
				outputUrl={rtmpUrl}
				camera={{ cameraId: 0, cameraFrontMirror: false }}
				audio={{ bitrate: 32000, profile: 1, samplerate: 44100 }}
				video={{
					preset: 12,
					bitrate: 400000,
					profile: 1,
					fps: 30,
					videoFrontMirror: false,
				}}
				autopreview
			/>

nicoladj77 avatar Sep 22 '20 23:09 nicoladj77

Totally agree. Anyway i just found out while playing with NodeCameraView that preset is kind of aspect ratio. For Example: If preset=12 you will see not the full size video on client side.

rehamkhawaja avatar Sep 28 '20 14:09 rehamkhawaja

Totally agree. Anyway i just found out while playing with NodeCameraView that preset is kind of aspect ratio. For Example: If preset=12 you will see not the full size video on client side.

what preset do you use for a 16:9 video?Does it also transmits 9:16 signal?

nicoladj77 avatar Sep 30 '20 18:09 nicoladj77

So I found out what are those presets, from here https://github.com/NodeMedia/NodeMediaClient-Android/blob/master/nodemediaclient/src/main/java/cn/nodemedia/NodePublisher.java

public static final int VIDEO_PPRESET_16X9_270 = 0;
public static final int VIDEO_PPRESET_16X9_360 = 1;
public static final int VIDEO_PPRESET_16X9_480 = 2;
public static final int VIDEO_PPRESET_16X9_540 = 3;
public static final int VIDEO_PPRESET_16X9_720 = 4;
public static final int VIDEO_PPRESET_16X9_1080 = 5;

public static final int VIDEO_PPRESET_4X3_270 = 10;
public static final int VIDEO_PPRESET_4X3_360 = 11;
public static final int VIDEO_PPRESET_4X3_480 = 12;
public static final int VIDEO_PPRESET_4X3_540 = 13;
public static final int VIDEO_PPRESET_4X3_720 = 14;
public static final int VIDEO_PPRESET_4X3_1080 = 15;

public static final int VIDEO_PPRESET_1X1_270 = 20;
public static final int VIDEO_PPRESET_1X1_360 = 21;
public static final int VIDEO_PPRESET_1X1_480 = 22;
public static final int VIDEO_PPRESET_1X1_540 = 23;
public static final int VIDEO_PPRESET_1X1_720 = 24;
public static final int VIDEO_PPRESET_1X1_1080 = 25;

public static final int AUDIO_PROFILE_LCAAC = 0;
public static final int AUDIO_PROFILE_HEAAC = 1;

public static final int VIDEO_PROFILE_BASELINE = 0;
public static final int VIDEO_PROFILE_MAIN = 1;
public static final int VIDEO_PROFILE_HIGH = 2;

public static final int CAMERA_BACK = 0;
public static final int CAMERA_FRONT = 1;

public static final int NM_PIXEL_BGRA = 1;
public static final int NM_PIXEL_RGBA = 2;

public static final int NM_LOGLEVEL_ERROR = 0;
public static final int NM_LOGLEVEL_INFO = 1;
public static final int NM_LOGLEVEL_DEBUG = 2;

nicoladj77 avatar Sep 30 '20 22:09 nicoladj77