mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-22 15:58:52 -05:00
Add BitRate to MediaCharacteristics
This commit is contained in:
parent
3007df1a8f
commit
53f23c8acf
@ -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 -> {
|
||||
|
@ -19,6 +19,8 @@ public interface MediaCharacteristics extends AutoCloseable {
|
||||
|
||||
Integer getHeight();
|
||||
|
||||
Double getBitRate();
|
||||
|
||||
Float getFrameRate();
|
||||
|
||||
String getTitle();
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user