Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ffmpeg-vaapi][HEVC encode] 1:N encode failed by using ffmpeg-vaapi #206

Closed
FocusLuo opened this issue Jun 21, 2018 · 7 comments
Closed
Labels
verifying PR: fix ready and verifying with build/test

Comments

@FocusLuo
Copy link

FocusLuo commented Jun 21, 2018

The HEVC 1:N encode can work well on i965, but failed on iHD
platforms: CFL, GLK and KBL
ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -v verbose -f rawvideo -s:v 720x480 -i ./Test_720x480p.yuv -an -vf format=nv12,hwupload -c:v hevc_vaapi -vframes 200 -y ./H265e_1N_720x480_session8_1.h265 -vf format=nv12,hwupload -c:v hevc_vaapi -vframes 200 -y ./H265e_1N_720x480_session8_2.h265 -vf format=nv12,hwupload -c:v hevc_vaapi -vframes 200 -y ./H265e_1N_720x480_session8_3.h265 -vf format=nv12,hwupload -c:v hevc_vaapi -vframes 200 -y ./H265e_1N_720x480_session8_4.h265 -vf format=nv12,hwupload -c:v hevc_vaapi -vframes 200 -y ./H265e_1N_720x480_session8_5.h265 -vf format=nv12,hwupload -c:v hevc_vaapi -vframes 200 -y ./H265e_1N_720x480_session8_6.h265 -vf format=nv12,hwupload -c:v hevc_vaapi -vframes 200 -y ./H265e_1N_720x480_session8_7.h265 -vf format=nv12,hwupload -c:v hevc_vaapi -vframes 200 -y ./H265e_1N_720x480_session8_8.h265

part of log as below:
[graph 7 input from stream 0:0 @ 0x5614f625ccc0] w:720 h:480 pixfmt:yuv420p tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
[auto_scaler_0 @ 0x5614f625e780] w:iw h:ih flags:'bicubic' interl:0
[Parsed_format_0 @ 0x5614f625bb40] auto-inserting filter 'auto_scaler_0' between the filter 'graph 7 input from stream 0:0' and the filter 'Parsed_format_0'
[auto_scaler_0 @ 0x5614f625e780] w:720 h:480 fmt:yuv420p sar:0/1 -> w:720 h:480 fmt:nv12 sar:0/1 flags:0x4
[hevc_vaapi @ 0x5614ef936840] Input 720x480 -> Surface 720x480 -> CTU 23x15.
Output #7, hevc, to './H265e_1N_720x480_session8_8.h265':
Metadata:
encoder : Lavf58.17.100
Stream #7:0: Video: hevc (hevc_vaapi) (Main), 1 reference frame, vaapi_vld, 720x480, q=2-31, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc58.20.101 hevc_vaapi
[hevc_vaapi @ 0x5614ef921200] Failed to end picture encode issue: 24 (internal encoding error).
[hevc_vaapi @ 0x5614ef921200] Encode failed: -5.
Video encoding failed

@XinfengZhang
Copy link
Contributor

seems ffmpeg call vaDestroyContext before vaDestroyBuffer (VAEncCodedBufferType)

@XinfengZhang
Copy link
Contributor

cant reproduce with latest ffmpeg (4ac88ba5487e026bf81da565f97cfcf8f920657d)

@mypopydev
Copy link
Contributor

I can't reproduce with FFmpeg master/media-driver master/libva master in SKL.

@wangzj0601
Copy link

this issue can be duplicated on CFL/KBL/GLK, while can not be duplicated on SKL with below env.
media-driver: b06a573
ffmpeg: 27662ed681cbc74e9492cecf86ead8946679fd23 repo:https://git.ffmpeg.org/ffmpeg.git

@XinfengZhang
Copy link
Contributor

@wangzj0601 suppose , it is because lack of P frame support on CFL/KBL/GLK

@zhuqingliang
Copy link

passed at latest codebase ffmpeg(n4.1)

@XinfengZhang XinfengZhang added the verifying PR: fix ready and verifying with build/test label Nov 19, 2018
@FocusLuo
Copy link
Author

it works, let me to close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verifying PR: fix ready and verifying with build/test
Projects
None yet
Development

No branches or pull requests

6 participants
@FocusLuo @mypopydev @XinfengZhang @zhuqingliang @wangzj0601 and others