e-lab / torch-toolbox

A collection of snippets and libraries for Torch from e-Lab
https://engineering.purdue.edu/elab/
199 stars 64 forks source link

Not able to run video with .MXF extension #21

Closed codeAC29 closed 7 years ago

codeAC29 commented 7 years ago

I tried to load video with .MXF extension using test-frame but it stops/pauses after few frames. In the beginning I get the following warning message too:

[mxf @ 0x7f9d9c022720] material track 2: no corresponding source track found
Video statistics: 720x960 (unknown frames)
mvitez commented 7 years ago

Does ffmpeg open your video? If not, there is little we can do. If yes, can you put the video somewhere for me to check?

mvitez commented 7 years ago

GPU0 is a good place where to put.

codeAC29 commented 7 years ago

ffmpeg is able to open my video. I have put it in GPU0: /media/HDD1/Datasets

mvitez commented 7 years ago

This file plays correctly to me with your test-frame. Of course, it stops at the 10th frame, because it's written so in the code.

mvitez commented 7 years ago

Video-decoder did not return the total number of frames, because this information was not present. It can be calculated, though, if the video length and fps are present, which is true in your case. I have committed a new version with this fix.