jishnujayakumar / MV-Tractus

A simple tool to extract motion vectors from h264 encoded videos.
108 stars 27 forks source link

Output not valid json cos multiple like-named properties #13

Closed adrianmay closed 4 years ago

adrianmay commented 4 years ago

The properties src_x, src_y, dst_x and dst_y occur twice in each output object. This is invalid json and will not process with tools like jq. I'm not sure what the two sets mean, but can I suggest they be output as something like:

    {
        "source" : -1,
        "width" : 16,
        "height" : 16,
        "this": {
            "src_x" : 24,
            "src_y" : 1928,
            "dst_x" : 24,
            "dst_y" : 1928 },
        "that": {
            "src_x" : 24,
            "src_y" : 1928,
            "dst_x" : 24,
            "dst_y" : 1928 },
        "dx" : 0,
        "dy" : 0
    },
jishnujayakumar commented 4 years ago

Thanks @adrianmay for posting the issue. It was a bug and has been rectified. Please do cite if you found the tool useful.