Record camera and push stream to rtmp server.
beautifulsoup / rtmprecoder Goto Github PK
View Code? Open in Web Editor NEW直播安卓主播端解决方案
直播安卓主播端解决方案
Record camera and push stream to rtmp server.
cameraDevice = Camera.open()
in rtmprecorder\RecordActivity.java(#148) suggest modify as
if (cameraDevice != null) {
cameraDevice.release();
cameraDevice = null;
}
cameraDevice = Camera.open();
because Cameras may be occupied by other applications, so it's best to release it
您好,我想把屏幕设成直的,于是把
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
这行砍掉,结果相机的方向就变成反的,我Android 功力不太强,能否麻烦帮忙解惑,感谢万分
Hi,
I am trying to display front camera previews.
Currently, I am facing an issue while doing so as it is not able to access front cameras. It connects to only back camera. Is this possible, please help me width code?
06-15 09:45:57.955 15516-15516/? I/art: Late-enabling -Xcheck:jni
06-15 09:45:58.055 15516-15516/cn.campusapp.rtmprecorder W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
06-15 09:45:58.082 15516-15516/cn.campusapp.rtmprecorder V/BoostFramework: mAcquireFunc method = public int com.qualcomm.qti.Performance.perfLockAcquire(int,int[])
06-15 09:45:58.082 15516-15516/cn.campusapp.rtmprecorder V/BoostFramework: mReleaseFunc method = public int com.qualcomm.qti.Performance.perfLockRelease()
06-15 09:45:58.082 15516-15516/cn.campusapp.rtmprecorder V/BoostFramework: mAcquireTouchFunc method = public int com.qualcomm.qti.Performance.perfLockAcquireTouch(android.view.MotionEvent,android.util.DisplayMetrics,int,int[])
06-15 09:45:58.082 15516-15516/cn.campusapp.rtmprecorder V/BoostFramework: mIOPStart method = public int com.qualcomm.qti.Performance.perfIOPrefetchStart(int,java.lang.String)
06-15 09:45:58.082 15516-15516/cn.campusapp.rtmprecorder V/BoostFramework: mIOPStop method = public int com.qualcomm.qti.Performance.perfIOPrefetchStop()
06-15 09:45:58.085 15516-15516/cn.campusapp.rtmprecorder V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@e2019eb
06-15 09:45:58.085 15516-15516/cn.campusapp.rtmprecorder V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@252d348
06-15 09:45:58.137 15516-15553/cn.campusapp.rtmprecorder D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
06-15 09:45:58.142 15516-15516/cn.campusapp.rtmprecorder D/ActivityThreadInjector: clearCachedDrawables.
06-15 09:45:58.184 15516-15553/cn.campusapp.rtmprecorder I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.BF.1.1.3_RB1.06.00.01.181.013_msm8974_refs/tags/AU_LINUX_ANDROID_LA.BF.1.1.3_RB1.06.00.01.181.013__release_AU (I48a9d37399)
OpenGL ES Shader Compiler Version: E031.29.00.00
Build Date: 11/17/16 Thu
Local Branch:
Remote Branch: refs/tags/AU_LINUX_ANDROID_LA.BF.1.1.3_RB1.06.00.01.181.013
Local Patches: NONE
Reconstruct Branch: NOTHING
06-15 09:45:58.186 15516-15553/cn.campusapp.rtmprecorder I/OpenGLRenderer: Initialized EGL, version 1.4
how stream from mp4 file
Hi, I have a problem with get video data:
FATAL EXCEPTION: main
Process: cn.campusapp.rtmprecorder, PID: 6998
java.nio.BufferOverflowException
at java.nio.Buffer.checkPutBounds(Buffer.java:183)
at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:356)
at java.nio.ByteBuffer.put(ByteBuffer.java:721)
at cn.campusapp.rtmprecorder.RecordActivity$CameraView.onPreviewFrame(RecordActivity.java:496)
at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1223)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5272)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
Error refers to this line:
/* get video data */
if (yuvImage != null && recording) {
((ByteBuffer) yuvImage.image[0].position(0)).put(data);
if (RECORD_LENGTH <= 0) try {
Log.v(LOG_TAG, "Writing Frame");
long t = 1000 * (System.currentTimeMillis() - startTime);
if (t > recorder.getTimestamp()) {
recorder.setTimestamp(t);
}
recorder.record(yuvImage);
} catch (FFmpegFrameRecorder.Exception e) {
Log.v(LOG_TAG, e.getMessage());
e.printStackTrace();
}
}
You can via the link below to access relevant class file
Hi, how to set initialize full screen with correct ratio and best resolution in any device and camera?
点进项目看了下,发现不全,如果可以的话可以提交下吗,想看看完整的demo 谢啦
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.