0

I've followed Dranger's tutorial for displaying video using libav and FFMPEG. http://dranger.com/ffmpeg/

avcodec_decode_video2 seems to be the slowest part of the video decoding process. I will occasionally have two videos decoding simultaneously but only displaying half of each video side by side. In other words, half of each video will be off-screen. In order to speed up decoding, is there a way to only decode a portion of a frame?

James491
  • 47
  • 7

1 Answers1

0

No.

Codecs using interframe prediction need whole reference frames, so there's no way this could possibly work.

Anton Khirnov
  • 793
  • 5
  • 5
  • What if all frames are intra frames? – James491 May 05 '13 at 14:28
  • Then there is still intraframe compression, which will probably make this impossible for most codecs. – Anton Khirnov May 05 '13 at 15:33
  • Do you know of such a codec? I'm not developing a standard video player and can choose any encoder and decoder. – James491 May 06 '13 at 02:09
  • Nothing that is not raw video. The compression would also be very bad most probably. Decoding just a part of the frame might be accomplishable with something like h.264 in theory, if you control the encoder so that the MVs don't cross some boundaries (AFAIK x264 currently does something similar for its intra refresh feature), and the decoder so that it only decodes some macroblocks. But it would require a custom patched encoder and decoder. – Anton Khirnov May 06 '13 at 12:24