Comments (37)
I've seen the sourceforge link, but the include directory is empty.
from mdk-sdk.
I will upload new packages and push headers tomorrow
from mdk-sdk.
1 day later.
from mdk-sdk.
Out of curiosity. Does your player also use OMX_UseEGLImage() or just renders natively on RPI?
from mdk-sdk.
I use mmal and eglimage. I have studied omx and how to get max rendering performance. A generic solution is providing custom buffer header. But not sure what is it on rpi, maybe vcsm. Another is eglimage.
from mdk-sdk.
I was experimenting with openmax api on the Raspberry Pi for the last month, but I'm still struggling with achieving satisfying results. The goal is to draw the video on the sfml texture that would allow me to make transforms like rotate/pinch/skew. For now I just have it drawing on the opengl texture, but I get tearing. When I added double buffering I get uneven framerates. Would you share a little insight on this matter?
from mdk-sdk.
This is supposed to be a replacement for the current implementation that uses mmal decoder and sws_scale, and then updating sfml image with a pixel buffer which has terrible performance caused by copying the frames 3 times between CPU-GPU memory.
from mdk-sdk.
For now I just have it drawing on the opengl texture, but I get tearing.
How do you draw the frames?
I use an egl extension to convert decoded frame to eglimage(you can find it in official examples), then use eglimage as a texture. cpu load < 15% for 1080p videos, a litter higher than omxplayer, but better than others.
btw, how do you create an eglimage for omx?
from mdk-sdk.
This is a fork of another media player I'm trying to adapt to work with Attract Mode on the Raspberry Pi
https://github.com/oomek/rpi-mediaplayer
I use OMX_UseEGLImage on a set of gl textures and alternate between them. Then I draw using opengl. Later I'm planning to integrate it with sfml so I take texture.getNativeHandle() and decode with OMX.
Unfortunately there is tearing when I draw directly with single buffer on the texture and double/triple buffering would be an overkill for the RPI. Attract Mode is a frontend that can play multiple videos at the same time, so memory management is crucial.
Thi is the reason I'm looking for alternatives. Attract Mode uses mmal currently, but I haven't found any way to bind the mmal output to sfml texture with zero copy.
from mdk-sdk.
When writing mmal decoder, I find playback is not smooth if input/output port buffer number and size is not good. Maybe omx is the same.
from mdk-sdk.
You mean the i/o buffer of the video_decode or egl_render module?
from mdk-sdk.
from mdk-sdk.
I've tried querrying this:
OMX_PARAM_U32TYPE extraBuffers;
OMX_INIT_STRUCTURE(extraBuffers);
extraBuffers.nPortIndex = 130;
OMX_GetParameter(ILC_GET_HANDLE(video_decode), OMX_IndexParamBrcmExtraBuffers, &extraBuffers);
printf("OMX_IndexParamBrcmExtraBuffers: %u\n", extraBuffers.nU32);
But it's already 16. Even if I set this to 256 it has no effect on stuttering. I'm out of ideas.
Sorry for mistake. I've corrected the struct type and the property name from nSize to nU32.
This value was 2, I've set it to 8, but it still stutters.
from mdk-sdk.
what about port buffers? not extra buffers.
new sdk is uploaded.
from mdk-sdk.
nBufferCountActual on the port 131 ( video_decoder output ) is 0
nBufferCountActual on the port 130 ( video_decoder input ) is 20
What value would you advise to set it to?
I've checked the new sdk for the Raspberry Pi , but the headers are still missing.
from mdk-sdk.
Default values may not work well without special code path.
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/VideoPlayer/DVDCodecs/Video/MMALCodec.cpp#L519
headers are in include dir. which one did you download? latest is https://sourceforge.net/projects/mdk-sdk/files/mdk-sdk-rpi.tar.xz/download
from mdk-sdk.
I must have downloaded the wrong file. The headers are there, thanks.
I've tried the mdkplay with my test videos, and I observe severe stuttering with 30fps files. Strangely 60fps files up to 720p play smoothly
from mdk-sdk.
export MDK_LOG=1
./mdkplay -c:v MMAL videofile
then you will see log, can you paste the log here?
from mdk-sdk.
Oh wait. it's just the console log. I did not refresh the page.
https://pastebin.com/6HwuwM2M
from mdk-sdk.
from mdk-sdk.
Btw, The log is showing regardless of the MDK_LOG value
from mdk-sdk.
Can you upload your video clip?
from mdk-sdk.
test480p30.zip
Play the first few seconds repeatedly as the stuttering is most visible in the beginning.
from mdk-sdk.
squares.zip
Here are some better examples.
from mdk-sdk.
Too slow to download from github. You can upload to https://0x0.st
from mdk-sdk.
from mdk-sdk.
Because the frame rate is to small. You can try other players on desktop, the same result.
from mdk-sdk.
Other players work fine, omxplayer also have no issues playing it without stuttering.
from mdk-sdk.
Works fine on my pi 3b+. What's your device?
from mdk-sdk.
Hold on, I might have sent you a corrupted file.
https://0x0.st/zPxB.zip
Those I've tested in mpc-hc, vlc and omxplayer and the playback of 480p30 is smooth
from mdk-sdk.
3b+
from mdk-sdk.
What is your firmware version ? uname -a
Linux retropie 4.19.30-v7+ #1209 SMP Tue Mar 26 13:14:20 GMT 2019 armv7l GNU/Linux
from mdk-sdk.
Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
from mdk-sdk.
Are you certain that the video with 30fps I sent you do not stutter? This is weird. Are the ffmpeg libs in your player statically linked or shared?
from mdk-sdk.
Stutters like omxplayer. The same result on my mac using mpv or ffplay.
FFmpeg is statically linked. I plan to add an option to choose ffmpeg shared libs at runtime.
from mdk-sdk.
Just to make sure, you have tested the second link i posted https://0x0.st/zPxB.zip ? The 30fps inside do not stutter for me on any player, except mdk.
from mdk-sdk.
I downloaded wrong file. I see the stutter
from mdk-sdk.
Related Issues (20)
- 在i7-7700、显卡P2000的设备上,解码5760 3240 h265编码的视频,出现卡顿、音视频不同步问题 HOT 12
- Freezing Issue When Quickly Switching Videos HOT 1
- QR Code watermark showing HOT 7
- qt android mdk播放mp3,切换音乐时大概率出现杂音 HOT 2
- Changing decoders on Player make others turn blank [open source reproducer] HOT 8
- set FPS for multiple player? HOT 4
- How to get a list of current active tracks HOT 1
- Set Bitrate HOT 1
- 视频中间显示了一个二维码 HOT 1
- [Android]: SetGlobalOption("subtitles.fonts.dir", ...) does not work HOT 2
- setMedia("avdevice://gdigrab:desktop") HOT 2
- 关于RTMP延迟问题 HOT 1
- mdk中可以设置加密解密参数吗? HOT 19
- mdk的倍速setPlaybackRate不支持264/265裸流文件? HOT 3
- mdk支持大分辨率的MP4文件硬解码吗 HOT 5
- Customize subtitles apprearance HOT 2
- Improving the example of Android java wrapper
- Multi audio channels support HOT 7
- .ts h265 HOT 2
- ffmpeg 7 support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mdk-sdk.