Decode just I Frames in H264
I'd like to make a CPU-efficient computer vision application based on a H264 stream. I have two ideas and wanted to get feedback on their feasibility: *Idea 1 - temporal subsampling* 1. Read the stream into a buffer. 2. Decode only the I-frames. 3. Process the I-frames 4. If some conditions apply - decode the entire Group Of Pictures for that I-Frame. *Idea 2 - spatial subsampling* 1. Decode ROIs from the H264 stream / or decode low resolution images from the H264 stream. 2. Process and if some conditions apply 3. Fully decode the buffered stream. So my questions are: 1. Can Idea 1 and Idea 2 be done? Can they be done with libav ? 2. Am I likely to decrease CPU consumption in this way. Thanks much !
2017-11-30 10:22 GMT+01:00 Aviv Hurvitz <aviv.hurvitz@gmail.com>:
I'd like to make a CPU-efficient computer vision application based on a H264 stream.
I have two ideas and wanted to get feedback on their feasibility:
*Idea 1 - temporal subsampling*
-skip_frame nointra Note that valid (decodable) H.264 streams without I-frames exist. [...]
*Idea 2 - spatial subsampling*
-lowres 1 Unfortunately, this does not work for H.264 (it works for mpeg1/2/4 and jpeg/jpeg2000), implementing it is impossible (?) or at least non-trivial - patch welcome! Carl Eugen
Thanks for your answer Carl. -skip_frame works. Too bad "spatial subsampling" is hard or impossible . On Thu, Nov 30, 2017 at 2:22 PM, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
2017-11-30 10:22 GMT+01:00 Aviv Hurvitz <aviv.hurvitz@gmail.com>:
I'd like to make a CPU-efficient computer vision application based on a H264 stream.
I have two ideas and wanted to get feedback on their feasibility:
*Idea 1 - temporal subsampling*
-skip_frame nointra
Note that valid (decodable) H.264 streams without I-frames exist.
[...]
*Idea 2 - spatial subsampling*
-lowres 1
Unfortunately, this does not work for H.264 (it works for mpeg1/2/4 and jpeg/jpeg2000), implementing it is impossible (?) or at least non-trivial - patch welcome!
Carl Eugen _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
participants (2)
-
Aviv Hurvitz -
Carl Eugen Hoyos