Giter Site home page Giter Site logo

Comments (14)

jpxiong avatar jpxiong commented on July 29, 2024

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.

jpxiong avatar jpxiong commented on July 29, 2024

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.

alcastelo avatar alcastelo commented on July 29, 2024

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.

jpxiong avatar jpxiong commented on July 29, 2024

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.

alcastelo avatar alcastelo commented on July 29, 2024

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.

jpxiong avatar jpxiong commented on July 29, 2024

Oh, I see. You have customized the ffplay.c. Nice.

from pldroidmediastreaming.

alcastelo avatar alcastelo commented on July 29, 2024

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.

jpxiong avatar jpxiong commented on July 29, 2024

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.

alcastelo avatar alcastelo commented on July 29, 2024

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.

jpxiong avatar jpxiong commented on July 29, 2024

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.

gouravd avatar gouravd commented on July 29, 2024

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.

jpxiong avatar jpxiong commented on July 29, 2024

FFmpeg is for packeting and delivering encoded data. We will packet encoded data to flv by ourselves and delivery by librtmp.

from pldroidmediastreaming.

alcastelo avatar alcastelo commented on July 29, 2024

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.

jpxiong avatar jpxiong commented on July 29, 2024

Thanks.

from pldroidmediastreaming.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.