[FFmpeg-trac] #7112(avcodec:new): FFmpeg should support hwaccel to handle device lost issue

FFmpeg trac at avcodec.org
Fri Mar 30 10:07:03 EEST 2018


#7112: FFmpeg should support hwaccel to handle device lost issue
-------------------------------------+-------------------------------------
             Reporter:  haviet       |                     Type:
               Status:  new          |  enhancement
            Component:  avcodec      |                 Priority:  normal
             Keywords:  device lost  |                  Version:  3.4
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------
 I often face "device lost" problem when use hardware-based decoders and I
 believe others using hardware-based encoders/filters face the same
 problem.

 For example, when the device lost, h264_nvdec (CUDA) decoder would give
 errors like this:
  [h264 @ AVCodecContext] Error decoding a picture with NVDEC: 700
  [h264 @ AVCodecContext] hardware accelerator failed to decode picture

 There are many reasons may cause GPU device lost during its working such
 as

         - The graphics driver is upgraded.
         - The system changes from a power-saving graphics adapter to a
 performance graphics adapter.
         - The graphics device stops responding and is reset.
         - User manually disable or enable device.
         - A graphics adapter is physically attached or removed.
         - Remote access to the PC which could change display resolution.
         - Unplugging or plugging the monitor cable to the VGA adapter.
         - Etc.

 Of course, not all reasons cause "device lost" always, some may happen to
 some kind of PCs but may not happen to others.

 I would FFmpeg to provide a callback mechanism giving the API user a
 chance to reset or recreate
 the hardware acceleration resources, or even switch to software
 decoder/encoder/filter if the device
 can not be recovered.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7112>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list