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

[ICL][ffmpeg-vaapi][VP8 encode] ffmpeg exits with "Output file is empty, nothing was encoded" #409

Closed
ykku16github opened this issue Nov 8, 2018 · 7 comments
Assignees

Comments

@ykku16github
Copy link

ykku16github commented Nov 8, 2018

201811081026_vp8_320x180_100kbps_30fps.txt

The attached stdout was captured by running the following ffmpeg command:
ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -f rawvideo -pix_fmt nv12 -s:v 320x180 -r 30 -i tulip2-320x180-55be7124b3aec1b72bfb57f433297193.yuv -vf 'format=nv12,hwupload' -c:v vp8_vaapi -b:v 100k -maxrate 100k -y -r 30 -vstats -v debug output.webm 2>&1 | tee 201811081026_vp8_320x180_100kbps_30fps.txt

If needed, the input file can be downloaded from:
http://commondatastorage.googleapis.com/chromiumos-test-assets-public/tulip2/tulip2-320x180-55be7124b3aec1b72bfb57f433297193.yuv

@ykku16github
Copy link
Author

ykku16github commented Nov 8, 2018

For every frame that gets encoded, ffmpeg prints the following:

[vp8_vaapi @ 0x27dee40] Output buffer: 32717 bytes (status 00000001).
[vp8_vaapi @ 0x27dee40] Output buffer: 0 bytes (status 00000000).

This is printed by the for-loop in:
https://github.com/FFmpeg/FFmpeg/blob/70463b702697ef8be4ec4d88969b4fce5b4e7a7e/libavcodec/vaapi_encode.c#L517

This is because vaMapBuffer() returned 2 packets, caused by the following code in iHD:

pFindTheLastEntry->next = pVACodedBufferSegmentForStatusReport;

It's not clear to me whether the proper fix should be in ffmpeg or in iHD. Any thoughts?

@Tianhaol
Copy link
Contributor

This issue can be reproduced on our side.

wangyan42164 added a commit to wangyan42164/media-driver that referenced this issue Mar 21, 2019
It will cause FFMPEG encoding error.
Fixes intel#409.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
@eero-t
Copy link

eero-t commented May 14, 2019

Issue title is misleading. This issue isn't ICL specific, it happens also e.g. on KBL.

@zhoub
Copy link

zhoub commented May 20, 2019

I have this fixed in FFmpeg as workaround.

zhoub/FFmpeg@493e507

@wangyan-intel
Copy link

This is ffmpeg issue.

@eero-t
Copy link

eero-t commented Aug 29, 2019

This is ffmpeg issue.

There was a comment that it's an issue between media-driver and FFmpeg, and it's not clear which should be fixed.

You would need to make sure there's a bug reported for FFmpeg (link please!) and it's been accepted as FFmpeg issue, before closing this.

@wangyan-intel
Copy link

Media driver will return 2 buffers. One is coded data buffer, another is some additional suggestion info for future encoding. So ffmpeg should ignore the 2nd buffer if it doesn't care theses suggested info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@zhoub @eero-t @Tianhaol @ykku16github @wangyan-intel and others