Open arpgh opened 9 years ago
have been looking into this - not sure why we have errors though.
I think it may be VideoReader thread crashing or giving incorrect result. (for eg. frame count which affects the percentage calculation) With frame extraction affected, LMDB creation stops which in turn makes one caffe thread wait forever.
yeah, VideoReader only goes up to 457701 frame for the .mkv file. I converted the same .mkv into .mp4 using ffmpeg then the frame numbers went up to 915301.
Interesting bug.
VideoReader is based on FFMPEG so it is surprising that ffmepg is able to convert .mkv
to .mp4
but our VideoReader is not able to read it. We should perhaps just use the cpp executables to dump frames from the file to see if the executable crashes/stops. If so, we can probably narrow down the cause to internal buffer creation/updating. If not, it might be related to LMDB creation.
Same video converted to mp4 also gets stuck later in the run. Now the displayed percentage is getting to 228%. Possibly some VideoReader calculation is off when fps or length is large?
Branch: Development Path: gpu2:/mnt/data/wc14cls/training/0seed/vdos/wc14-BraMex.mp4/ video: wc14-BraMex.mp4 Log with error: runlog-process_video.txt-ERR Key configs: caffe & post process in parallel, don't save patch scores
Extracting every 24th frame (for density of 5) directly from the video wc14-BraMex.mp4 with
~/khajuri/VideoReader/VideoReader wc14-BraMex.mp4 24 allFrames
also gets stuck after dumping about 600 frames. Tried that with another long video with same fps and result is again same. So all indications point to issue in VideoReader.
Path: gpu2:/mnt/data/wc14cls/training/0seed/vdos/wc14-BraMex.mp4/ Log with error: runlog-VideoReader.txt-ERR
Trying a fix in branch issue87 @ b975ffad97a9f60780bf3502957abef972e14cc9
Problem was lengthInMicroSeconds variable, uint, overflowing. Using int64_t now. Will update once I see the process_video.py complete.
Should we take this opportunity to replace all non-return-value integers to uint64_t? Given the memory use for VideoReader is already in 100 of MBs, we can spare a few bytes. Plus, we won't see overflow errors for a while. (Don't know how many there are.)
Fix at issue87 @ b975ffa doesn't seem sufficient. process_video is now stuck at 50% Digging into other issue.
Let me try changing all return values to uint64_t.
Looks like multiple issues with VideoReader at play here:
Fixed at eb477fca502a95ae934e8bc70f5e668d953a0fba in issue87 branch. Can we re-try the videos again?
With the original 2hr video re-encoded at 30fps, the processing now completes ok. Performance is 3.02x. Format is still mkv. Also running localization on video to cross check ..
Frame extraction from mkv video with 50fps works in some cases but not in others. Here is one that is working - gpu2:/mnt/data/wc14cls/training/0seed/vdos/wc14-ChiAus-1stHalf/wc14-ChiAus-1stHalf.mkv (both in Development and issue87 branches)
We need to take care of .mkv formats while streaming videos as well.
Even with re-encoded 2hr video at 25fps, reporting of % progress is going way beyond 100%. Need to make sure it's only log reporting issue and doesn't affect frame handling in VideoReader. Path: gpu2:/mnt/data/wc14itr/vdo-set04/roundOf16Output/wc14-ArgSwi/processvideo.log
This issue will need to be tackled with larger video streaming infrastructure development. As of right now, all videos are encoded into 25 FPS prior to khajuri/kheer/cellroti processing. While for each of the sub-system is theoretically able to handle videos at different FPS, rather than maintaining/testing different FPS in each sub-system, a cleaner design would be to encode video to 25 FPS during initial ingest from stream.
Hence, for now, removing bug tag and introducing long-term tag.
Two _processvideo runs produced same errors.
Main issues:
Branch: Development Path: gpu2:/mnt/data/wc14cls/training/0seed/vdos/wc14-BraMex/ Video: wc14-BraMex.mkv Key configs: caffe & post process in parallel, compute curation, save compressed json Logs with error: runlog-process_video-curation.txt-ERR1 (or 0 suffix)
Frame density handling at high fps seems ok as seen in runlog. If there are multiple defects, split this into multiple issues.