[Libav-user] Fwd: 971108 - ffmpeg doesn't use GPU
hamidi
hamidi at gmail.com
Sat Feb 2 06:48:04 EET 2019
Thanks JP May for replying. Your response seems too expert for me. I'm too
newbie in FFMpeg and Libav materials. Although I'll try to find the
meanings of your text, I've to get close to it step by step. Please accept
me to ask more questions in each step.
Thanks
On Wed, Jan 30, 2019 at 7:22 PM JP May <jpm at smhk.com> wrote:
> hamidi, there are definitely some problems getting it to use the hardware
> decoder. For us we have such a problem on iOS builds.
>
> We have to use code something like this to be sure it finds a hardware
> decoder ...
>
> #include <libavcodec/videotoolbox.h>
> static enum AVPixelFormat find_pixel_format(struct AVCodecContext *s,
> const enum AVPixelFormat *fmt) {
> while (*fmt != AV_PIX_FMT_NONE) {
> if (*fmt == AV_PIX_FMT_VIDEOTOOLBOX) {
> if (s->hwaccel_context == NULL) {
> int result = av_videotoolbox_default_init(s);
> if (result < 0) {
> printf(" the 'SPS/PPS problem' has happened.\n");
> printf(" you are NOT getting hardware decoding on
> this stream.\n");
> return s->pix_fmt;
> }
> else {
> printf(" the test was OK....\n");
> }
> }
> return *fmt;
> }
> ++fmt;
> }
> return s->pix_fmt;
> }
>
>
> the problem seems to relate to finding the SPS/PPS information on a
> variety of sources
> see,
>
> https://stackoverflow.com/q/25787347/294884
>
> a couple yrs ago there was a patch on the 264 problem (which I think was
> not incorporated..)
>
> https://ffmpeg.org/pipermail/ffmpeg-devel/2016-June/194842.html
>
> we really have not been able to solve the issue in the 265 case.
>
> If this info is relevant to your case, I hope it helps …
>
>
>
> On Jan 30, 2019, at 7:58 AM, hamidi <hamidi at gmail.com> wrote:
>
> I got the latest version binaries of ffmpeg from here
> <https://ffmpeg.zeranoe.com/builds/>. When I examine CPU and GPU usages
> when I play a video by its ffplay, I see that GPU is used during play. Not
> much using of CPU also indicates it. But when I get the latest version
> sources from the original site, I can't use GPU. ….
>
>
>
>
>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
> To unsubscribe, visit link above, or email
> libav-user-request at ffmpeg.org with subject "unsubscribe".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190202/e2d35ab4/attachment.html>
More information about the Libav-user
mailing list