Closed AxitaKathiriya closed 3 years ago
Please check @tanersener.. I have updated issue according to your issue-template format. And please give me alternate solution. Thanks
Information in your post is not enough to make a comment or reproduce it.
logcat
? If that's all, try to increase log severity using Config.setLogLevel()
. We need more detailed logs to understand what's going on there.Hello @tanersener maybe my issue is related to AxitaKathiriya problem.
I just starting using this library, first of all, I tried to get info about a video using FFprobe.getMediaInformation method, but it returns null.
I tried with Uri and file.path
videoUri = content://[my app package].fileprovider/files/VID_2020_12_03_00_10_41_083.mp4
videoFile.getAbsolutePath() = /files/VID_2020_12_03_00_10_41_083.mp4
MediaInformation info = FFprobe.getMediaInformation(videoUri);
the result is null, the log say "Protocol not found"
MediaInformation info2 = FFprobe.getMediaInformation(videoFile.getAbsolutePath());
the result is null, the log say "No such file or directory"
AS 4.1.1 compileSdkVersion 29 Pixel 3aXL with android 11. The video was taken with Camera2 Api
Thanks!
@snti Logs show what the problem is: Protocol not found
. content:
is not a valid protocol. See https://ffmpeg.org/ffmpeg-protocols.html
Hello @tanersener i am using below command. Command :- -i videopath -hide_banner
Here, I am using video path from my app's internal storage which is like (file:///data/user/0/temp/Record_2020-12-18-14-49-16.mp4) and also video path is in mp4 format.
When i getting info using this command then command is fail with return code 1.
Can you please tell me what is the meaning of return_code 1 ??
Hi @tanersener. First off, thank you so much for this library. It helped me a lot. However, I also encountered this issue, same with @AxitaKathiriya and I wonder if there's an update or is there a way to parse the media information from Config.enableLogCallback in Json format? Thank you very much!
If you have the full output you can use MediaInformationParser.from()
method for parsing.
This project will be retired. Please consider switching to FFmpegKit.
Description FFprobe.getMediaInformation() return null and Android App crash when i try to get media duration. Any alternate solution is available for getting media information?
Expected behavior I want to get media Information. Each and every time i want to get information of any media file instead of null.
Current behavior Sometime FFprobe.getMediaInformation() return null and Android App crashes.
Screenshots
Logs I/mobile-ffmpeg: Loading mobile-ffmpeg. I/mobile-ffmpeg: Loaded mobile-ffmpeg-full-arm-v7a-neon-4.4-lts-20200803. W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.arthenica.mobileffmpeg.MediaInformation.getDuration()' on a null object reference
Environment