timvideos / streaming-system

Tim Video's - Live Streaming for user groups and other events.
https://code.timvideos.us/
Apache License 2.0
131 stars 52 forks source link

Add script to check and show no-signal preview #79

Closed ApsOps closed 9 years ago

ApsOps commented 9 years ago

When collectors error, encoders change to "hungry" for feed. In this situation, previews change to a "No signal" image.

mithro commented 9 years ago

@aps-sids Still a couple of comments on this to reply.

ApsOps commented 9 years ago

I am still thinking, how to go about using argparse and config.json, will probably look at it this weekend.

mithro commented 9 years ago

@aps-sids I'd love to use this. What do you think is left to finish this off?

ApsOps commented 9 years ago

@mithro It needs to be merged with the generate.sh script, removing whole hard-coded stuff.

mithro commented 9 years ago

@aps-sids Now you have some time, can you take another look at this?

ApsOps commented 9 years ago

pngcrush functionality needs to be added.

CarlFK commented 9 years ago

What is pngcrush?

On Wed, Feb 4, 2015 at 1:48 PM, Amanpreet Singh notifications@github.com wrote:

pngcrush functionality needs to be added.

— Reply to this email directly or view it on GitHub https://github.com/timvideos/streaming-system/pull/79#issuecomment-72924927 .

Carl K

ApsOps commented 9 years ago

Images created by this are >100 KB in size so we need to compress them. Take a look at existing generate.sh script. On Feb 5, 2015 1:59 AM, "Carl Karsten" notifications@github.com wrote:

What is pngcrush?

On Wed, Feb 4, 2015 at 1:48 PM, Amanpreet Singh notifications@github.com wrote:

pngcrush functionality needs to be added.

Reply to this email directly or view it on GitHub < https://github.com/timvideos/streaming-system/pull/79#issuecomment-72924927

.

Carl K

Reply to this email directly or view it on GitHub https://github.com/timvideos/streaming-system/pull/79#issuecomment-72932517 .

mithro commented 9 years ago

Just use subprocess.check_call to call pngcrush directly.

CarlFK commented 9 years ago

I don't see a problem with >100 KB images. This is the exception to showing a video, so minimal in comparison.

mithro commented 9 years ago

@CarlFK this takes over the job of the old preview generation script and instead generates no-signal image when there is no video coming through. Hence it needs to produce small PNGs when the signal is coming through.

ApsOps commented 9 years ago

@mithro This is good to go except that we need to make it threaded. Should the whole thing be made threaded or just the preview generation (gstreamer) part?

mithro commented 9 years ago

I'll merge this now. Please another pull request with the threading fixes.