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

is there any good players written in C# using FFmpeg.AutoGen? #272

Closed
jcyuan opened this issue May 13, 2023 · 8 comments
Closed

is there any good players written in C# using FFmpeg.AutoGen? #272

jcyuan opened this issue May 13, 2023 · 8 comments

Comments

@jcyuan
Copy link

jcyuan commented May 13, 2023

better can output frame pixel data without rendering?
thanks.

@Ruslan-B
Copy link
Owner

Closing it now, they are even example does it.

@jcyuan
Copy link
Author

jcyuan commented May 14, 2023

ok, sorry,

actually i have implemented everything already: demux, decoding, rendering are seperated into different thread.
but just the performance is not very good, it takes some extra CPU, so i wanna know some suggestions.

@zgabi
Copy link
Contributor

zgabi commented May 14, 2023

You should check ffmediaelement: https://github.com/unosquare/ffmediaelement
It is quite good, however not maintained anymore.. it is using ffmeg 4.x

And you should check your code with memory profiler. You should not allocate any object during the the play (after initialization of course)
And you should avoid copying the decoded frame's pixel data. (so decode directly to the required destination memory area)

I'm decoding several fullHD (or bigger) H.265 streams without any noticable cpu usage.

@jcyuan
Copy link
Author

jcyuan commented May 15, 2023

You should check ffmediaelement: https://github.com/unosquare/ffmediaelement It is quite good, however not maintained anymore.. it is using ffmeg 4.x

And you should check your code with memory profiler. You should not allocate any object during the the play (after initialization of course) And you should avoid copying the decoded frame's pixel data. (so decode directly to the required destination memory area)

I'm decoding several fullHD (or bigger) H.265 streams without any noticable cpu usage.

actually i guess i can't avoid to copy pixels from ffmpeg, because i need to upload the frame pixels decoded by ffmpeg to OpenGL, i used PBO to upload.
not sure if there are some ways out there to map ffmpeg frame pixels to OpenGL FBO/Texture directly in the back without dealing with CPU?
anyway thanks for your suggestion, i'll dig into this project to find how it renders.

@Ruslan-B
Copy link
Owner

Ruslan-B commented May 15, 2023

I think the better you describe the problem and why you need solve one is a key - we might but cannot guess 100% here, as fairly cheap memory to memory copy is not would you can expect in real life as you talking about GPU, has nothing to do with this project rather than expectations.

@jcyuan
Copy link
Author

jcyuan commented May 15, 2023

I think the better you describe the problem and why you need solve one is a key - we might but cannot guess 100% here, as fairly cheap memory to memory copy is not would you can expect in real life as you talking about GPU, has nothing to do with this project rather than expectations.

ok,~ thanks anyway! 😉

@afunc233
Copy link

@jcyuan https://github.com/SuRGeoNix/Flyleaf look this,DirectX instead of OpenGL ,I am also interested in opengl

@jcyuan
Copy link
Author

jcyuan commented Jun 25, 2023

@jcyuan https://github.com/SuRGeoNix/Flyleaf look this,DirectX instead of OpenGL ,I am also interested in opengl

thanks! ❤

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

No branches or pull requests

4 participants