Ask Your Question
0

VideoCapture: partially decoded video data?

asked 2017-05-16 12:13:51 -0600

fommilie gravatar image

I've been following the VideoCapture tutorial http://docs.opencv.org/3.2.0/d5/dc4/t... and it strikes me that only fully decoded frames are analysed.

Is there a way to get hold of lower level information, i.e. partial decodings of an mp4 file? Since this is all I need for my analysis, I hope it would be more efficient than decoding the entire video:

  1. key frames (potentially in their encoded form, but decoded is also fine)
  2. p-frame motion vectors... I know h264 gets a bit more complex with full inter-frame but just forward motion estimation is fine.
  3. the fourier space from AAC (or anything that would resemble the DTFT... I realise this is a bit more ill-defined, it's not as important)

thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-05-16 19:58:39 -0600

berak gravatar image

in short, no, no and no, this is probably the wrong library for you.

purpose of VideoCapture is to retrieve decoded images for computer-vision, if you need low-level access (or even audio) rather look at libffmpeg.

edit flag offensive delete link more

Comments

I suspected as much. The problem is that I'm trying to do it from the JVM (not something I can change) and it's really not where people typically do this stuff.

fommilie gravatar imagefommilie ( 2017-05-17 06:10:06 -0600 )edit

"and it's really not where people typically do this stuff." -- yea, java is absolutely the wrong tool for this.

berak gravatar imageberak ( 2017-05-17 06:35:21 -0600 )edit

btw, is there any way to know that a frame was decoded from a key frame? I don't need to analyse every frame but I'd prefer to use the higher quality ones.

fommilie gravatar imagefommilie ( 2017-05-17 09:31:17 -0600 )edit

again, NO. (it's not relevant at all in the opencv context)

also, the whole concept of "keyframes" only applies to special video codecs

berak gravatar imageberak ( 2017-05-17 09:34:21 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-05-16 12:13:51 -0600

Seen: 611 times

Last updated: May 16 '17