[FFmpeg-user] hw_decode.c on osx?

Ted Park kumowoon1025 at gmail.com
Sat Apr 18 14:15:36 EEST 2020


Hi,

> videotoolbox decodes to CMSampleBuffer, which is CoreMedia's generic buffer
> wrapper class.  a couple levels down, it's probably a CVPixelBuffer.  if it's
> working for you, i'd be curious to know what hardware and what os version
> you're running on, and what type of file you're feeding to hw_decode.


Oh okay, makes sense. The one I tried it on had a W5700, I tried again on a dual nehalem Xserve with no gpu (almost, has  a GT120 for console/desktop monitor) and got similar errors

xserve:~ admin$ $OLDPWD/hw_decode videotoolbox hd-bars-h264.mov hd-bars-h264.raw
[h264 @ 0x7fb74d001800] Failed setup for format videotoolbox_vld: hwaccel initialisation returned error.
Failed to get HW surface format.
[h264 @ 0x7fb74d001800] decode_slice_header error
[h264 @ 0x7fb74d001800] no frame!
Error during decoding

xserve:~ admin$ $OLDPWD/hw_decode videotoolbox hd-bars-hevc.mp4 hd-bars-hevc.raw
[hevc @ 0x7fd8a8018a00] get_buffer() failed
[hevc @ 0x7fd8a8018a00] videotoolbox: invalid state
[hevc @ 0x7fd8a8018a00] hardware accelerator failed to decode picture
Error during decoding
Error during decoding

The difference would be I didn't expect it to work in the first place I guess. Do you know hardware decoding works in ffplay? It's harder to tell for mac frameworks imo, I'd try attaching to ffplay and seeing if you can get it to use a hardware decoder. Which gpu does the machine have?

Regards,
Ted Park



More information about the ffmpeg-user mailing list