On 03/09/2019 19:29, August Johansson wrote: > Btw that gets overall bit rate all streams together. I need the average bit > rate for each stream. > > Den tis 3 sep. 2019 19:26August Johansson <[email protected]> skrev: > >> Hi, >> No i dont like this. It adds another dependency to my software. If this >> really is the only way, i will try not to not use it >> Thanks anyway >> >> Den tis 3 sep. 2019 19:23William Caulfield < >> [email protected]> skrev: >> >>> On Tue, Sep 3, 2019 at 9:38 AM August Johansson <[email protected] >>>> >>> wrote: >>> >>>> Hi, >>>> I would like to store the average bit rate of every stream in my >>> database. >>>> I tested using ffprobe -print_format json -show_streams but this >>>> information does not seem to be there. What would be the best way to >>> return >>>> this information? >>>> Thanks >>>> _______________________________________________ >>> >>> >>> A bit off topic, but I would use mediainfo for this: >>> >>> mediainfo --Inform="General;%OverallBitRate%" file.ext >>> >>> That would get you the overall bitrate in bps, eg: 10236425 >>> >>> mediainfo --Inform="General;%OverallBitRate/String%" file.ext >>> >>> That would get you the overall bitrate in a more Human readable form, eg: >>> 10.2 Mb/s >>> >>>
Try this and grep out the bits you need. It will accommodate files that don't report their bit rates but there is an overhead as it does a short scan of each file. mediainfo --ParseSpeed=1 file.ext _______________________________________________ ffmpeg-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
