[FFmpeg-trac] #5859(ffmpeg:new): ffmpeg does not work with QSV/MSS2017
FFmpeg
trac at avcodec.org
Fri Sep 23 01:38:48 EEST 2016
#5859: ffmpeg does not work with QSV/MSS2017
----------------------------------+--------------------------------------
Reporter: milanc | Type: defect
Status: new | Priority: normal
Component: ffmpeg | Version: git-master
Keywords: qsv, mfx | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+--------------------------------------
QSV on my machine works, for example:
{{{
#/opt/intel/mediasdk/samples/sample_multi_transcode -i::h264
/opt/intel/mediasdk/samples/streams/test_stream.264 -o::h264
./test_out.h264 -hw
Multi Transcoding Sample Version 7.0.16053497
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Pipeline surfaces number (DecPool): 20
MFX HARDWARE Session 0 API ver 1.19 parameters:
Input video: AVC
Output video: AVC
Session 0 was NOT joined with other sessions
Transcoding started
..
Transcoding finished
Common transcoding time is 0.12 sec
MFX session 0 transcoding PASSED:
Processing time: 0.12 sec
Number of processed frames: 101
The test PASSED
# vainfo
libva info: VA-API version 0.99.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.99 (libva 1.67.0.pre1)
vainfo: Driver version: 16.5.55964-ubit
vainfo: Supported profile and entrypoints
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: <unknown entrypoint>
VAProfileH264ConstrainedBaseline: <unknown entrypoint>
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : <unknown entrypoint>
VAProfileH264Main : <unknown entrypoint>
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : <unknown entrypoint>
VAProfileH264High : <unknown entrypoint>
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : <unknown entrypoint>
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileVP9Profile0 : <unknown entrypoint>
<unknown profile> : VAEntrypointVideoProc
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : <unknown entrypoint>
}}}
Ffmpeg is compiled with mfx without errors.
Summary of the bug:
How to reproduce:
{{{
# ffmpeg -loglevel debug -y -i
/opt/intel/mediasdk/samples/streams/test_stream.264 -c:v h264_qsv
-preset:v faster ffmpeg_out.qsv.mp4
ffmpeg version N-81724-g88d79db Copyright (c) 2000-2016 the FFmpeg
developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
configuration: --prefix=/FFMPEG --pkg-config-flags=--static
--bindir=/root/bin --enable-gpl --enable-nonfree --enable-libfdk-aac
--enable-libmp3lame --enable-libx264 --enable-libx265 --enable-nvenc
--enable-libmfx --enable-version3 --enable-pthreads --enable-runtime-
cpudetect --disable-ffserver --enable-libfreetype --enable-filter=drawtext
libavutil 55. 30.100 / 55. 30.100
libavcodec 57. 57.101 / 57. 57.101
libavformat 57. 50.100 / 57. 50.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 62.100 / 6. 62.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-y' ... matched as option 'y' (overwrite output files)
with argument '1'.
Reading option '-i' ... matched as input file with argument
'/opt/intel/mediasdk/samples/streams/test_stream.264'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument
'h264_qsv'.
Reading option '-preset:v' ... matched as AVOption 'preset:v' with
argument 'faster'.
Reading option 'ffmpeg_out.qsv.mp4' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file
/opt/intel/mediasdk/samples/streams/test_stream.264.
Successfully parsed a group of options.
Opening an input file:
/opt/intel/mediasdk/samples/streams/test_stream.264.
[file @ 0x2f459e0] Setting default whitelist 'file,crypto'
[h264 @ 0x2f450c0] Format h264 probed with size=2048 and score=51
[h264 @ 0x2f450c0] Before avformat_find_stream_info() pos: 0 bytes
read:32768 seeks:0 nb_streams:1
[h264 @ 0x2f467e0] ct_type:0 pic_struct:0
[h264 @ 0x2f467e0] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 7, nal_ref_idc: 1
[h264 @ 0x2f467e0] nal_unit_type: 8, nal_ref_idc: 1
[h264 @ 0x2f467e0] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 5, nal_ref_idc: 1
[h264 @ 0x2f467e0] ct_type:0 pic_struct:0
[h264 @ 0x2f467e0] Reinit context to 176x96, pix_fmt: yuv420p
[h264 @ 0x2f467e0] ct_type:0 pic_struct:0
[h264 @ 0x2f467e0] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 1, nal_ref_idc: 1
[h264 @ 0x2f467e0] ct_type:0 pic_struct:0
[h264 @ 0x2f467e0] Increasing reorder buffer to 1
[h264 @ 0x2f467e0] no picture
[h264 @ 0x2f467e0] ct_type:0 pic_struct:0
[h264 @ 0x2f467e0] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 1, nal_ref_idc: 0
[h264 @ 0x2f467e0] ct_type:0 pic_struct:0
Last message repeated 1 times
[h264 @ 0x2f467e0] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 1, nal_ref_idc: 1
[h264 @ 0x2f467e0] ct_type:0 pic_struct:0
Last message repeated 1 times
[h264 @ 0x2f467e0] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 1, nal_ref_idc: 0
[h264 @ 0x2f467e0] ct_type:0 pic_struct:0
Last message repeated 1 times
[h264 @ 0x2f467e0] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 1, nal_ref_idc: 1
[h264 @ 0x2f467e0] ct_type:0 pic_struct:0
Last message repeated 1 times
[h264 @ 0x2f467e0] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 1, nal_ref_idc: 0
[h264 @ 0x2f467e0] ct_type:0 pic_struct:0
Last message repeated 1 times
[h264 @ 0x2f467e0] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x2f467e0] nal_unit_type: 1, nal_ref_idc: 1
[h264 @ 0x2f467e0] ct_type:0 pic_struct:0
Last message repeated 93 times
[h264 @ 0x2f450c0] After avformat_find_stream_info() pos: 267554 bytes
read:267554 seeks:0 frames:101
Input #0, h264, from
'/opt/intel/mediasdk/samples/streams/test_stream.264':
Duration: N/A, bitrate: N/A
Stream #0:0, 101, 1/1200000: Video: h264 (High), 1 reference frame,
yuv420p(left), 176x96 [SAR 1:1 DAR 11:6], 0/1, 30 fps, 30 tbr, 1200k tbn,
60 tbc
Successfully opened the file.
Parsing a group of options: output file ffmpeg_out.qsv.mp4.
Applying option c:v (codec name) with argument h264_qsv.
Successfully parsed a group of options.
Opening an output file: ffmpeg_out.qsv.mp4.
[file @ 0x2f81600] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0x2f44e20] Setting 'video_size' to value
'176x96'
[graph 0 input from stream 0:0 @ 0x2f44e20] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x2f44e20] Setting 'time_base' to value
'1/1200000'
[graph 0 input from stream 0:0 @ 0x2f44e20] Setting 'pixel_aspect' to
value '1/1'
[graph 0 input from stream 0:0 @ 0x2f44e20] Setting 'sws_param' to value
'flags=2'
[graph 0 input from stream 0:0 @ 0x2f44e20] Setting 'frame_rate' to value
'60/2'
[graph 0 input from stream 0:0 @ 0x2f44e20] w:176 h:96 pixfmt:yuv420p
tb:1/1200000 fr:60/2 sar:1/1 sws_param:flags=2
[format @ 0x2f98160] compat: called with args=[nv12|qsv]
[format @ 0x2f98160] Setting 'pix_fmts' to value 'nv12|qsv'
[auto-inserted scaler 0 @ 0x2f98a60] Setting 'flags' to value 'bicubic'
[auto-inserted scaler 0 @ 0x2f98a60] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x2f98160] auto-inserting filter 'auto-inserted scaler 0'
between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x2f45780] query_formats: 4 queried, 2 merged, 1 already
done, 0 delayed
[auto-inserted scaler 0 @ 0x2f98a60] w:176 h:96 fmt:yuv420p sar:1/1 ->
w:176 h:96 fmt:nv12 sar:1/1 flags:0x4
[h264 @ 0x2f96cc0] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x2f96cc0] nal_unit_type: 7, nal_ref_idc: 1
[h264 @ 0x2f96cc0] nal_unit_type: 8, nal_ref_idc: 1
[h264 @ 0x2f96cc0] Ignoring NAL type 9 in extradata
[h264_qsv @ 0x2fa39e0] Error initializing an internal MFX session
Output #0, mp4, to 'ffmpeg_out.qsv.mp4':
Stream #0:0, 0, 0/0: Video: h264, 1 reference frame, none, q=2-31, SAR
1:1 DAR 0:0, 30 fps
Metadata:
encoder : Lavc57.57.101 h264_qsv
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height
[AVIOContext @ 0x2fa4300] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0x2f4dd00] Statistics: 267554 bytes read, 0 seeks
}}}
Patches should be submitted to the ffmpeg-devel mailing list and not this
bug tracker.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/5859>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list