Video encoding doesn't work in Android 14
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 663
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
encode a video isn't working anymore since Android 14.
```
final MediaTransformer mediaTransformer = new MediaTransformer(getApplicationContext());
TransformationListener transformationListener = new TransformationListener() { ... }
mediaTransformer.transform( ... );
```
In Android 13, all works perfectly fine with the same code, since Android 14 it stops after 1 sec without any error callbacks. The onProgress callback is called 1-2 times.
```
2023-10-21 08:51:59.171 15592-15592 TAG com.myproject.android D LiTr onProgress
2023-10-21 08:52:03.950 15592-15837 BufferPoolAccessor2.0 com.myproject.android D evictor expired: 1, evicted: 0
2023-10-21 08:52:04.951 15592-15837 BufferPoolAccessor2.0 com.myproject.android D bufferpool2 0xb4000070c36c7e38 : 5(40960 size) total buffers - 4(32768 size) used buffers - 28/34 (recycle/alloc) - 6/30 (fetch/transfer)
2023-10-21 08:52:04.951 15592-15837 BufferPoolAccessor2.0 com.myproject.android D bufferpool2 0xb4000070c36d34e8 : 5(20480 size) total buffers - 0(0 size) used buffers - 18/24 (recycle/alloc) - 5/46 (fetch/transfer)
2023-10-21 08:52:04.951 15592-15837 BufferPoolAccessor2.0 com.myproject.android D bufferpool2 0xb4000070c3734b88 : 0(0 size) total buffers - 0(0 size) used buffers - 0/0 (recycle/alloc) - 0/0 (fetch/transfer)
2023-10-21 08:52:04.951 15592-15837 BufferPoolAccessor2.0 com.myproject.android D bufferpool2 0xb4000070c36fa798 : 5(36700160 size) total buffers - 4(29360128 size) used buffers - 18/23 (recycle/alloc) - 9/19 (fetch/transfer)
2023-10-21 08:52:04.951 15592-15837 BufferPoolAccessor2.0 com.myproject.android D evictor expired: 4, evicted: 4
```
Just guessing in the wild, is it the reduced mLock Limit?
Tobias
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure through MediaTransformer.transform and observe the TransformationListener callbacks, especially onProgress and the missing error callback. Compare the same transformation on Android 13 and Android 14 using the provided BufferPoolAccessor2.0 logs; done means video encoding completes or reports a clear failure on Android 14.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100