[FFmpeg-trac] #9599(undetermined:reopened): VideoToolbox VP9 hwaccel freezes ffmpeg

FFmpeg trac at avcodec.org
Tue Aug 22 01:10:36 EEST 2023


#9599: VideoToolbox VP9 hwaccel freezes ffmpeg
-------------------------------------+-------------------------------------
             Reporter:  Eric Karnes  |                    Owner:  (none)
                 Type:  defect       |                   Status:  reopened
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  git-master   |               Resolution:
             Keywords:               |               Blocked By:
  videotoolbox vp9                   |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by low-batt):

 A patch file should be attached. The changes create a separate decoder for
 VP9 decoding with Video Toolbox. That decoder uses `vp9_superframe`
 instead of `vp9_superframe_split` on Intel Macs.

 I think this is how to change the BSF filter only when hardware decoding
 is enabled. What I'm not clear on is how FFmpeg decides not to use this
 decoder when software decoding. Really need a FFmpeg developer for this.

 I built a libavcodec.dylib with these changes and tested it with
 [https://github.com/iina/iina IINA] on my Intel Mac. The longer test video
 played fine with hardware decoding. This is what the [https://github.com
 /mpv-player/mpv mpv] log showed:

 {{{
 [  22.665][v][vd] Codec list:
 [  22.665][v][vd]     vp9 - Google VP9
 [  22.665][v][vd]     vp9_videotoolbox (vp9) - VideoToolbox Google VP9
 [  22.665][v][vd] Opening decoder vp9
 [  22.665][v][vd] Looking at hwdec vp9_videotoolbox-videotoolbox...
 [  22.665][v][vd] Trying hardware decoding via vp9_videotoolbox-
 videotoolbox.
 [  22.665][v][vd] Using underlying hw-decoder 'vp9_videotoolbox'
 [  22.665][v][vd] Selected codec: vp9 (Google VP9)
 …
 [  22.786][i][vd] Using hardware decoding (videotoolbox).
 }}}

 I also tested disabling hardware decoding, which also played fine:
 {{{
 [   3.990][v][vd] Codec list:
 [   3.990][v][vd]     vp9 - Google VP9
 [   3.990][v][vd]     vp9_videotoolbox (vp9) - VideoToolbox Google VP9
 [   3.990][v][vd] Opening decoder vp9
 [   3.990][v][vd] No hardware decoding requested.
 [   3.990][v][vd] Using software decoding.
 [   3.990][v][vd] Detected 12 logical cores.
 [   3.990][v][vd] Requesting 13 threads for decoding.
 [   3.991][v][vd] Selected codec: vp9 (Google VP9)
 }}}
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9599#comment:23>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list