ffmpegwasm / ffmpeg.wasm

FFmpeg for browser, powered by WebAssembly
https://ffmpegwasm.netlify.app
MIT License
14.01k stars 816 forks source link

Can we use ffmpeg.wasm for getting metadata to validate a particular video #493

Closed nik32 closed 1 year ago

nik32 commented 1 year ago

Is your feature request related to a problem? Please describe. Basically I have to upload a video to instagram. Now insta has a lot of conditions for a video to be upload like -

Container: MOV or MP4 (MPEG-4 Part 14), no edit lists, moov atom at the front of the file. Audio codec: AAC, 48khz sample rate maximum, 1 or 2 channels (mono or stereo). Video codec: HEVC or H264, progressive scan, closed GOP, 4:2:0 chroma subsampling. Frame rate: 23-60 FPS Video bitrate: VBR, 25Mbps maximum Audio bitrate: 128kbps

Thus I need to validate the video before uploading it. So can I get the above infos of a video. And if yes how??

Describe the solution you'd like ffmpeg.wasm give me video metadata (mentioned above). If it can validate if the video passes these params that cherry on top of the cake!

benz2012 commented 1 year ago

Normally (in a shell environment) you would use ffprobe which is a sub-tool of the ffmpeg family. That would lead me to believe that ffprobe could be added as a command of ffmpeg.wasm, however it is not currently part of the API. I'm not aware of a good way to get the same information output from ffmpeg itself without bending over backwards.

So, maybe this should be a feature request: "Add ffprobe command to API."

benz2012 commented 1 year ago

And if that is the case, then this is a duplicate request. See #121 for discussion & possible solutions

nik32 commented 1 year ago

Okay thanks @benz2012 !!