Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

A player demo based on the ffmpeg libyami #8

Open
zackxue opened this issue Jul 13, 2016 · 7 comments
Open

A player demo based on the ffmpeg libyami #8

zackxue opened this issue Jul 13, 2016 · 7 comments
Assignees
Labels

Comments

@zackxue
Copy link

zackxue commented Jul 13, 2016

hi
is there has a demo player like https://github.com/01org/player-ffmpeg-yami?
based on the ffmpeg libyami, like the example in the libyami

@mypopydev
Copy link
Contributor

No, it's enable libyami in ffmpeg like ffmpeg-libx264-style, so I think you can used the option "-vcode libyami_h264" when used ffplay.

@mypopydev mypopydev self-assigned this Jul 13, 2016
@zackxue
Copy link
Author

zackxue commented Jul 13, 2016

I think if use the ffplay, the ffplay use sdl render, the performance is not the best, because the libyami use va_surface for render. could you give some example use the va_surface from ffmpeg demo ?

@mypopydev
Copy link
Contributor

mypopydev commented Jul 14, 2016

We have a SSE4 optimization, so SDL render is OK ( you can check the CPU usage when use ffplay). And now we're busying in Code refactoring/Transcode performance tune , so can't supply this example in a short time, sorry. I hope I can give some suggestion if you like.

Used libyami_h264 decoder as example, if you don't want to move the GPU surface to CPU memory before render, you can use YAMI as output format when used libyami_h264 decoder, it's will decode as surface, then you can use va_surface() render it.

@zackxue
Copy link
Author

zackxue commented Jul 25, 2016

Thanks a lot, and for the VPP and Encoder, only the AV_PIX_FMT_YAMI support or i can send the AV_PIX_FMT_YUV420P or the AV_PIX_FMT_NV12, is there has some sample for trancoding and VPP?

@mypopydev
Copy link
Contributor

Now ffmpeg_libyami can mix the HW/SW decoder/encoder, so yon can send the YUV420P/NV12 to libyami_encoder/vpp, you can used the command as reference:

./ffmpeg -y -c:v h264 -i input.mp4 -vf "yamivpp=w=1920:h=1080" -c:v libyami_h264 test.mp4.

In this case, ffmpeg h264 native decoder will get raw NV12 or YUV420p frame, then pass it to VPP/libyami_encoder.

@zackxue
Copy link
Author

zackxue commented Jul 26, 2016

Thanks
./ffmpeg -y -c:v h264 -i input.mp4 -vf "yamivpp=w=1920:h=1080" -c:v libyami_h264 test.mp4.
If the input is 1080 x 720, this case the yamivpp will up scale to 1920 x 1080 and encode to test.mp4?

@mypopydev
Copy link
Contributor

@zackxue Yes

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

No branches or pull requests

2 participants