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.

I need to know the file format of the video selected. When images are picked I can determine the file format from the uri or the path (path only on android)

 { "path": "/storage/emulated/0/Pictures/image-7dda44cb-8d84-4df4-82b6-f23dd581d4d3.jpg",
    "uri": "file:///storage/emulated/0/Pictures/image-7dda44cb-8d84-4df4-82b6-f23dd581d4d3.jpg",
    "height": 2048,
    "width": 1536,
    "isVertical": true }

Videos however look like this:

 { "uri": "content://media/external/video/media/170" }

I can’t determine the video extension from the uri here. I assume it is normally mp4, but I believe other video types are possible in edge case scenarios (am I right?). Could the extension or file format be included in some way? on the path at least? I could submit a PR if you let me know what sol’n is preferable.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Riyaztradcommented, Jun 19, 2022

same issue facing { “bitrate”: 22002638, “duration”: 1, “fileName”: “video:294656”, “fileSize”: 4033785, “height”: 1920, “type”: “video/mp4”, “uri”: “content://com.android.providers.media.documents/document/video%3A294656”, “width”: 1080 }

0reactions
Riaz5687commented, Jun 1, 2022

same issue with me as well. Has someone solved it ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Video file format - Wikipedia
A video file format is a type of file format for storing digital video data on a computer system. Video is almost always...
Read more >
8 Best Video File Formats for 2020 - IEEE Computer Society
8 Common Video File Formats, Codecs, and Containers · MP4 · MOV · WMV · FLV · AVI · AVCHD (Advanced Video Coding...
Read more >
How to pick the best video file format - Adobe
Choosing the right video format. · MP4. MP4 (MPEG-4 Part 14) is the most common type of video file format. · MOV. MOV...
Read more >
Video File Formats and Codecs: A Complete List for Developers
Learn which video file formats and codecs are the best to use for quality and compression. Learn about WEBM, OGG, MP4 and easily...
Read more >
Video Downloader PLUS
Best Video Downloader Extension. Downloads most popular media types from ANY website.
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