Extracting frames form H264 4K video files (panasonic GH4)
2 views (last 30 days)
Show older comments
Matlab (R2011b) won't read correctly my GH4 video files. VideoReader object can be created, but matlab cannot determine the total number of frames: get(video) returns a blank field for numberOfFrames. Not a problem per se, but when attempting a read(video, i:j), the first frame is ok but then the following frames are all the same. Without any error message.
It happens with both 4K or 2K 100(Full HD) 100 Mbps video files, .MOV or .MP4 (all are H264 I think, had to install the Klite codec pack to read them). Only the more compressed, 50 Mbps files are correctly read it seems.
Interestingly, if I do a data = read(video), I run out of memory: "not enough memory for 192 frames". OK. So it seems that matlab is able to count the frames, finally. The strange part is that if I do a get(video) again, the numberOfFrames is 192 now. And if I try read(video, i:j), now all frames get extracted, except that sometimes two consecutive frames are identical.
Found lots of discussion around VideoReader problems, up to rev 2014b. For example http://www.mathworks.com/matlabcentral/newsreader/view_thread/326286. But none solutioned my problem. I installed GStreamer 1.4 on my 32bit win7 machine, with no results.
Any help greatly appreciated, thanks.
0 Comments
Answers (0)
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!