ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 10354|回复: 4

[Linux] ffmpeg使用h264_qsv hevc_qsv 时报段错误

[复制链接]
发表于 2016-11-14 17:24:06 | 显示全部楼层 |阅读模式
[jxj123@localhost content]$ 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
[h264 @ 0x2a82d60] 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 [SAR 1:1 DAR 11:6], 30 fps, 30 tbr, 1200k tbn, 60 tbc
Segmentation fault (core dumped)


求大神指导。
回复

使用道具 举报

发表于 2016-11-14 20:05:22 | 显示全部楼层
很有可能是qsv环境没装好
使用debug模式跑一下看看
-v debug
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-11-15 09:04:02 | 显示全部楼层
孙悟空 发表于 2016-11-14 20:05
很有可能是qsv环境没装好
使用debug模式跑一下看看
-v debug

谢谢指导
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-11-15 09:24:52 | 显示全部楼层
[jxj123@localhost content]$ 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.
[file @ 0x3327fe0] Setting default whitelist 'file,crypto'
[h264 @ 0x33276c0] Format h264 probed with size=2048 and score=51
[h264 @ 0x33276c0] Before avformat_find_stream_info() pos: 0 bytes read:32768 seeks:0 nb_streams:1
[h264 @ 0x3328d80] ct_type:0 pic_struct:0
[h264 @ 0x3328d80] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 7, nal_ref_idc: 1
[h264 @ 0x3328d80] nal_unit_type: 8, nal_ref_idc: 1
[h264 @ 0x3328d80] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 5, nal_ref_idc: 1
[h264 @ 0x3328d80] ct_type:0 pic_struct:0
    Last message repeated 1 times
[h264 @ 0x3328d80] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 1, nal_ref_idc: 1
[h264 @ 0x3328d80] ct_type:0 pic_struct:0
[h264 @ 0x3328d80] Increasing reorder buffer to 1
[h264 @ 0x3328d80] no picture
[h264 @ 0x3328d80] ct_type:0 pic_struct:0
[h264 @ 0x3328d80] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 1, nal_ref_idc: 0
[h264 @ 0x3328d80] ct_type:0 pic_struct:0
    Last message repeated 1 times
[h264 @ 0x3328d80] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 1, nal_ref_idc: 1
[h264 @ 0x3328d80] ct_type:0 pic_struct:0
    Last message repeated 1 times
[h264 @ 0x3328d80] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 1, nal_ref_idc: 0
[h264 @ 0x3328d80] ct_type:0 pic_struct:0
    Last message repeated 1 times
[h264 @ 0x3328d80] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 1, nal_ref_idc: 1
[h264 @ 0x3328d80] ct_type:0 pic_struct:0
    Last message repeated 1 times
[h264 @ 0x3328d80] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 1, nal_ref_idc: 0
[h264 @ 0x3328d80] ct_type:0 pic_struct:0
    Last message repeated 1 times
[h264 @ 0x3328d80] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 6, nal_ref_idc: 0
[h264 @ 0x3328d80] nal_unit_type: 1, nal_ref_idc: 1
[h264 @ 0x3328d80] ct_type:0 pic_struct:0
    Last message repeated 93 times
[h264 @ 0x33276c0] 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 [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 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/N] y
[file @ 0x33663e0] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 4 logical cores
[graph 0 input from stream 0:0 @ 0x3384e00] Setting 'video_size' to value '176x96'
[graph 0 input from stream 0:0 @ 0x3384e00] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0x3384e00] Setting 'time_base' to value '1/1200000'
[graph 0 input from stream 0:0 @ 0x3384e00] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0x3384e00] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x3384e00] Setting 'frame_rate' to value '60/2'
[graph 0 input from stream 0:0 @ 0x3384e00] w:176 h:96 pixfmt:yuv420p tb:1/1200000 fr:60/2 sar:1/1 sws_param:flags=2
[format @ 0x33660e0] compat: called with args=[nv12|qsv]
[format @ 0x33660e0] Setting 'pix_fmts' to value 'nv12|qsv'
[auto-inserted scaler 0 @ 0x3385c80] Setting 'flags' to value 'bicubic'
[auto-inserted scaler 0 @ 0x3385c80] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x33660e0] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x3330240] query_formats: 4 queried, 2 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 0x3385c80] w:176 h:96 fmt:yuv420p sar:1/1 -> w:176 h:96 fmt:nv12 sar:1/1 flags:0x4
[h264 @ 0x33648c0] nal_unit_type: 9, nal_ref_idc: 0
[h264 @ 0x33648c0] nal_unit_type: 7, nal_ref_idc: 1
[h264 @ 0x33648c0] nal_unit_type: 8, nal_ref_idc: 1
[h264 @ 0x33648c0] Ignoring NAL type 9 in extradata
Segmentation fault (core dumped)

这是debug的信息,大师兄帮忙分析一下什么问题啊,谢谢。
回复 支持 反对

使用道具 举报

发表于 2016-11-15 14:26:09 | 显示全部楼层
wwcx 发表于 2016-11-15 09:24
[jxj123@localhost content]$ ffmpeg -i test_stream.264 -vcodec hevc_qsv test.mp4 -v debug
ffmpeg vers ...

[auto-inserted scaler 0 @ 0x3385c80] w:176 h:96 fmt:yuv420p sar:1/1 -> w:176 h:96 fmt:nv12 sar:1/1 flags:0x4

这行是啥情况,你的编码器支持nv12?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-10-24 19:17 , Processed in 0.046647 second(s), 15 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表