How to get video information such as size, duration, resolution from a video url in react native #476
Unanswered
KiranSayone
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the url path to the video which i use to play the video on my react native app. I need to show details such as duration, resolution and size of the video file when i press a button. So how can i get these information. I am totally new to FFmpeg. I tried using the below code
FFprobeKit.getMediaInformation(url).then(async session => {
const information = await session.getMediaInformation();
if (information !== undefined) {
console.log('info: ', information);
}
});
I am getting an output in metro as :
info: {}
Can someone help. I would like to save the information that i get about the video into a state by calling setState. But i am only getting the output as shown above when i console log it.
Beta Was this translation helpful? Give feedback.
All reactions