Comments (7)
It looks like this change might fix the problem with processing of yuvj420p:
- (BOOL) setupVideoFrameFormat: (KxVideoFrameFormat) format
{
if (format == KxVideoFrameFormatYUV &&
_videoCodecCtx &&
(_videoCodecCtx->pix_fmt == AV_PIX_FMT_YUV420P || _videoCodecCtx->pix_fmt == AV_PIX_FMT_YUVJ420P)) {
_videoFrameFormat = KxVideoFrameFormatYUV;
return YES;
}
_videoFrameFormat = KxVideoFrameFormatRGB;
return _videoFrameFormat == format;
}
Unfortunately, the sample still doesn't work with the Axis camera, but that is apparently due to a framerate issue. frame.duration
gets set to zero (because av_frame_get_pkt_duration() always returns zero)), so the app thinks time does not pass and never renders a frame. If I hack it to force it to render a frame when a frame is available, then that frame is displayed properly, so I think the YUV frame decoding is working. Now I just have to figure out the framerate timing.
from kxmovie.
Hi,
Take a look at new branch juvj420p https://github.com/kolyvan/kxmovie/tree/yuvj420p
I added a fix for zero-length frames like you got from web-camera.
And also there is your fix for yuvj420p streams from comment above.
Best wishes.
from kxmovie.
Thanks! That's working pretty well.
My only complaint is that the video displays for a few seconds at a time, then the spinning wheel appears for a couple of seconds while the HUD says "buffering", and then the video displays again, and this cycle keeps going. I'll look at the code, and also check whether the camera is actually generating a continuous stream, but do you know an easy way to get a continuous display without the buffering pauses?
from kxmovie.
The buffering issues are also happened while I'm trying 1080p stream. I think we need a new way to handle buffer ^^
from kxmovie.
See commit bc398e2
I added ability to completely disable buffering via setting KxMovieParameterMinBufferedDuration parameter to zero.
parameters[KxMovieParameterMinBufferedDuration] = @(0.0f);
For testing, uncomment line 212 in KxMovieExample/MainViewController.m and play your rtsp stream.
from kxmovie.
That's working perfectly.
Thank you for all your assistance.
from kxmovie.
Thank you for your contribution in project.
I merged branch yuvj420p into master.
from kxmovie.
Related Issues (20)
- 编译失败,原因如下,bitcode设置为NO后有别的库报错。有没有包含bitcode的库呢?
- 如何设置kxmovie打开视频的宽高比?以16:9或者4:3打开
- iphone5, iOS 10.3.2 can't play
- FFMpeg读取内存数据NSData用了AVIOContext * avio_in =avio_alloc_context(inbuffer,32768*20,0,NULL,read_buffer,NULL,NULL)
- Cannot make project run HOT 5
- 不支持 rtp 吗,如果支持的话,怎么设置sdp文件呢 HOT 9
- Bult failed HOT 1
- 支持h265么?硬解怎么设置??
- 'libavutil/avconfig.h' file not found HOT 1
- 编译起来到处报错........................... HOT 7
- How to customise kxmovie player
- 支持h265吗?
- rake failed HOT 1
- rake fail HOT 1
- 声音卡顿问题 播放卡顿
- add filter
- Suggestion
- 你好,我的场景是:iOS需要播放加密的m3u8文件,后台把每个ts地址进行加密,客户端进行解密后播放,请问支持吗?现在解密每个ts已实现,该怎么播放?希望得到您的帮助。 HOT 1
- 关于版权
- Need to feature
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 kxmovie.