0

If I want to embed a video file or stream that is not my own into an html page, is there any way that I can first detect the bitrate that the video was encoded at? Is there a way that it can be interrogated by a php routine (ideally) or some other linux based server routine to detect the bitrate?

1 Answer 1

3

If you have access to FFmpeg, you can use:

ffmpeg -i file.avi

This will output information about the video file, including the streams composing it, along with their bitrates. You can then use grep to filter out the specific bitrate you're interested in, or just execute the command from PHP with shell_exec() and parse the returned string to find the bitrate you're interested in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.