Comments (2)
@willynlabs Glad that you have found this project useful!
I haven't been following the recent updates to FFmpeg so I wasn't aware of this new flag. FFmpeg is a monster tool so even finding out good flags to use is a task in itself 😄
Unfortunately, since LHLS is both an experimental flag and the RFC has not been approved I'm very reluctant to add it into the main branch of raspi-live.
That being said, this LHLS feature sounds like a good thing that should be added by default to the HLS streaming option for raspi-live once the RFC and the FFmpeg feature is in better standing. We'd basically just throw it into this list. We'd also want to confirm that raspi-live still works with older versions of FFmpeg that do not have this flag (and if it doesn't, update the README / package version accordingly).
I encourage you to experiment with the feature though on your own cloned repository so that you can try to recognize those performance gains. You'd just add the option to that section of code I linked, uninstall the main raspi-live application if you've already installed it (npm unintall raspi-live -g
), and install your modified version (npm install -g
).
Both HLS and MPEG-DASH are inherently latent video streaming technologies because they chunk up the video into downloadable segments. I don't think you're ever going to get truly realtime streaming with either technology. RTMP is a possible contender to reduce that latency but it has its own can of worms.
Thanks for bringing this to my attention! I'll keep this open so that we can remember to keep checking in.
from raspilive.
@jaredpetersen thanks for the response.
I probably sent this question prematurely. I did a deep dive on the -lhls support in FFmpeg, and discovered that it was based on an early spec put forth by the folks behind hls.js (more on that later). I learned from another thread that this has now been replaced by the Apple spec, which uses a different output token in the m3u8 file(s).
The old flag was actually implemented in the dash encoder and required additional options to output the m3u8 files in parallel with the dash files. There was a pretty big 'gotcha' with that because you could not use the file protocol, but had to use an url protocol (with the -method option) instead.
I prototyped all of this by invoking FFmpeg from the command line directly, but found it really did not produce that much less latency than just tuning the original parameters.
I wound up using hls.js and the dash encoder with the -hls_playlist option, and got my latency down to about 1-2sec. hls.js does a good job of keeping the video updated on a 'live' stream, and it is even a bit better than the 'native' hls support on Safari.
(My application involves a camera mounted on a pan-tilt assembly, and I want to control in remotely for construction inspection. Target latency is 1-2 sec so it feels responsive.)
I am thinking about how to make the various command options in raspi live more extensible, and I did notice your issue related to 'refactoring' and the option of removing the cli module. Seems like that might be the way to go.
from raspilive.
Related Issues (20)
- Stream (m3u8 format) cannot be played on iOS devices HOT 3
- took over my desktop HOT 7
- Shows that it is running, but no m3u8 file is generated HOT 19
- Run at boot HOT 1
- Image Rotation HOT 2
- Support ability to choose between fmp4 or mpegts with HLS HOT 3
- Old segment files are not removed when service is stopped and started again HOT 1
- Configuration Refactor HOT 2
- question - how can I set brightness and saturation parameters? HOT 2
- ffmpeg fails to compile on newest version of raspbian HOT 3
- Instructions need a little update to force link atomic lib. HOT 2
- Returns 404 HOT 1
- GO Rewrite HOT 1
- Debian packaging HOT 1
- CORS configuration HOT 5
- How many parallel connections it can handle? HOT 2
- Installation Instructions HOT 1
- [Question] How do I see the stream on the browser HOT 3
- SSL streaming 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 raspilive.