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)
- 如何解析自定义metata呢
- Help for pinch to zoom HOT 4
- Fast Rewind and Fast Forward
- Call to undeclared function 'av_dict_get'; ISO C99 and later do not support implicit function declarations HOT 2
- crash thread
- thread
- Android如何处理视频源信息在尾部的情况 HOT 1
- ijk 编译版本k0.8.8 ,ffmpeg是4.0版本,播放av1格式的视频,听到音频,视频没出来,日志显示没有找到视频的解码器,求帮助!
- 怎么编译出Mac版本的库
- 长时间播放RTSP奔溃:Fatal signal 11 (SIGSEGV), code 1,faut addr 0xfc in tid 7962 (RenderThread)
- 屏蔽声音问题
- 按照官方步骤编辑 运行官方demo 报 Showing All Messages Linker command failed with exit code 1 (use -v to see invocation)
- 一直无法播放RTSP视频流
- No accelerated colorspace conversion found from yuv422p to rgba.
- ipcamera 时间校准接口有吗
- ijkplayer 边播边录像。遇到没有音频的视频,录像失败,报sample rate 为0 怎么处理
- iOS k0.8.8 Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found,怎么解决? HOT 5
- 播放视频地址为下载地址,播放不了
- WARNING: arm-linux-androideabi-pkg-config not found, library detection may fail. tools/do-compile-ffmpeg.sh: line 309: 14111 Segmentation fault: 11 make clean 构建出现了这问题,电脑是Apple的M1.. HOT 1
- 进度条拖动快进快退崩溃 HOT 4
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.