By adjusting the time range so that exactly one frame would go into the output
file, a selected subset of the frames could then be merged into a file that
had a lower framerate.
Then, MPS flagged the file as having half of the frames dropped, because
of a metadata tag in the file telling it that half of the frames were dropped.
I ended up modifying some sample code in the repo to change the metadata tag
using the ->set() API:
1
2
3
4
5
6
7
8
9
10
11
12
13
voiddoDataLayoutEdits(constCurrentRecord&record,size_tblockIndex,DataLayout&dl)override{if(record.recordType==Record::Type::CONFIGURATION){constauto&newSpec=getExpectedLayout<ImageSpec>(dl,blockIndex);dl.findDataPieceValue<double>("nominal_rate")->print(std::cout,"");// cout << "Patching value" << "\n";// double x = 15;doublerate;cin>>rate;dl.findDataPieceValue<double>("nominal_rate")->set(rate);// cout << "Patching value complete" << "\n";dl.findDataPieceValue<double>("nominal_rate")->print(std::cout,"");}}
Week 2
Using the techniques developed the previous week, I was able to run MPS on
three sequences to compare the results:
I also refactored the scripts in my codebase to eliminate hardcoded values
(which I put in previously as I was trying to get a single working instance).
An example is the Python script to extract the necessary subset of frames out of
the dataset recording: