question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trimming video in some devices faces fdsan errors

See original GitHub issue

Trimming video is succeed, but after a while the app become stuck.The log reports a lot of fdsan and file descriptor errors.

Here is the code: TransformationOptions transformationOptions = new TransformationOptions.Builder() .setGranularity(MediaTransformer.GRANULARITY_DEFAULT) .setSourceMediaRange(mediaRange) .build(); mMediaTransformer.transform(lastRequestId, Uri.parse(videoPathInput), videoPlayUrl,getVideoFormat(), null,listener,transformationOptions);

Here is the log: E/fdsan: failed to exchange ownership of file descriptor: fd 146 is owned by FILE* 0x76a2c1d970, was expected to be unowned E/fdsan: attempted to close file descriptor 133, expected to be unowned, actually owned by FILE* 0x76a2c1d710 E/fdsan: attempted to close file descriptor 146, expected to be owned by unique_fd 0x76a83e16dc, actually owned by FILE* 0x76a2c1d970.

Thanks.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
izzytwoshedscommented, Mar 25, 2022

@RishabJaiswal I think you are right, this looks like something that could be caused by scoped storage. @tianshangaimi12 there is an incoming PR that adds support for target Uri instead of a target file path, it should help with scoped storage issues. Alternatively, you can also use transform(List<TrackTransform>) API and use a MediaMuxerTarget constructor that accepts a Uri

0reactions
izzytwoshedscommented, Aug 10, 2022

That is great! I will close the issue for now. Let me know if you see any other problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Sorry this video file can not be trimmed error in Android
This trick is also works on following android mobile devices are ... Using this app you can trim any format videos like that...
Read more >
iOS 13 trimming videos problem
I'd prefer in ios 12 when you trimmed your video, you could just make a new copy. This new trimming system, you cant...
Read more >
once trimmed, video cannot be saved
MP4 video files that I save to the desktop can be played using different apps. But when I trim this video file using...
Read more >
Edit your videos - Android - Google Photos Help
Download and install the Google Photos app. Some video editing features like crop, straighten, and filters are only available on Android devices with...
Read more >
ios video after trimming then play on non ios device audio ...
trimming video,then I send the video trimmed to android device and play,I find audio/video out of sync, the audio is several seconds behind ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found