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?
Asked
Active
Viewed 1,405 times
1 Answers
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.

rid
- 61,078
- 31
- 152
- 193