001package net.bramp.ffmpeg.probe; 002 003import com.google.common.collect.ImmutableMap; 004import java.util.Map; 005 006/** Represents the format information from an FFprobe result. */ 007public class FFmpegFormat { 008 public String filename; 009 public int nb_streams; 010 public int nb_programs; 011 012 public String format_name; 013 public String format_long_name; 014 public double start_time; 015 016 // TODO Change this to java.time.Duration 017 /** Duration in seconds. */ 018 public double duration; 019 020 /** File size in bytes. */ 021 public long size; 022 023 /** Bitrate. */ 024 public long bit_rate; 025 026 public int probe_score; 027 028 public Map<String, String> tags; 029 030 public String getFilename() { 031 return filename; 032 } 033 034 public int getNbStreams() { 035 return nb_streams; 036 } 037 038 public int getNbPrograms() { 039 return nb_programs; 040 } 041 042 public String getFormatName() { 043 return format_name; 044 } 045 046 public String getFormatLongName() { 047 return format_long_name; 048 } 049 050 public double getStartTime() { 051 return start_time; 052 } 053 054 public double getDuration() { 055 return duration; 056 } 057 058 public long getSize() { 059 return size; 060 } 061 062 public long getBitRate() { 063 return bit_rate; 064 } 065 066 public int getProbeScore() { 067 return probe_score; 068 } 069 070 public Map<String, String> getTags() { 071 return ImmutableMap.copyOf(tags); 072 } 073}