Comments (10)
If someone could point me to some info on how the buffering is supposed to work I would be happy to look into this issue. Really just looking for some pointers on where to start looking :)
from omxplayer.
Does running with 0.1 instead of 0.5 for fifo/buffer sizes help?
When you run with "-s" what values does "V:" and "S:" stabilise at?
from omxplayer.
0.1 doesn't work, here is the lowest values I have found that do work. It is odd that the audio_fifo tag is in seconds where the rest are in MB.
./vsmedia -s --video_fifo 0.25 --video_queue 0.25 --audio_fifo 2 --audio_queue 0.05 --threshold 0.1 udp://@192.168.1.128:5006
This yields a latency of about 7 seconds
Status
M:21895958 V: 1.69s 240k/ 240k A: 0.73 1.02s/ 2.00s Cv: 235k Ca: 24k
This shows the input cache basically full, with the output clock being presumably driven by trying to keep the output audio fifo centered at 50%. But the video output buffer is too small for that, so these numbers don't make sense....
from omxplayer.
V: = video_fifo in seconds (video_fifo is set via command line in MB, but 250Kb is not enough for 1.7s delay in 720p ???
m_player_video.GetDecoderBufferSize()-m_player_video.GetDecoderFreeSpace() / m_player_video.GetDecoderBufferSize() in Kb
What is decoder_buffer and why is it kept full?
A: = audio_fifo in seconds?
m_player_audio.GetDelay() / m_player_audio.GetCacheTotal() also in seconds?
CV = m_player_video.GetCached() in kb
ca = m_player_audio.GetCached() in kb
Audio is AAC 128kbps, so 16Kb would be 1 second of input audio. With a audio queue of 50Kb that should be 3.125 seconds ...
I guess I just don't understand how the buffers are allocated and used enough to know how to set the parameters.
from omxplayer.
Ok, found the problem. FFMPEG is buffering all the data it uses for stream format analysis. Just have to add the flag below to correct (when opening the stream).
// discards the frames buffered during stream analysis
m_pFormatContext->flags |= AVFMT_FLAG_NOBUFFER;
That said, there are still more issues elsewhere in the pipe. I don't think the OMX clock adjustment is working properly...
from omxplayer.
What file / line did you add the flag to to make FFMPEG not buffer the data?
from omxplayer.
OMXReader.cpp
Insert it after this line
m_pFormatContext->flags |= AVFMT_FLAG_NONBLOCK;
However, you should only do this on live streams otherwise you can cutoff the start of files.
from omxplayer.
Okay so that worked.
I am trying to use the PI as a low latency Video Decoder. Adding the NOBUFFER flag dropped the latency in half to about 2 seconds.
Any recommendations on getting it even lower? I am trying to get it below 400 ms if it is possible.
Thanks
from omxplayer.
See #55
from omxplayer.
I believe this is resolved. Please report additional issues on
#55
from omxplayer.
Related Issues (20)
- OMX-unable to initialize HOT 5
- Videos are lagging when playing 2 Video on 2 Screens HOT 1
- IPTV live stream stop playing HOT 2
- Playing audio to individual HDMI HOT 2
- Volume control while playing HOT 3
- install in other arm machine HOT 1
- Cannot play audio over bluetooth after reboot HOT 1
- Omxplayer and bluealsa
- DBus.Error.ServiceUnknown HOT 1
- Omxplayer with Argon One v2 ir remote
- Package 'libssl1.0-dev' has no installation candidate HOT 1
- when i make -j$(nproc),there have an error HOT 5
- omxplayer doesn't play live stream, playing local mp4 video works though HOT 1
- Will omxplayer stop working eventually? HOT 2
- DBUS Name Control problem HOT 1
- pi and sound HOT 1
- Any plans to adapt for Raspberry Pi 4?
- Fixes #939
- libva1 deprecated HOT 1
- omxplayer has 20s delay on raspberry pi live stream 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 omxplayer.