wwcx 发表于 2016-11-14 17:24:06

ffmpeg使用h264_qsv hevc_qsv 时报段错误

$ ffmpeg -i test_stream.264 -vcodec h264_qsv test.mp4
ffmpeg version 3.1.4 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
configuration: --enable-libmfx --enable-encoder=h264_qsv --enable-decoder=h264_qsv
libavutil      55. 28.100 / 55. 28.100
libavcodec   57. 48.101 / 57. 48.101
libavformat    57. 41.100 / 57. 41.100
libavdevice    57.0.101 / 57.0.101
libavfilter   6. 47.100 /6. 47.100
libswscale      4.1.100 /4.1.100
libswresample   2.1.100 /2.1.100
Increasing reorder buffer to 1
Input #0, h264, from 'test_stream.264':
Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p, 176x96 , 30 fps, 30 tbr, 1200k tbn, 60 tbc
Segmentation fault (core dumped)


求大神指导。

孙悟空 发表于 2016-11-14 20:05:22

很有可能是qsv环境没装好
使用debug模式跑一下看看
-v debug

wwcx 发表于 2016-11-15 09:04:02

孙悟空 发表于 2016-11-14 20:05
很有可能是qsv环境没装好
使用debug模式跑一下看看
-v debug

谢谢指导

wwcx 发表于 2016-11-15 09:24:52

$ ffmpeg -i test_stream.264 -vcodec hevc_qsv test.mp4 -v debug
ffmpeg version 3.1.4 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
configuration: --enable-libmfx --enable-encoder=h264_qsv --enable-decoder=h264_qsv
libavutil      55. 28.100 / 55. 28.100
libavcodec   57. 48.101 / 57. 48.101
libavformat    57. 41.100 / 57. 41.100
libavdevice    57.0.101 / 57.0.101
libavfilter   6. 47.100 /6. 47.100
libswscale      4.1.100 /4.1.100
libswresample   2.1.100 /2.1.100
Splitting the commandline.
Reading option '-i' ... matched as input file with argument 'test_stream.264'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'hevc_qsv'.
Reading option 'test.mp4' ... matched as output file.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file test_stream.264.
Successfully parsed a group of options.
Opening an input file: test_stream.264.
Setting default whitelist 'file,crypto'
Format h264 probed with size=2048 and score=51
Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:1
ct_type:0 pic_struct:0
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 7, nal_ref_idc: 1
nal_unit_type: 8, nal_ref_idc: 1
nal_unit_type: 6, nal_ref_idc: 0
nal_unit_type: 5, nal_ref_idc: 1
ct_type:0 pic_struct:0
    Last message repeated 1 times
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 6, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 1
ct_type:0 pic_struct:0
Increasing reorder buffer to 1
no picture
ct_type:0 pic_struct:0
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 6, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 0
ct_type:0 pic_struct:0
    Last message repeated 1 times
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 6, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 1
ct_type:0 pic_struct:0
    Last message repeated 1 times
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 6, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 0
ct_type:0 pic_struct:0
    Last message repeated 1 times
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 6, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 1
ct_type:0 pic_struct:0
    Last message repeated 1 times
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 6, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 0
ct_type:0 pic_struct:0
    Last message repeated 1 times
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 6, nal_ref_idc: 0
nal_unit_type: 1, nal_ref_idc: 1
ct_type:0 pic_struct:0
    Last message repeated 93 times
After avformat_find_stream_info() pos: 267554 bytes read:267554 seeks:0 frames:101
Input #0, h264, from 'test_stream.264':
Duration: N/A, bitrate: N/A
    Stream #0:0, 101, 1/1200000: Video: h264 (High), 1 reference frame, yuv420p(left), 176x96 , 0/1, 30 fps, 30 tbr, 1200k tbn, 60 tbc
Successfully opened the file.
Parsing a group of options: output file test.mp4.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument hevc_qsv.
Successfully parsed a group of options.
Opening an output file: test.mp4.
File 'test.mp4' already exists. Overwrite ? y
Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 4 logical cores
Setting 'video_size' to value '176x96'
Setting 'pix_fmt' to value '0'
Setting 'time_base' to value '1/1200000'
Setting 'pixel_aspect' to value '1/1'
Setting 'sws_param' to value 'flags=2'
Setting 'frame_rate' to value '60/2'
w:176 h:96 pixfmt:yuv420p tb:1/1200000 fr:60/2 sar:1/1 sws_param:flags=2
compat: called with args=
Setting 'pix_fmts' to value 'nv12|qsv'
Setting 'flags' to value 'bicubic'
w:iw h:ih flags:'bicubic' interl:0
auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
w:176 h:96 fmt:yuv420p sar:1/1 -> w:176 h:96 fmt:nv12 sar:1/1 flags:0x4
nal_unit_type: 9, nal_ref_idc: 0
nal_unit_type: 7, nal_ref_idc: 1
nal_unit_type: 8, nal_ref_idc: 1
Ignoring NAL type 9 in extradata
Segmentation fault (core dumped)

这是debug的信息,大师兄帮忙分析一下什么问题啊,谢谢。

孙悟空 发表于 2016-11-15 14:26:09

wwcx 发表于 2016-11-15 09:24
$ ffmpeg -i test_stream.264 -vcodec hevc_qsv test.mp4 -v debug
ffmpeg vers ...
w:176 h:96 fmt:yuv420p sar:1/1 -> w:176 h:96 fmt:nv12 sar:1/1 flags:0x4

这行是啥情况,你的编码器支持nv12?
页: [1]
查看完整版本: ffmpeg使用h264_qsv hevc_qsv 时报段错误