Comments (3)
Hello,
Currently you can use software encoders with MediaCodec class. The library is configured to use hardware encoder if possible but you can force software encoders like this:
genericStream.forceCodecType(CodecUtil.CodecType.SOFTWARE, CodecUtil.CodecType.FIRST_COMPATIBLE_FOUND)
For now, I only have plan to add support to codecs availables in MediaCodec class
from rootencoder.
Valid encoder not found
log
2024-05-11 11:48:26.029 8798-8798 VideoCapabilities com.pedro.streamer W Unrecognized profile/level 1/32 for video/mp4v-es
2024-05-11 11:48:26.030 8798-8798 VideoCapabilities com.pedro.streamer W Unrecognized profile/level 32768/2 for video/mp4v-es
2024-05-11 11:48:26.030 8798-8798 VideoCapabilities com.pedro.streamer W Unrecognized profile/level 32768/64 for video/mp4v-es
2024-05-11 11:48:26.045 8798-8798 VideoCapabilities com.pedro.streamer W Unsupported mime video/x-ms-wmv
2024-05-11 11:48:26.048 8798-8823 BufferQueueProducer com.pedro.streamer I SurfaceTexture-1-8798-0 queueBuffer: slot 2 is dropped, handle=0x7baf2b8c00
2024-05-11 11:48:26.050 8798-8798 VideoCapabilities com.pedro.streamer W Unsupported mime video/xvid
2024-05-11 11:48:26.065 8798-8798 VideoCapabilities com.pedro.streamer W Unrecognized profile/level 1/32 for video/mp4v-es
2024-05-11 11:48:26.082 8798-8823 BufferQueueProducer com.pedro.streamer I SurfaceTexture-1-8798-0 queueBuffer: slot 3 is dropped, handle=0x7baf2b8d80
2024-05-11 11:48:26.114 8798-8823 BufferQueueProducer com.pedro.streamer I SurfaceTexture-1-8798-0 queueBuffer: slot 7 is dropped, handle=0x7baa713d00
2024-05-11 11:48:26.136 8798-8798 AudioEncoder com.pedro.streamer I 2 encoders found
2024-05-11 11:48:26.136 8798-8798 AudioEncoder com.pedro.streamer I Encoder selected c2.android.aac.encoder
2024-05-11 11:48:26.149 8798-8823 BufferQueueProducer com.pedro.streamer I SurfaceTexture-1-8798-0 queueBuffer: slot 5 is dropped, handle=0x7b4da356c0
2024-05-11 11:48:26.176 8798-9077 CCodec com.pedro.streamer D allocate(c2.android.aac.encoder)
2024-05-11 11:48:26.180 8798-9077 Codec2Client com.pedro.streamer I Available Codec2 services: "software"
2024-05-11 11:48:26.180 8798-9077 Codec2Client com.pedro.streamer I Creating a Codec2 client to service "software"
2024-05-11 11:48:26.182 8798-9077 Codec2Client com.pedro.streamer I Client to Codec2 service "software" created
2024-05-11 11:48:26.183 8798-8823 BufferQueueProducer com.pedro.streamer I SurfaceTexture-1-8798-0 queueBuffer: slot 6 is dropped, handle=0x7b4da35840
2024-05-11 11:48:26.188 8798-9077 CCodec com.pedro.streamer I Created component [c2.android.aac.encoder]
2024-05-11 11:48:26.189 8798-9077 CCodecConfig com.pedro.streamer D read media type: audio/mp4a-latm
2024-05-11 11:48:26.192 8798-9077 ReflectedParamUpdater com.pedro.streamer D extent() != 1 for single value type: algo.buffers.max-count.values
2024-05-11 11:48:26.193 8798-9077 ReflectedParamUpdater com.pedro.streamer D extent() != 1 for single value type: output.subscribed-indices.values
2024-05-11 11:48:26.193 8798-9077 ReflectedParamUpdater com.pedro.streamer D extent() != 1 for single value type: input.buffers.allocator-ids.values
2024-05-11 11:48:26.193 8798-9077 ReflectedParamUpdater com.pedro.streamer D extent() != 1 for single value type: output.buffers.allocator-ids.values
2024-05-11 11:48:26.193 8798-9077 ReflectedParamUpdater com.pedro.streamer D extent() != 1 for single value type: algo.buffers.allocator-ids.values
2024-05-11 11:48:26.194 8798-9077 ReflectedParamUpdater com.pedro.streamer D extent() != 1 for single value type: output.buffers.pool-ids.values
2024-05-11 11:48:26.194 8798-9077 ReflectedParamUpdater com.pedro.streamer D extent() != 1 for single value type: algo.buffers.pool-ids.values
2024-05-11 11:48:26.199 8798-9077 CCodecConfig com.pedro.streamer I query failed after returning 9 values (BAD_INDEX)
2024-05-11 11:48:26.199 8798-9077 CCodecConfig com.pedro.streamer D c2 config is Dict {
c2::u32 coded.bitrate.value = 64000
c2::u32 coded.pl.level = 0
c2::u32 coded.pl.profile = 8192
c2::u32 coding.aac-sbr-mode.value = 3
c2::u32 input.buffers.max-size.value = 2048
c2::u32 input.delay.value = 0
string input.media-type.value = "audio/raw"
string output.media-type.value = "audio/mp4a-latm"
c2::u32 raw.channel-count.value = 1
c2::u32 raw.sample-rate.value = 44100
}
2024-05-11 11:48:26.203 8798-9077 MediaCodec com.pedro.streamer I MediaCodec will operate in async mode
2024-05-11 11:48:26.203 8798-9077 CCodecConfig com.pedro.streamer D no c2 equivalents for aac-profile
2024-05-11 11:48:26.203 8798-9077 CCodecConfig com.pedro.streamer D no c2 equivalents for encoder
2024-05-11 11:48:26.205 8798-9077 CCodecConfig com.pedro.streamer D c2 config is Dict {
c2::u32 coded.bitrate.value = 65536
c2::u32 coded.pl.level = 0
c2::u32 coded.pl.profile = 8192
c2::u32 coding.aac-sbr-mode.value = 3
c2::u32 input.buffers.max-size.value = 4096
c2::u32 input.delay.value = 0
string input.media-type.value = "audio/raw"
string output.media-type.value = "audio/mp4a-latm"
c2::u32 raw.channel-count.value = 2
c2::u32 raw.sample-rate.value = 32000
}
2024-05-11 11:48:26.206 8798-9077 Codec2Client com.pedro.streamer W query -- param skipped: index = 1107298332.
2024-05-11 11:48:26.206 8798-9077 CCodec com.pedro.streamer D setup formats input: AMessage(what = 0x00000000) = {
int32_t channel-count = 2
int32_t max-input-size = 5120
string mime = "audio/raw"
int32_t sample-rate = 32000
} and output: AMessage(what = 0x00000000) = {
int32_t bitrate = 65536
int32_t channel-count = 2
int32_t level = 0
int32_t max-bitrate = 65536
string mime = "audio/mp4a-latm"
int32_t profile = 2
int32_t sample-rate = 32000
}
2024-05-11 11:48:26.207 8798-8798 AudioEncoder com.pedro.streamer I prepared
2024-05-11 11:48:26.211 8798-8798 VideoEncoder com.pedro.streamer I 0 encoders found
2024-05-11 11:48:26.211 8798-8798 VideoEncoder com.pedro.streamer E Valid encoder not found
2024-05-11 11:48:26.216 8798-8823 BufferQueueProducer com.pedro.streamer I SurfaceTexture-1-8798-0 queueBuffer: slot 0 is dropped, handle=0x7baf2b80c0
2024-05-11 11:48:26.243 8798-8798 ViewRootImpl[Toast] com.pedro.streamer D hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
2024-05-11 11:48:26.252 8798-8798 InputTransport com.pedro.streamer I Create ARC handle: 0x7b553ff180
2024-05-11 11:48:26.286 8798-8798 GraphicExt com.pedro.streamer E GraphicExtModuleLoader::CreateGraphicExtInstance false
from rootencoder.
Hello,
In that case you haven't software video encoder in your device. You will have to use hardware encoder.
I'm not sure which device you are using because normally Android always provide software encoders.
from rootencoder.
Related Issues (20)
- Recorded Video Changing the video quality bitrate HOT 3
- Is there any code sample to use it with android audio recording and broadcast to RTSP server HOT 1
- RuntimeException when stopStream HOT 7
- standalone local android (rtsp server) HOT 2
- how to record mp4 files in audio format g711a HOT 2
- java.lang.IllegalArgumentException: Unknown message type byte: 1D HOT 2
- retry server1 HOT 9
- Retry Error configure stream, setup video 451 HOT 1
- Repeatedly Creating RtspServerStream and Encountering 'Create VideoEncoder failed' Issue HOT 1
- When I recording a video, how can I record a new video with a custom rect in camera frame HOT 4
- screen destory HOT 1
- Hello I'm using OpenGlView and want to set the Hue of the camera how to write. HOT 1
- App crashing while migrating to Android 14 from Android 13 HOT 10
- Recording video with multiple part, screen stuck HOT 7
- How to keep streaming when rotating device HOT 6
- RTMP Authentication not working HOT 3
- Switching between Rtmp stream audio and video HOT 7
- How to play multiple files with RtspServerFromFile HOT 6
- Echo Problem HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rootencoder.