[FFmpeg-devel] 回复: Questions about ffmpeg h264_qsv

Ron yoyo at yoyo.so
Thu Aug 6 10:49:00 CEST 2015


Thank you very much!!!
  
 I have got the latest ffmpeg  and tested h264_qsv decoder. It works well!! ^_^
  
  
  

 

 ------------------ 原始邮件 ------------------
  发件人: "Ivan Uskov";<ivan.uskov at nablet.com>;
 发送时间: 2015年8月6日(星期四) 下午4:03
 收件人: "Ron"<yoyo at yoyo.so>; "FFmpeg development discussions and patches"<ffmpeg-devel at ffmpeg.org>; 
 
 主题: Re: [FFmpeg-devel] Questions about ffmpeg h264_qsv

 

Hello Ron,

Thursday, August 6, 2015, 5:34:51 AM, you wrote:

R> Hi,
R>  I have some questions about ffmpeg h264_qsv with Intel media sdk.
R>   
R>  1. The command 'ffmpeg -i in.mp4 -an -c:v h264_qsv out.mp4' to
R> encode sucessful, how can I make the qsv decoder work?
Just use the following syntax:
ffmpeg -c:v h264_qsv -i in.mp4 -vcodec h264_qsv  result.mp4


R>    I disabled h264 decoder in 'libavcodec/allcodecs.c' to make 
R> h264_qsv decoder work, error messages as follow:
R>      'ffmpeg -i in.mp4 -an -c:v h264_qsv out.mp4' ,(h264 parser error !!!)
R>           libavcodec     56. 49.101 / 56. 49.101
R>          libavformat    56. 40.101 / 56. 40.101
R>          libavdevice    56.  4.100 / 56.  4.100
R>          libavfilter     5. 25.100 /  5. 25.100
R>          libswscale      3.  1.101 /  3.  1.101
R>          libswresample   1.  2.101 /  1.  2.101
R>          libpostproc    53.  3.100 / 53.  3.100
R>         [NULL @ 0x3413760] AVC: nal size 268435457
R>         [NULL @ 0x3413760] missing picture in access unit with size 66365
R>         [h264_qsv @ 0x3412540] Only 8-bit YUV420 streams are supported.
R>         [NULL @ 0x3413760] AVC: nal size 268435457
R>         [NULL @ 0x3413760] missing picture in access unit with size 66365
R>         [h264_qsv @ 0x3412540] Only 8-bit YUV420 streams are supported.
R>         [NULL @ 0x3413760] AVC: nal size 268435457
R>         [NULL @ 0x3413760] missing picture in access unit with size 66365
R>         [h264_qsv @ 0x3412540] Only 8-bit YUV420 streams are supported.
R>         [NULL @ 0x3413760] AVC: nal size 268435457
R>         [NULL @ 0x3413760] missing picture in access unit with size 66365
R>         [h264_qsv @ 0x3412540] Only 8-bit YUV420 streams are supported.
R>         [NULL @ 0x3413760] AVC: nal size 268435457
R>  
R>     'ffmpeg -i in.264 -c:v h264_qsv out.mp4' ,  qsv decoder work sucessful but missing header!!!
R>  
R>         [h264_qsv @ 0x3678a30] Packet header is not contained in
R> global extradata, corrupted stream or invalid MP4/AVCC bitstream
It is issue of old version where qsv decoder does not work with mp4
and mkv sources, please take latest ffmpeg where this issue fixed.

R>         libva info: VA-API version 0.35.0
R>         libva info: va_getDriverName() returns 0
R>         libva info: User requested driver 'iHD'
R>         libva info: Trying to open
R> /opt/intel/mediasdk/lib64/iHD_drv_video.so
R>         libva info: Found init function __vaDriverInit_0_32
R>         libva info: va_openDriver() returns 0
R>              Last message repeated 8 times
R>         [h264_qsv @ 0x3678a30] Packet header is not contained in
R> global extradata, corrupted stream or invalid MP4/AVCC bitstream
R>             Last message repeated 4 times
R>         [h264_qsv @ 0x3678a30] Packet header is not contained in
R> global extradata, corrupted stream or invalid MP4/AVCC bitstream
R>             Last message repeated 5 times
R>  
R> 2.  libavcodec/qsvenc.c, function:init_video_param, line 124, 
R>  
R>         'q->param.mfx.MaxKbps          = avctx->bit_rate / 1000;' 
R> why not 'q->param.mfx.MaxKbps          = avctx->rc_max_rate / 1000;'
This correct for MFX_RATECONTROL_CBR but of corse bug for
MFX_RATECONTROL_VBR. Will fixed later. For any case part of
ratecontrol setup should be re-designed to support more advanced LA rate contol methods by mfx/qsv.
R>  3. Many hwacc registed in the source  file
R> 'libavcodec/allcodecs.c', How to use it? Try 'ffmpeg -hwacc h264_qsv ' failed.
A using of 'h264_qsv' already takes hardware acceleration. The
registered hwacc are necessary to use opaque surfaces (when data from
decoder to encoder routes inside gpu, without system memory copying).
Unfortunately, currently hwacc for qsv* is broken but should be
repaired at nearest time.
R>   
R>   
R>  Thanks!!
R> _______________________________________________
R> ffmpeg-devel mailing list
R> ffmpeg-devel at ffmpeg.org
R> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel



-- 
Best regards,
 Ivan                            mailto:ivan.uskov at nablet.com

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list