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

How to fully disable buffering? #68

Closed
AbelCS opened this issue Aug 21, 2014 · 5 comments
Closed

How to fully disable buffering? #68

AbelCS opened this issue Aug 21, 2014 · 5 comments
Labels

Comments

@AbelCS
Copy link

AbelCS commented Aug 21, 2014

Hi, What's the better way to fully turn off stream buffering?

I've found the XX_HIGH_WATER_MARK_XX, MIN_FRAMES and MAX_QUEUE_SIZE but I don't know whats the purpose of them beyond the comment that explains START and NEXT. Can you explain it to me or give me any reference to documentation?

I have tried different values and always noticed at least 2 seconds delay compared to ffplay when consuming the same stream simultaneously.

I'm trying with this values now:

captura de pantalla 2014-08-21 a la s 16 48 44

Thanks a lot.

Best regards.

@AbelCS AbelCS changed the title Disabling buffering How to fully disable buffering? Aug 27, 2014
@bbcallen
Copy link
Contributor

If you want to disable them permanently, just remove/restore buffering related macro and code no in original ffplay.c

@AbelCS
Copy link
Author

AbelCS commented Sep 16, 2014

Ok, thanks for your reply, I'll try it asap and if I got it working I'll close this issue.

@masudo
Copy link

masudo commented May 18, 2015

I'm not sure if my issue is related to this issue or not but the problem is our server streams flv/h264 at 256kbs rate and the server speed is stable and high, if i play the stream using linux ffplay or mplayer everything is ok and smooth without interruption.

The problem is when we use ijkplayer on android, most of the time ijkplayer starts getting the stream and play the stream and buffering at the same time but after like 10 seconds or more it stops buffering and countinue plays like 10 seconds more(no data is received in while it plays from buffer) and then playing stops, what do you suggest now? can you tell me how can I make ijkplayer buffer all the time or disable buffering ? and which file should I change?

@bbcallen
Copy link
Contributor

ijkplayer does buffer all the time, but if buffered duration/size is not enough, it pauses and waits for enough data to be filled, to avoid frequent buffering.

Have a look at ffp_check_buffering_l() in ff_ffplay.c, and macros in ff_ffplay_def.h

#define DEFAULT_START_HIGH_WATER_MARK_IN_MS     (100)
#define DEFAULT_NEXT_HIGH_WATER_MARK_IN_MS      (1 * 1000)
#define DEFAULT_MAX_HIGH_WATER_MARK_IN_MS       (5 * 1000)

#define BUFFERING_CHECK_PER_BYTES               (512)
#define BUFFERING_CHECK_PER_MILLISECONDS        (500)

#define MAX_QUEUE_SIZE (10 * 1024 * 1024)
#define MIN_FRAMES 50000

@noamtcohen
Copy link

@AbelCS were you able to solve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants