Comments (10)
Not at all, I've defaulted to panics simply so it would draw attention to things that fail so they can be fixed.
from owncast.
Awesome, thank you for sending that along, it helped me figure out what's going on with creating a thumbnail from that specific segment. It tries to pull a thumbnail 1 second into a segment, and this particular segment is less than a second long. Changing it to pull from 00:00:00 fixes it:
ffmpeg -i stream-20200618-1592522663.ts -ss 00:00:00.000 -vframes 1 test.png
It would actually make the most sense to find a way to pull the last frame out of the segment instead of a specific timestamp. The last frame would be most relevant for a thumbnail, anyway. And then regardless if a segment is a minute long or less than a second long it won't care. I'm going to look into that.
Thanks again!
from owncast.
Interesting! That's a good find.
If you want to uncomment https://github.com/gabek/owncast/blob/master/thumbnailGenerator.go#L68 you can see the actual ffmpeg invocation. It should be using the most recent segment generated and build a static image out of it. If you want to send along that invocation and that .ts
file that it's trying to use I can reproduce it on my side and find what it's unhappy about.
Also, as an experiment, could you try turning off passthrough
in the config file? I'm curious if re-encoding the incoming stream would fix it.
from owncast.
stream-20200618-1592522663.ts.zip
ffmpeg -y -i webroot/hls/0/stream-20200618-1592522663.ts -ss 00:00:01.000 -vframes 1 webroot/thumbnail.png
Curiously, I noticed that I was getting a ton of dropped frames when running locally. And generally when the dropped frames went up this happened.
I turned off the passthrough
and it happened a lot less but still occurred every so often.
from owncast.
Does the server need to panic when the thumbnail generation fails? Or can that fail silently or without panic?
from owncast.
As for thumbnail generation causing additional issues with dropped frames, I guess it could make sense, since it's doing more work at that particular point in time. Since thumbnail generation is low-priority maybe there's a way we can tell it to not work so hard. I'll look into that too.
from owncast.
Makes sense to me.
I keep getting it now that I've moved to a DO $5 machine. And what's really interesting is that whenever I start streaming, it will be good for a while but then it suddenly starts dropping a ton of frames. Here's a screen recording of it:
Screen Recording 2020-06-18 at 7.17.25 PM.zip
Edit: Which is exactly what you said, it starts working hard for a thumbnail. Maybe have the thumbnail generation an option to turn on/off and a static image instead?
from owncast.
I just pushed a couple thumbnail related changes:
- Use JPG instead of PNG since it seems it's a little faster.
- Limit ffmpeg to using 1 thread.
- Pull the first frame out of the segment instead of a hardcoded location to fix the original crash. I'd still like to pull the last frame, but that requires seeking, and would take longer.
ffmpeg -hide_banner -threads 1 -y -t 1 -i stream-20200618-1592522663.ts -f 0.09s user 0.02s system 97% cpu 0.110 total
ffmpeg -hide_banner -y -t 1 -i stream-20200618-1592522663.ts -f image2 1 0.18s user 0.05s system 161% cpu 0.140 total
It takes longer, but takes less CPU to do so.
Hopefully these changes make some difference. I agree that turning it off completely for people is a valid option, as well as a customizable time (it's hardcoded for every 20 seconds now), but I'd like to see if these changes help.
Let me know if these help!
from owncast.
So far locally, it is working amazing! 👏
However, my DO droplet isn't doing so hot. Both OBS and ProPresenter show they are working fine for about six seconds but then they drop down to under 100 bits per second. So, I don't know if it is the droplet, my internet, or owncast :/ I have poor upload speed, so I'm going to try again tomorrow when I'm somewhere that has ample upload speed.
Will close this issue as it is fixed, so far, and the above paragraph is about something else (seemingly).
from owncast.
Awesome, every little bit helps. Thanks so much for helping with this. I look forward to continue to squeeze more performance out of things so it can work well on a $5 machine. I'm running it under a Linode $5 machine and while it runs, it certainly pegs things. Let me know if there's any other performance increases you can think of when trying it out in your particular environments.
from owncast.
Related Issues (20)
- Large gap in sentence in modal on Mobile HOT 4
- Long Username is clipped when chat is resized HOT 2
- Browser Notifications Modal Message is incorrect on browser HOT 2
- Tags are clipped and unscrollable using Mouse HOT 13
- [Bug] Not sure if GoToSocial bug or Owncast - HOT 1
- Documentation broken link: https://www.contributor-covenant.org/ HOT 2
- Documentation broken link: https://wasabi.com/wp-content/themes/wasabi/docs/Getting_Started/index.html#t=topics%2FCreating_a_User.htm HOT 1
- Documentation broken link: https://wasabi.com/wp-content/themes/wasabi/docs/Getting_Started/index.html#t=topics%2FMaking_Folders_and_or_Files_Public.htm HOT 1
- Documentation broken link: https://wasabi.com/wp-content/themes/wasabi/docs/Getting_Started/index.html#t=topics%2FGS-Buckets.htm%23TOC_Creating_a_Bucketbc-1&rhtocid=_5_0 HOT 1
- Documentation broken link: https://wasabi.com/content-delivery/ HOT 1
- Documentation broken link: https://wasabi.com/wp-content/themes/wasabi/docs/Getting_Started/index.html#t=topics%2FAssigning_an_Access_Key.htm HOT 1
- Remove references to decommissioned broadcast demo server
- A Link broken at Owncast docs page HOT 1
- Owncast Docs: APIs & Access Tokens Enpoint Column points to Page not found HOT 3
- Owncast Mastodon error caught in sidekiq HOT 5
- Admin throwing fatal error HOT 5
- Migrate handler-only models to the codegen'd models HOT 1
- Research and possibly implement a collaboration platform HOT 28
- Following an Owncast server from another local Fediverse instance HOT 4
- Explicitly mention shortcut keys in video player HOT 3
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 owncast.