hzeller / flaschen-taschen

Noisebridge Flaschen Taschen display
GNU General Public License v3.0
196 stars 48 forks source link

send-video: add repeat option & plays each file provided #39

Closed t413 closed 6 years ago

t413 commented 6 years ago

Context: Loading AVCodecContext, AVCodec, AVFormatContext, etc has a pretty large overhead. Adding a simple repeat option to the send-video utility is a nice way to smoothy play looped videos/gifs, and adding multiple file support allows for similarly instant intra-video switching.

I've tested and run these modifications for hours straight with hundreds of different files of different types, it's been super useful!

t413 commented 6 years ago

Thanks @hzeller for the quick feedback! It's been such a goldmine for me and a friend to find your projects.

I went through each of the changes, see what you think! Luckily the 'display' object holds most of the program-option configured state (like x,y offset, etc) so making a PlayVideo function only needed two other stack variables.

Fun note: I'm also working on a commit to add simple audio playing abilities to the program.. compiling VLC is a heinous undertaking and yet still refuses to decode video for me (it will run the simple visualizer though..)

t413 commented 6 years ago

How about an option for -w for wipe display on close. It takes quite a long time to launch a unility like black and opening a new tcp socket just to not awkwardly hold a 90’s sitcom freeze-frame after a video.

hzeller commented 6 years ago

Good idea (though I'd probably name it -c for 'clear`). 90's sitcom stills can be painful :)

t413 commented 6 years ago

If you'd like to keep send-video simple and avoid adding complexity I understand. My ambitions around the project center around adding audio and audio visualization for portable LED art projects and I've created a project to focus on that. I figured it'd be useful to share upstream the changes I'd found helpful so I ported the same changes I'd made to video-player

hzeller commented 6 years ago

Thanks, I think this is a good start. If you want, I am happy if you add audio :)