Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video is none when using get_clip #246

Open
Physical-Chemist opened this issue Aug 18, 2023 · 0 comments
Open

video is none when using get_clip #246

Physical-Chemist opened this issue Aug 18, 2023 · 0 comments

Comments

@Physical-Chemist
Copy link

I loaded the encoded video, some clips gave None.

encoded_vid = pytorchvideo.data.encoded_video.EncodedVideo.from_path('1.avi')

inp_imgs = encoded_vid.get_clip(
    9 - 1/2.0, # start second
    10 + 1/2.0  # end second
)
inp_imgs

it shows:
{'video': None, 'audio': None}

then I tried another clip

inp_imgs = encoded_vid.get_clip(
    90 - 1/2.0, # start second
    100 + 1/2.0  # end second
)
inp_imgs

it shows:

{'video': tensor([[[[ 60.,  60.,  60.,  ..., 223., 223., 223.],
           [ 60.,  60.,  60.,  ..., 223., 223., 223.],
           [ 60.,  60.,  60.,  ..., 223., 223., 223.],
           ...,
           [ 99., 100., 101.,  ..., 223., 223., 223.],
           [ 99., 100., 101.,  ..., 223., 223., 223.],
           [ 99., 100., 101.,  ..., 223., 223., 223.]],
 
          [[ 60.,  60.,  60.,  ..., 226., 226., 226.],
           [ 60.,  60.,  60.,  ..., 226., 226., 226.],
           [ 60.,  60.,  60.,  ..., 226., 226., 226.],
           ...,
           [100., 101., 103.,  ..., 223., 223., 223.],
           [100., 101., 103.,  ..., 223., 223., 223.],
           [100., 101., 103.,  ..., 223., 223., 223.]],
 
          [[ 60.,  60.,  60.,  ..., 226., 226., 226.],
           [ 60.,  60.,  60.,  ..., 226., 226., 226.],
           [ 60.,  60.,  60.,  ..., 226., 226., 226.],
           ...,
           [103., 103., 103.,  ..., 223., 223., 223.],
           [103., 103., 103.,  ..., 223., 223., 223.],
           [103., 103., 103.,  ..., 223., 223., 223.]],
 
          ...,

I also loaded other videos with other format (.mp4 etc.), it has similar issue.
Can I get some help, pls?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant