-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support more than 2 audio channels #75
Comments
I think so, many components expect audio to be either 1 or 2 channels. |
But when i try to compress some videos, it gets failed. What to do? |
Can you upload the file? |
The vidoe link is "https://www.sample-videos.com/video321/mp4/720/big_buck_bunny_720p_30mb.mp4" |
Just released v0.11.2 with a fix. v0.11.2 allows videos with more than 2 channels, as you don't try to change the number of channels to something else (we still don't support downmix and upmix for 3+ channels). Note, the fix does not work on on API23 emulator, I'm not sure whether it's emulator only or on real devices too. API24 and newer work well. |
@natario1 V/MediaMetadataRetriever( 7605): extractMetadata(9) |
These logs are normal |
I am uploading video after compression. |
There's a test that transcodes this file successfully. What parameters are you using? |
I am using default params mostly.
|
Maybe something is missing there. I'm using this code and it works (even without ClipDataSource): val dataSource = input("bbb_720p_30mb.mp4")
val videoTrackStrategy = DefaultVideoStrategy.Builder()
.keyFrameInterval(3f)
.bitRate(1280 * 720 * 4.toLong())
.frameRate(30)
.build()
val audioTrackStrategy = DefaultAudioStrategy.builder()
.channels(DefaultAudioStrategy.CHANNELS_AS_INPUT)
.sampleRate(DefaultAudioStrategy.SAMPLE_RATE_AS_INPUT)
.build()
addDataSource(ClipDataSource(dataSource, 0, 5_000_000))
setAudioTrackStrategy(audioTrackStrategy)
setVideoTrackStrategy(videoTrackStrategy) |
Transcoder throws
UnsupportedOperationException
, when I'm trying to transcode video with 6 audio channels. Is it a real engine limitation?The text was updated successfully, but these errors were encountered: