mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 00:08:51 -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");
|
return getInteger("video", "height");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Double getBitRate() {
|
||||||
|
return Double.parseDouble(getFormat().get("bit_rate").toString());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Float getFrameRate() {
|
public Float getFrameRate() {
|
||||||
return find("video", "avg_frame_rate").map(fps -> {
|
return find("video", "avg_frame_rate").map(fps -> {
|
||||||
|
@ -19,6 +19,8 @@ public interface MediaCharacteristics extends AutoCloseable {
|
|||||||
|
|
||||||
Integer getHeight();
|
Integer getHeight();
|
||||||
|
|
||||||
|
Double getBitRate();
|
||||||
|
|
||||||
Float getFrameRate();
|
Float getFrameRate();
|
||||||
|
|
||||||
String getTitle();
|
String getTitle();
|
||||||
|
@ -178,6 +178,10 @@ public class MediaInfo implements MediaCharacteristics {
|
|||||||
return Integer.parseInt(get(StreamKind.Video, 0, "Height"));
|
return Integer.parseInt(get(StreamKind.Video, 0, "Height"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Double getBitRate() {
|
||||||
|
return Double.parseDouble(get(StreamKind.General, 0, "OverallBitRate"));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Float getFrameRate() {
|
public Float getFrameRate() {
|
||||||
return Float.parseFloat(get(StreamKind.Video, 0, "FrameRate"));
|
return Float.parseFloat(get(StreamKind.Video, 0, "FrameRate"));
|
||||||
|
Loading…
Reference in New Issue
Block a user