Open lhf-Alice opened 4 months ago
You have a project developed by other user that maybe help you with that: https://github.com/FunnyDevs/rtmp-rtsp-stream-client-java-recordcontrollers?tab=readme-ov-file Since it is using FFMPEG to record (XugglerReccordController), maybe you can update the implementation to support your required codecs.
Hello,
Currently the library has 2 ways to record files by default: https://github.com/pedroSG94/RootEncoder/blob/master/library/src/main/java/com/pedro/library/util/AndroidMuxerRecordController.java https://github.com/pedroSG94/RootEncoder/blob/master/library/src/main/java/com/pedro/library/util/AacMuxerRecordController.java The first one is based on MediaMuxer class of Android and the second record AAC data directly in a file.
I think that MediaMuxer can't record with g711a codec. You can check it here (scroll a bit and you have a list of supported codecs): https://developer.android.com/reference/android/media/MediaMuxer#addTrack(android.media.MediaFormat) You can create your own muxer to support g711a. You only need create a class that extends from BaseRecordController class and implement your code in that class. After that you need set this class to the library as the new BaseRecordController like this:
This allow you a way to record any codec in any file format with your own implementation