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

Player not dropping frames, need direction on configuration #61

Closed
jmiller2 opened this issue Aug 7, 2014 · 1 comment
Closed

Player not dropping frames, need direction on configuration #61

jmiller2 opened this issue Aug 7, 2014 · 1 comment

Comments

@jmiller2
Copy link

jmiller2 commented Aug 7, 2014

I am looking at ff_ffplay_def.h There any several constants defined but I cannot find any doc on how setting them affects performance. I plan to put MIN_FRAMES back down to 5 because I don't want to have a lag at startup (I saw another thread on that). However, I am also seeing that the player is not dropping any frames so it gets behind. I want the player to drop frames and keep up as much as possible with the incoming stream as it is from a live camera.

So what do I change to affect frame dropping?

It looks like I may need to modify two things:

  1. change av_sync_type from AV_SYNC_AUDIO_MASTER to AV_SYNC_VIDEO_MASTER especially since I have no audio and
  2. modify DEFAULT_MAX_HIGH_WATER_MARK_IN_MS since I reduced MIN_FRAMES to 5.

Not sure what to set #2 to or if that is even correct.... thanks for any direction

@bbcallen
Copy link
Contributor

bbcallen commented Aug 8, 2014

For android, setAvCodecOption().
For ios, use IJKFFOptions.
Both functions call ijkmp_set_codec_option(), with which you can set ffmpeg options directly, to drop frames/loopfilter in decoder.

Or, you can switch to AV_SYNC_VIDEO_MASTER, which will slow down audio, when video falls behind.

XX_WATER_MARK_XX doesn't effect performance, it just effect how player pre-read data while streaming high bitrate video in bad network traffic condition. I don't known how it works in different situations that I haven't tested, so I can't gurante anything about that.

If you don't care buffering issues, just set them all to zero, or remove codes related.

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

No branches or pull requests

2 participants