arvinwli / androidmultimedia Goto Github PK
View Code? Open in Web Editor NEWStreaming media study example
Home Page: https://www.jianshu.com/nb/17697147
Streaming media study example
Home Page: https://www.jianshu.com/nb/17697147
您好,我本地视频帧率是15fps用您的工具推流的时候,总会推的过快导致启动睡眠逻辑。请问在哪里可以控制理论推流速率啊是控制基流帧速率么?在哪里可以控制呢?
Build command failed.
Error while executing process /Users/gq/Library/Android/sdk/cmake/3.10.2.4988404/bin/ninja with arguments {-C /Users/gq/ASProjects/nfcutils/androidmultimedia/.cxx/cmake/debug/arm64-v8a ffmpeg-handle}
ninja: Entering directory `/Users/gq/ASProjects/nfcutils/androidmultimedia/.cxx/cmake/debug/arm64-v8a'
ninja: error: '../../../../src/main/jniLibs/arm64-v8a/libavcodec-57.so', needed by '../../../../build/intermediates/cmake/debug/obj/arm64-v8a/libffmpeg-handle.so', missing and no known rule to make it
12秒的MP3转AAC格式,变成10秒了。丢帧了。请问如何处理。目前猜测是两个线程问题,如何把两个线程合成一个线程?
int ret = RtmpHandle.getInstance().connect("rtmp://192.168.100.200:1935/myapp/room135");
LogUtils.w("打开RTMP连接: " + ret); 通过我本地推流 推不上去 日志会出现上面的内容。 这个地址是没问题的
E/AndroidRuntime: FATAL EXCEPTION: main Process: com.wangheart.rtmpfile, PID: 19586 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wangheart.rtmpfile/com.wangheart.rtmpfile.CameraMediaCodecRtmpActivity}: android.media.MediaCodec$CodecException: Error 0x80001001 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2315) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2375) at android.app.ActivityThread.access$900(ActivityThread.java:147) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) 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:910) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:705) Caused by: android.media.MediaCodec$CodecException: Error 0x80001001 at android.media.MediaCodec.native_configure(Native Method) at android.media.MediaCodec.configure(MediaCodec.java:577) at com.wangheart.rtmpfile.CameraMediaCodecRtmpActivity.initMediaCodec(CameraMediaCodecRtmpActivity.java:126) at com.wangheart.rtmpfile.CameraMediaCodecRtmpActivity.init(CameraMediaCodecRtmpActivity.java:78) at com.wangheart.rtmpfile.CameraMediaCodecRtmpActivity.onCreate(CameraMediaCodecRtmpActivity.java:70) at android.app.Activity.performCreate(Activity.java:5993) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
126 : mMediaCodec.configure(mediaFormat, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);
测试机型:小米2s
安卓版本:5.0.2
代码无法修改
这里我自己写个Issue,每个设备的摄像头参数可能都不同,可能有朋友在自己设备上运行打开摄像头后直接crash。
Caused by: java.lang.RuntimeException: setParameters failed at android.hardware.Camera.native_setParameters(Native Method) at android.hardware.Camera.setParameters(Camera.java:1878)
而我的源码参数直接写死了,所以大家在调用
params.setPictureFormat(ImageFormat.YV12);
params.setPreviewFormat(ImageFormat.YV12);
params.setPictureSize(WIDTH, HEIGHT);
params.setPreviewSize(WIDTH, HEIGHT);
这些方法时一定要注意,可能你的设备不支持YV12,也可能不支持NV21等等。所以根据自己的情况来设置,或者动态判断。
rtmpfile/src/main/cpp/ffmpeg_handle.cpp 450行申请的内存没有释放,还望修正
av_free(buffers);
Caused by: android.media.MediaCodec$CodecException: Error 0x80001001
请问我下载v1.5这个工程,运行工程的时候开始cmake,编译的时候提升不支持armeabi,然后我改成了armeabi-v7a,再编译的时候报错
Build command failed.
Error while executing process D:\Android\sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {--build E:\githubproject\AndroidMultiMedia-1.5\rtmpfile.externalNativeBuild\cmake\debug\armeabi-v7a --target ffmpeg-handle}
ninja: error: '../../../../src/main/jniLibs/armeabi-v7a/libavcodec-57.so', needed by '../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/libffmpeg-handle.so', missing and no known rule to make it
请问这是什么原因呢?
windows下运行这个工程,很多错误
AudioRecordMediaCodecActivity.java 里面用的同步队列,如果消费者消费太慢,导致队列满了,生产者阻塞,这样录音线程岂不是有可能--->有一部分声音是没录到的?
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.wangheart.rtmpfile-iTNYOpjFzFBuYHVFP6MM9g==/base.apk"],nativeLibraryDirectories=[/data/app/com.wangheart.rtmpfile-iTNYOpjFzFBuYHVFP6MM9g==/lib/arm64, /system/lib64, /product/lib64]]] couldn't find "libavutil-55.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
at java.lang.System.loadLibrary(System.java:1672)
at com.wangheart.rtmpfile.ffmpeg.FFmpegHandle.(FFmpegHandle.java:24)
at com.wangheart.rtmpfile.ffmpeg.FFmpegHandle.getInstance(Unknown Source:0)
at com.wangheart.rtmpfile.MainActivity.initData(MainActivity.java:46)
at com.wangheart.rtmpfile.MainActivity.onCreate(MainActivity.java:25)
你这个demo是推 RTMP格式的,那推mpeg 格式的也差不多吧
我要用:https://github.com/phoboslab/jsmpeg ,来处理播放的问题
希望不用推流服务器,P2P的从一个手机推流RTMP到另外的手机的VLC上面播放,这个可以实现吗?
要是可以, 给任何线索都可以,谢谢。
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.