mvarhola / comfy-channel

A 24/7 live video broadcast with automatic content selection and overlays using FFMPEG and Python!
62 stars 20 forks source link

Merging changes from Unicorn (without some tweaks) #11

Closed TheDerpySage closed 2 years ago

TheDerpySage commented 3 years ago

Sorry I would've done the previous one in this merge as well if I'd known my curiosity would get me this far...

Added two flags for use -l for Looping, default behavior is now not to loop the playout.ini -p PLAYOUT_FILE to define an ini file, default behavior just reads playout.ini

I added these I personally wanted the ability to launch streams unattended through other processes, and figured it was widely applicable.

Moved playing a file from the client to its own function (for reuse), and added the bumper feature. I'd noticed finally that this was largely unused, so I tried my hand at implementing it. I made 'bump_chance' a float when being read in since it made sense to cast it there rather than in my if statement. Added the bumpers/ folder, with three random ones found on https://www.bumpworthy.com for testing purposes.

I kind of don't like that the last regular mediaitem has a chance to trigger the bumper right before the upnext, but I figured it wasn't bad enough to try to plan around.

Let me know if you have any questions or concerns.

TheDerpySage commented 3 years ago

Also I plan on making some improvements to the playout config, including allowing for single files, and sequential playback rather than shuffling whats in a dir along with some other options for my own use.

I can merge those too, if you'd like.

TheDerpySage commented 3 years ago

ALSO Alternatively we could make looping default behavior and make it so theres a flag for only playing through once...

TheDerpySage commented 3 years ago

Fixed an issue with consecutive retries not being used correctly, and updated the play_item logic. Also decided to fix bumps playing on the last regular item in a playlist. Other readability changes.

TheDerpySage commented 3 years ago

As of now, this should all be working. all that'd be left is to determine if the -l loop flag should be flipped to a play once flag, and if we should flip the default behavior back to looping.

mvarhola commented 2 years ago

Thank you for your changes! Sorry for taking a while to approve