Recent Posts

1
User Projects / Code Examples / Stream Wireless to Tiny TV
« Last post by jdogmcsteezy-tmp on September 26, 2023, 11:32:33 PM »
Hello,
I purchased the Tiny Tv Kit and would like to modify it and it's firmware to handle wireless streaming. I am thinking I could add the https://tinycircuits.com/products/wifi-tinyshield-atwinc1500 WIFI shield to handle communication to a Pi Zero W with camera.

What do you yall think? Crazy idea? Any gotchas?

Thanks,
Jesse
2
TinyTV & Tiny Video Player / Re: Parameters for ffmpeg conversion
« Last post by RavenWorks on September 24, 2023, 10:22:14 AM »
Yeah, that addresses the problem I was having!  (To be more specific, values that were negligibly close to zero on a normal screen, were flickeringly apparent on the TinyTV as the video compression rounded them up and down from frame to frame -- with this source tweak, that no longer happens, and effectively-black areas now all look basically uniformly black like they should.)   Anecdotally, I have a hunch that colors are slightly more vibrant now too, though I might be imagining that?   Anyway, I definitely approve this change -- that's one less ffmpeg script that I'll need to keep lying around to adapt things for the TV :)
3
TinyTV & Tiny Video Player / Re: Parameters for ffmpeg conversion
« Last post by Ben Rose on September 22, 2023, 04:43:23 PM »
Some LCD initialization values seem to have changed back to some generic values instead of what was recommended by the LCD manufacturer(well, distributor)- I attached an adjusted file that you could throw in your TinySceen library within the firmware source folder. It definitely changes how some colors are displayed, other stuff, not so much- I'm not sure if the change is 'good' or not really. Let me know if you try it.
4
TinyTV & Tiny Video Player / Re: Parameters for ffmpeg conversion
« Last post by Ben Rose on September 22, 2023, 01:47:34 PM »
Hmm.. I think this is most likely an issue at the LCD initialization level or possibly in the JPEGDEC library. Also keep in mind some limitations of a lower cost LCD with 16 bit color, but I do think it can be better. I'll try to look at the initialization today.
5
TinyTV & Tiny Video Player / Re: Parameters for ffmpeg conversion
« Last post by RavenWorks on September 21, 2023, 05:46:39 PM »
out of curiosity, while we're talking about things that don't quite behave normally -- has anyone looked into whether it's handling gamma properly?   I've put some dim videos on there that looked far far too bright/pale and banded, and I had to tweak the levels manually in ffmpeg to get them to look even remotely like they do on my desktop....   but I haven't sat down and investigated it properly yet.
6
TinyTV & Tiny Video Player / Re: Parameters for ffmpeg conversion
« Last post by Ben Rose on September 21, 2023, 05:42:57 PM »
Thanks! I should keep up with this thread with some things I've found recently. We've needed to add some additional audio filters to handle certain input streams, the audio filter portion we're testing looks like:

Code: [Select]
-ac 1 -acodec pcm_u8 -af "volume=0.0dB,aresample=10000,aresample=async=1000,aresample=osf=u8,asetnsamples=n=210:p=0"
The asetnsamples is the important part, 210 is a somewhat arbitrary value that results in about 2 chunks of samples per video frame, which the TV firmware can easily consume. Typically ffmpeg does something like that with the average mp4 input, but some inputs can result in huge chunks of audio spanning many frames, which the TV firmware can't handle.

Somewhat unexpectedly, the conversion to 8 bit seems to lower amplitude on some streams, so it seems like we need to run volumedetect on a resampled stream, for example:

Code: [Select]
ffmpeg -i input.mp4 -vn -ac 1 -af "aresample=10000,aresample=async=1000,asetnsamples=n=210:p=0,aresample=osf=u8,volumedetect" -f null /dev/null

The absolute value of the peak output value can replace the 0.0dB in the first snippet to normalize the way that https://github.com/slhck/ffmpeg-normalize does peak normalization. This seems to get things peak normalized without clipping in the testing we've done.

We do plan to get this integrated into the app but I'm not sure exactly when!
7
TinyTV & Tiny Video Player / Re: Random video position on boot?
« Last post by RavenWorks on September 21, 2023, 05:35:58 PM »
I definitely greatly prefer the random value personally, although I could see someone preferring the resuming feature?   What's the reason for not wanting to give people the option?
8
The datasheet said "6ms bounce, 6ms jitter", so I tried 6ms, and had one bounce in couple dozen tests....  then I realised that the datasheet might be trying to tell me to use 12ms total... and then I said, hell, let's be safe, if the frame rate is so low anyway, and bumped it all the way up to 20 like the power button uses.....    but then even at that point, I still got a single bounce in a few dozen more tests, so I gave up adjusting anything, lol.   So yeah, the exact numbers are a little up for debate (especially since, like I mentioned in the pull request, I realised that there's actually a slight bug, in that it'll wait for the specified duration AFTER the signal settles....  but again, it didn't seem worth worrying about because these amounts are still imperceptibly small, to me.)
9
Well, very cool, sorry you had to put time in on this but I think that's a valid path to let the interrupt states variables run, but only 'keep' the latest change. Did you test this with decreasing timeouts? For example 10ms instead of 20ms? Just out of curiosity as to how much time is needed for your hardware with the more significant issue.

Otherwise, we'll test here and I'll let you know how it goes.

Thanks,
Ben
10
TinyTV & Tiny Video Player / Re: Random video position on boot?
« Last post by Ben Rose on September 21, 2023, 05:10:41 PM »
Hey thanks! Looks good and well thought out, so I pulled it in- I think we might change some of the high level stuff, I think we want just one setting for this feature and will either default to the random startup time or 'resume' time etc, but I'm not sure what the outcome will be yet.
SMF spam blocked by CleanTalk