begeekmyfriend / yasea

RTMP live streaming client for Android
MIT License
4.87k stars 1.32k forks source link

你好,请问一下,不推流的时候 ,怎么修改才能录视频?现在要推流才能录视频。 #769

Open Wodner opened 4 years ago

begeekmyfriend commented 4 years ago

SrsEncoder.java里不要往SrsFlvMuxer送编码数据即可

android36524 commented 4 years ago

请问改 SrsEncoder.java 的什么地方,可以实现只录像不推流?

android36524 commented 4 years ago

注释了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);
}
begeekmyfriend commented 4 years ago

你在Mp4Muxer里面加断点调试一下,看看数据有没有flow下来

hexin9456 commented 3 years ago

请问有没有解决呢?只有推流后才可以录像,停止推流也可以点击录像 但是只有1帧!请教一下该怎么修改呢?谢谢

begeekmyfriend commented 3 years ago

有一个local-recording分支,你自己merge一下吧

xxxxxxbin6 commented 2 years ago

老哥,你这个local-recording跑不起来了吧

android36524 commented 2 years ago

这是一封自动回复邮件。已经收到您的来信,我会尽快回复。谢谢。

xxxxxxbin6 commented 2 years ago

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

begeekmyfriend commented 2 years ago

local-recording的gradle版本过低了,你同步一下试一试,可能要改一些SDK API

xxxxxxbin6 commented 2 years ago

没事,我直接把library添加到我的项目里。只是现在出现了so库的问题,回头可以更新一下代码了,好多人在用哈哈哈哈