Comments (13)
I try to play stream using ffplay from terminal and there was a latency for ~1 second.
Also what is the best to integrate this library in another project because currently files being used are very scattered.
from ijkplayer.
Modify these macros to reduce latency.
#define DEFAULT_HIGH_WATER_MARK_IN_BYTES (128 * 1024)
#define DEFAULT_MAX_HIGH_WATER_MARK_IN_MS (5 * 1000)
#define DEFAULT_NORMAL_HIGH_WATER_MARK_IN_MS (2 * 1000)
#define DEFAULT_FAST_HIGH_WATER_MARK_IN_MS (100)
#define MAX_QUEUE_SIZE (15 * 1024 * 1024)
#define MIN_FRAMES 50000
from ijkplayer.
FYI, The original MIN_FRAMES in ffplay is
#define MIN_FRAMES 5
from ijkplayer.
Thank you, but I have now other questions.
I must change these values af ff_ffplay_def.h , is right ?
Can you suggest me some value ?
I could set
#define DEFAULT_MAX_HIGH_WATER_MARK_IN_MS ( 1000)
#define DEFAULT_NORMAL_HIGH_WATER_MARK_IN_MS (500)
#define DEFAULT_FAST_HIGH_WATER_MARK_IN_MS (100)
#define MIN_FRAMES 5
but these ????
#define DEFAULT_HIGH_WATER_MARK_IN_BYTES (128 * 1024)
#define MAX_QUEUE_SIZE (15 * 1024 * 1024)
After edit file, from which step of your guide I have to start with the compilation? ndk-build ???
I've read something about analyzeDuration :
https://bbs.vitamio.org/topics/220/parts/51751e9d1b27a78e1c0000fe?locale=zh-CN
It can help ?
from ijkplayer.
Your value is fine, ndk-build is enough.
The macros should work with HLS. But for rtsp/rtmp/etc, I don't have much knowledge about them.
The analyzeDuration can be set through ijkmp_set_codec_option(), which could be easily exposed to java layer as ijkmp_set_format_option() does.
from ijkplayer.
with these values I have a delay of 3 secs ... now is better.
I have rtsp stream, so this values work with rtsp too.
But now how can I further reduce the delay?
from ijkplayer.
Set these values to 0 is OK. In fact, the original ffplay doesn't have these limit.
#define DEFAULT_MAX_HIGH_WATER_MARK_IN_MS (0)
#define DEFAULT_NORMAL_HIGH_WATER_MARK_IN_MS (0)
#define DEFAULT_FAST_HIGH_WATER_MARK_IN_MS (0)
I add them for streaming video on network with bad quality traffic.
Also have a look at these code commented out by me.
#ifdef FFP_MERGE
if (is->paused != is->last_paused) {
is->last_paused = is->paused;
if (is->paused)
is->read_pause_return = av_read_pause(ic);
else
av_read_play(ic);
}
#endif
#if CONFIG_RTSP_DEMUXER || CONFIG_MMSH_PROTOCOL
if (is->paused &&
(!strcmp(ic->iformat->name, "rtsp") ||
(ic->pb && !strncmp(ffp->input_filename, "mmsh:", 5)))) {
/* wait 10 ms to avoid trying to get another packet */
/* XXX: horrible */
SDL_Delay(10);
continue;
}
#endif
I'm not sure if they are related to the delay.
from ijkplayer.
I confirm that MIN_FRAMES 5 reduce delay, but video stream is less stable on long durate. Videoview often goes in error state.
I don't see improvements by varying other parameters
from ijkplayer.
No idea at all. Try your local ffplay from apt-get, yum, macport, hombrew, blablabla.
from ijkplayer.
What's the meaning "FFP_MERGE".
from ijkplayer.
I'm getting a delay of 4-7 seconds on iOS using this library while ffplay has <=1 second delay on mac using local wifi. Any idea how to resolve this issue?
from ijkplayer.
Which client do you get under 1 second latency ?
Are you sure that both your clients use same transport layer ?
from ijkplayer.
I try to play an UDP stream and I am experiencing a significant delay, about 7 seconds.
I have modify the macros in ff_ffplay_def.h and re-compile the library by running the compile-ffmpeg and compile-ijk again. However, the delays remains the same.
Any idea why? Is there any macros that needs to be changed as well?
from ijkplayer.
Related Issues (20)
- 连相机rtsp几分钟后卡死在页面 HOT 1
- iOS 播放rtsp后,即使重新初始化播放器也无法播放http视频 HOT 1
- make: *** No rule to make target `install-libs-yes', needed by `install-libs'. HOT 1
- 在编译./compile-openssl.sh all 时报错 Invalid argument,报错信息如下,查看../include/openssl/opensslconf.h 发现文件大小为0,请问哪里出问题了 该如何解决
- 播放器crash HOT 1
- Android,加上参数编译支持pcm_alaw的音频解析,但是还是没有声音
- well-maintained derived project
- error: invalid argument '-std=c99' not allowed with 'C++' HOT 1
- Private manifest计划 HOT 2
- 通过切换成硬件解码以后到显示图像要2s,这个是我配置的原因么
- avformat.h文件
- 音频channels=2的时候,在线视频播放卡顿
- 编译项目时 ffmpeg_arm64 指针类型报错 HOT 4
- iOS 同时拉两路RTSP流,会导致卡顿,但是单独拉任何一路是不卡的,延迟200ms左右 HOT 5
- ijkplayer和videocache组合使用时 拖动进度条未播放相应位置 HOT 2
- 使用有gpl感染的风险吗
- Mac M3芯片 14.4.1 iOS SDK 17.4.1 执行 ./compile-ffmpeg.sh all armv7 和 arm64 分别都有报错 HOT 1
- when play multiple video at the same time ,and then click a vide to play full screen,crash:because it is using too much memory. HOT 2
- m3u8 有些链接播放很慢20s才能加载出来
- iOS 播放h264编码格式的视频卡顿 HOT 1
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 ijkplayer.