clear all;
clear classes;
clc;


referencevideos=ReferenceVideoCollection('*.mkv');
coders=VideoCoderCollection;

mpegparams.bitrate=[500 1000 2000 4000 ];
params.bitrate=[500 750 1000 ];

%coders.add('MPEG2VBR',mpegparams);
coders.add('H264VBR',params);

videometrics=VideoMetricsCollection;
%videometrics.add('AVG-PSNR');
%videometrics.add('AVG-SSIM');
videometrics.add('BVQM');

CompressedVideos=coders.proc(referencevideos);
CompressedVideos.addmetrics(videometrics);
CompressedVideos.calcmetrics;

% load session0.mat
% 
% CompressedVideos.fcc;

%[refdata,matdata]=CompressedVideos.makestatistics;
%save(sprintf('refdata_matdata_video_session_bvqm_%d.mat',...
%    round(10000*rand)),'refdata','matdata');

makeplots(1,'refdata_matdata_video_session_bvqm_*.mat');
