Comments (14)
PLDroidCameraStreaming
is only to catch the video/audio data, encode them and send them. If the network is not good, PLDroidCameraStreaming
will drop the old frame simpley. SO it won't happen latency on the PLDroidCameraStreaming
side.
PLDroidPlayer will have no buffering in ffmpeg layer if you set the fflags
to nobuffer
, as the following:
options.setString(AVOptions.KEY_FFLAGS, AVOptions.VALUE_FFLAGS_NOBUFFER); // "nobuffer"
You can check the -fflags nobuffer
from here.
from pldroidmediastreaming.
BTW, We are going to remove the ffmpeg dependency from PLDroidCameraStreaming
, and we just use the ffmpeg to packet and delivery the encoded datas.
from pldroidmediastreaming.
Great news from the streamer side!!
In the PLDroidPlayer layer, i made a little dirty hack, that seems to reduce greatly the latency.
Since our toruble, cames from network traffic, I removed the nobuffer fflag, to make sure the player is reading from network as fast as posible into the buffers, and make the player discard every frame except the last one. I change latency for little dropouts.
Its a very dirty solution, but seems to avoid almost all the latency on the player side
Thanks again.
from pldroidmediastreaming.
NO. If you remove the nobuffer flag, you can't play the newest frame, but the frame which buffering some time. So the latency will happen.
from pldroidmediastreaming.
Im discarding every frame in buffer except the last one (inside the ffplay.c).
Ill make a copule of test more, but the latency realy improves drastically, at least in my case
from pldroidmediastreaming.
Oh, I see. You have customized the ffplay.c
. Nice.
from pldroidmediastreaming.
if you want to give it a try, i think i could try to make a fork of your project, so you can test the latency on your network.
from pldroidmediastreaming.
That's great!
But i guess there is a problem: if the network jitter happens, you can't watch a smooth video(or blurred screen), as you discarding every frame except the last one. I think the user experience is not good.
from pldroidmediastreaming.
Really, user experience degrades as frames are discarded, but in this case, we really need the lowest latency posible, and sacrifice a little video quality seems feasible.
Anyway, I appreciate greatly all your work, and i will try to make the fork as soon as i can
Thanks again.
from pldroidmediastreaming.
You are welcome. Any issue can discuss here.
I will try your strategy later. Please let me know if it's ready. Thanks.
from pldroidmediastreaming.
Could you elaborate a bit on this? What is the current dependency of FFmpeg
as of v1.3.0.
Once you remove the dependency on FFmpeg, how would you allow to stream to
rtmp?
On Aug 24, 2015 8:15 PM, "jpxiong" [email protected] wrote:
BTW, We are going to remove the ffmpeg dependency from
PLDroidCameraStreaming, and we just use the ffmpeg to packet and delivery
the encoded datas.—
Reply to this email directly or view it on GitHub
#18 (comment)
.
from pldroidmediastreaming.
FFmpeg is for packeting and delivering encoded data. We will packet encoded data to flv by ourselves and delivery by librtmp.
from pldroidmediastreaming.
Hi there.
Sorry for the delay, i was a little busy yesterday.
If you want to make some test, there is a repository for the library here https://github.com/alcastelo/ijkplayer. Only one file has changed, maybe it will be faster for you to copy it and recompile.
Remenber to remove the -fflags nobuffer.
I now the hack is veryyyy ugly, but this is only a proof of concept.
Sorry about the inconveniences, and thanks for your time and work
from pldroidmediastreaming.
Thanks.
from pldroidmediastreaming.
Related Issues (20)
- Youtube rtmp link not working HOT 1
- 录屏推流需要使用CameraPreviewFrameView吗?
- 视频进度条 HOT 1
- Access denied finding property "camera.aux.packagelist"
- 推流端预览左右两边有黑色 HOT 1
- 如何推流前预览? HOT 1
- 开始推流后 返回状态码 streamingState = UNAUTHORIZED_STREAMING_URL extra = -3 HOT 1
- 快速开始是不是已经不能快速开始了? HOT 1
- targetSdkVersion 29录屏会闪退 HOT 1
- 编译报错,与我的项目中使用的库有冲突? HOT 2
- 通过captureFrame截帧,图像变形。
- 引用happy-dns,还报NoSuchMethodError错误 HOT 4
- No static method defaultResolver() HOT 3
- Issue with the support of 64 bit libraries.
- Unauthorized Package while starting the Streaming
- Pili Streaming not working with Pili Android Version 2.4.0
- activity添加两个fragment,使用懒加载,第二个fragment,无法调起相机 HOT 1
- 最新Demo运行不起来 HOT 3
- 急急急,请问为啥下载的apk demo是牛直播,github上下载的代码跑起来又不像同一个app
- 播放器拉流问题
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 pldroidmediastreaming.