video is none when using get_clip
Physical-Chemist opened this issue · comments
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?