Beispiel #1
0
parser = MCTF_parser(description="Information of codestream.")
parser.GOPs(GOPs)
parser.FPS(FPS)

## A script may only parse a few of the command-line arguments,
## passing the remaining arguments on to another script or program.
args = parser.parse_known_args()[0]
if args.GOPs:
    GOPs = int(args.GOPs)
if args.TRLs:
    TRLs = int(args.TRLs)
if args.FPS:
    FPS = int(args.FPS)

## Initializes the class GOP (Group Of Pictures).
gop = GOP()
## Extract the value of the size of a GOP, that is, the number of images.
GOP_size = gop.get_size(TRLs)
## Calculate the total number of video images.
pictures = GOPs * GOP_size + 1
## Duration of the sequence.
duration = pictures / (FPS * 1.0)


## Number of bytes of an entire directory. The size in bytes, and a
## codestream Kbps, even detailed subband level and neglecting headers
## is performed in info.py.
#  @param the_path Directory path.
#  @param key If you want to have only a certain type of files in the directory.
#  @return Files size.
def get_size(the_path, key):