Datasets:

Modalities:
Text
Formats:
json
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:

Data unzip error

#2
by jjjjh - opened

It seems there is a problem with this data. When I use 7z to extract it, I encounter the error "ERROR: Data Error : BV175411f7As_0.03_214.43.mp4". Was the file not uploaded completely?

CG-Bench org
cat ref_videos.zip.part000 ref_videos.zip.part001 ref_videos.zip.part002 ref_videos.zip.part003 > ref_videos.zip
unzip ref_videos.zip

use this to unzip it

Hi, thanks for the reply.

I tried the above command. However, when I read some videos, I met errors:

[NULL @ 0x21ce740] Invalid NAL unit size (-1640086251 > 528).                                                                                                                                 
[NULL @ 0x21ce740] missing picture in access unit with size 532                                                                                                                               
[h264 @ 0x3485180] Invalid NAL unit size (-1640086251 > 528).                                                                                                                                 
[h264 @ 0x3485180] Error splitting the input into NAL units.                                                                                                                                  
[NULL @ 0x21ce740] Invalid NAL unit size (267647554 > 303).                                                                                                                                   
[NULL @ 0x21ce740] missing picture in access unit with size 307  

For example, when I read video "a_nUdj8nnTM_1247.13_1260.80.mp4", I can only read 61 frames, after that, I met the above errors. However, cap.get(cv2.CAP_PROP_FRAME_COUNT) is 409.

CG-Bench org

Thank you for your feedback. Upon inspection, we have confirmed that some video clips are indeed problematic, and there are also errors in a few clue annotations when converting frame indexes to timestamps. We are currently working on fixing these issues and will re-upload the corrected video clips once the updates are complete.

Thank you.

CG-Bench org

We’ve just uploaded the bug-fixed annotations and video clips. Feel free to check the new version, and let us know if you run into any issues — your feedback is always welcome!

Note: since the timestamps were recalculated, some filenames have changed as well. For instance, a_nUdj8nnTM_1247.13_1260.80.mp4 is now a_nUdj8nnTM_1558.92_1576.00.mp4. (The error was caused by an anomaly in reading the FPS information of the videos. This led to incorrect conversions from frame index to timestamps in the raw annotations, which has now been fixed in the updated version.)

CG-Bench org

Sorry, it seems that there are still a few minor issues that haven't been fully resolved😕. I'll let you know once everything has been fixed.

CG-Bench org

It should be OK now😅.

Thank you very much for your hard work! I will try it again.

Hi, I still have problem reading the videos. For example:

In [3]: fname = 'videos/02LnK6fEdJw_337.62_906.96.mp4'

In [4]: vr = decord.VideoReader(fname)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2694300] moov atom not found
[17:35:30] /github/workspace/src/video/video_reader.cc:83: ERROR opening: videos/02LnK6fEdJw_337.62_906.96.mp4, Invalid data found when processing input
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[4], line 1
----> 1 vr = decord.VideoReader(fname)

File /usr/local/lib/python3.11/dist-packages/decord/video_reader.py:57, in VideoReader.__init__(self, uri, ctx, width, height, num_threads, fault_tol)
     54     self._handle = _CAPI_VideoReaderGetVideoReader(
     55         uri, ctx.device_type, ctx.device_id, width, height, num_threads, 0, fault_tol)
     56 if self._handle is None:
---> 57     raise RuntimeError("Error reading " + uri + "...")
     58 self._num_frame = _CAPI_VideoReaderGetFrameCount(self._handle)
     59 assert self._num_frame > 0, "Invalid frame count: {}".format(self._num_frame)

RuntimeError: Error reading videos/02LnK6fEdJw_337.62_906.96.mp4...
CG-Bench org

I'm not exactly sure what caused a small portion of the videos to have incomplete encoding. So, I used the following script to attempt reading all the videos and identified those with errors. I then re-encoded the problematic videos.

import os
from decord import VideoReader
from decord._ffi.base import DECORDError
import glob

def is_video_file(filename):
    video_extensions = ('.mp4')
    return filename.lower().endswith(video_extensions)

def check_videos_in_directory(directory):
    error_files = []
    for root, _, files in os.walk(directory):
        for file in files:
            if is_video_file(file):
                filepath = os.path.join(root, file)
                try:
                    vr = VideoReader(filepath)
                    _ = vr[0]
                except Exception as e:
                    print(f"Failed to read: {filepath}{repr(e)}")
                    error_files.append(filepath)

    print("\nSummary of unreadable files:")
    for f in error_files:
        print(f)

if __name__ == "__main__":
    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument("directory")
    args = parser.parse_args()

    check_videos_in_directory(args.directory)

For your convenience, the link below contains the re-encoded failure videos — you can overwrite the original directory with these and try again (The complete ZIP file with all videos will be updated later.):

https://huggingface.co/datasets/CG-Bench/CG-AV-Counting/resolve/main/clips_re_encode.zip

Hi, sorry for the late reply. The attach file clips_re_encode.zip is not available. Can you share it with me?

Thanks, there is no problem now.

jjjjh changed discussion status to closed

Sign up or log in to comment