Open Wodner opened 4 years ago
请问改 SrsEncoder.java 的什么地方,可以实现只录像不推流?
注释了flvMuxer添加数据的,录像还是不行
// when got encoded h264 es stream.
private void onEncodedAnnexbFrame(ByteBuffer es, MediaCodec.BufferInfo bi) {
mp4Muxer.writeSampleData(videoMp4Track, es.duplicate(), bi);
//flvMuxer.writeSampleData(videoFlvTrack, es, bi);
}
// when got encoded aac raw stream.
private void onEncodedAacFrame(ByteBuffer es, MediaCodec.BufferInfo bi) {
mp4Muxer.writeSampleData(audioMp4Track, es.duplicate(), bi);
//flvMuxer.writeSampleData(audioFlvTrack, es, bi);
}
你在Mp4Muxer
里面加断点调试一下,看看数据有没有flow下来
请问有没有解决呢?只有推流后才可以录像,停止推流也可以点击录像 但是只有1帧!请教一下该怎么修改呢?谢谢
有一个local-recording分支,你自己merge一下吧
老哥,你这个local-recording跑不起来了吧
这是一封自动回复邮件。已经收到您的来信,我会尽快回复。谢谢。
Error while executing process /home/xubin/Android/Sdk/ndk/21.4.7075529/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/xubin/AndroidStudioProjects/ContinueRecord/library/src/main/cpp/Android.mk NDK_APPLICATION_MK=/home/xubin/AndroidStudioProjects/ContinueRecord/library/src/main/cpp/Application.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=/home/xubin/AndroidStudioProjects/ContinueRecord/library/build/intermediates/cxx/Debug/253d4o4e/obj NDK_LIBS_OUT=/home/xubin/AndroidStudioProjects/ContinueRecord/library/build/intermediates/cxx/Debug/253d4o4e/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
Android NDK: ERROR:/home/xubin/AndroidStudioProjects/ContinueRecord/library/src/main/cpp/libx264/Android.mk:x264: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /home/xubin/AndroidStudioProjects/ContinueRecord/library/src/main/cpp/libx264/libs/arm64-v8a/libx264.a exists or that its path is correct
local-recording
的gradle版本过低了,你同步一下试一试,可能要改一些SDK API
没事,我直接把library添加到我的项目里。只是现在出现了so库的问题,回头可以更新一下代码了,好多人在用哈哈哈哈
SrsEncoder.java
里不要往SrsFlvMuxer
送编码数据即可