diff --git a/source/net/filebot/media/FFProbe.java b/source/net/filebot/media/FFProbe.java index 75b57845..1bef9e06 100644 --- a/source/net/filebot/media/FFProbe.java +++ b/source/net/filebot/media/FFProbe.java @@ -92,6 +92,11 @@ public class FFProbe implements MediaCharacteristics { return getInteger("video", "height"); } + @Override + public Double getBitRate() { + return Double.parseDouble(getFormat().get("bit_rate").toString()); + } + @Override public Float getFrameRate() { return find("video", "avg_frame_rate").map(fps -> { diff --git a/source/net/filebot/media/MediaCharacteristics.java b/source/net/filebot/media/MediaCharacteristics.java index 7a3e3a0b..1d99d182 100644 --- a/source/net/filebot/media/MediaCharacteristics.java +++ b/source/net/filebot/media/MediaCharacteristics.java @@ -19,6 +19,8 @@ public interface MediaCharacteristics extends AutoCloseable { Integer getHeight(); + Double getBitRate(); + Float getFrameRate(); String getTitle(); diff --git a/source/net/filebot/mediainfo/MediaInfo.java b/source/net/filebot/mediainfo/MediaInfo.java index 269e1bbe..834c75bf 100644 --- a/source/net/filebot/mediainfo/MediaInfo.java +++ b/source/net/filebot/mediainfo/MediaInfo.java @@ -178,6 +178,10 @@ public class MediaInfo implements MediaCharacteristics { return Integer.parseInt(get(StreamKind.Video, 0, "Height")); } + public Double getBitRate() { + return Double.parseDouble(get(StreamKind.General, 0, "OverallBitRate")); + } + @Override public Float getFrameRate() { return Float.parseFloat(get(StreamKind.Video, 0, "FrameRate"));