This repository has been archived by the owner on Sep 29, 2022. It is now read-only.
forked from arthenica/ffmpeg-kit
-
Notifications
You must be signed in to change notification settings - Fork 9
Storage Access Framework
Taner Sener edited this page Sep 27, 2022
·
1 revision
If you want to use a file selected using Storage Access Framework (SAF)
with FFmpegKit
, you can use the following methods to convert a Uri
to a file path defined with FFmpegKit
's saf:
protocol. That path can be safely used as input or output in FFmpegKit
and FFprobeKit
commands.
Uri uri = intent.getData();
String inputPath = FFmpegKitConfig.getSafParameterForRead(requireContext(), uri);
FFmpegKit.execute("-i " + inputPath + " ... output.mp4");
Uri uri = intent.getData();
String outputPath = FFmpegKitConfig.getSafParameterForWrite(requireContext(), uri);
FFmpegKit.execute("-i input.mp4 ... " + outputPath);
Uri uri = intent.getData();
String path = FFmpegKitConfig.getSafParameter(requireContext(), uri, "rw");
FFmpegKit.execute("-i input.mp4 ... " + path);
Copyright (c) 2021-2022 FFmpegKit
- Status
- Versions
- Changelog
- Project Layout
- Using
- Building
- External Libraries
- Patents
- License