Decode just I Frames in H264

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Decode just I Frames in H264

Aviv Hurvitz
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 !
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Decode just I Frames in H264

Carl Eugen Hoyos-2
2017-11-30 10:22 GMT+01:00 Aviv Hurvitz <[hidden email]>:
> 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
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Decode just I Frames in H264

Aviv Hurvitz
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 <[hidden email]>
wrote:

> 2017-11-30 10:22 GMT+01:00 Aviv Hurvitz <[hidden email]>:
> > 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
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".