retread icon indicating copy to clipboard operation
retread copied to clipboard

Bar.html all white

Open EposVox opened this issue 9 years ago • 6 comments

I've set up and installed the pre-reqs for your tool. (Ubuntu 16.04) (Also, installing the required tools was a bit of a mess, but I figured it out.) I ran it on a couple files and when I open the resulting "bar.html" and it doesn't show anything at all in Google Chrome, minor annoyance. Opened in Firefox and I do get the X & Y axes, but no indicators. Does this mean there are no duplicate frames? Or that it's not working right?

I was hoping to use this to analyze 60FPS recorded footage to see if the source data is actually a full 60 frames per second, or if it might be 30. In theory, it'd find duplicate frames every other frame if it's at 30 - or some inconsistent middleground. Or is this not how the tool would work?

Thanks for the help. Attached are my json and HTML results.

retread-epos.zip

EposVox avatar Jul 08 '16 02:07 EposVox

Just thought I'd update: I recorded a file that was for certain sub-the # of FPS the actual video file was at and I'm still getting no blips on the graph. Maybe I'm trying to adopt it for something it doesn't work for.

EposVox avatar Jul 08 '16 02:07 EposVox

Thanks for including your files - made it easy to diagnose. Short answer: in your bar.html, change read.mp4.json back to scores.json.

Long answer: bar.html is looking for a json file containing a list of integers, where element i is the number of duplicates frame i in the original video had. This is what retread writes to standard output, and what you saved to scores.json. The file read.mp4.json (created because you used the flag -s) is a list of strings, where element i is the hexadecimal hash of that frame.

E.g.

scores.json
[ 5, 5, 5, 6, 3, 14, 25, 24, ... ]

your_video.mp4.json
[ "6cf6ebd68d917f9e", "8e0d0be6fc730698", "346003f6efdf71e2", ... ]

ryanfox avatar Jul 08 '16 02:07 ryanfox

Whoops, I did that in attempting to diagnose, but changing it back has revealed a chart.

screenshot from 2016-06-30 11-51-57

However, since my clip is shorter than the full-film examples you have, it's a lot blockier. From how I'm seeing it, the X axis is a linear progression of frames throughout the clip, right? But what does Y exactly represent? Number of repeated frames? Not sure how to read it 100%, but this is progress, so thank you for the help!

EposVox avatar Jul 08 '16 02:07 EposVox

That was the wrong screenshot selection_011

EposVox avatar Jul 08 '16 02:07 EposVox

Yes, x axis goes left-to-right forward in time. The height at any given point is the number of duplicates of that frame.

I think in your particular case, it might be more helpful to look at the actual hashes (what you saved in read.mp4.json). If the frames in your clip are duplicated A, A, B, B, C, C, (etc), then you would see hashes like

c75971325670ca28, c75971325670ca28, 570340084ef9ba6b, 570340084ef9ba6b, 730ce36589c3bc32, 730ce36589c3bc32, 5e9223bb39126a0d, 5e9223bb39126a0d

That is, pairs of identical hashes in a row.

ryanfox avatar Jul 08 '16 03:07 ryanfox

Ooh, that's likely what I need. Now I just gotta figure out how to parse that in a feed for After Effects. But this is great info, thank you!

EposVox avatar Jul 08 '16 17:07 EposVox