Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New README preview gif #6

Closed
ghost opened this issue Apr 25, 2015 · 18 comments
Closed

New README preview gif #6

ghost opened this issue Apr 25, 2015 · 18 comments

Comments

@ghost
Copy link

ghost commented Apr 25, 2015

[forget those, forgot to update cava; coming soon]

@livibetter
Copy link
Contributor

(caught glimpse of them)

They all look nice. But would they look too dark on GitHub's white background?

Personally, I would like no border or any sort of decoration, just crop the output of cava, with white background. Guess I am that guy whose life is boring.

@ghost
Copy link
Author

ghost commented Apr 25, 2015

http://fat.gfycat.com/TornGrandioseHamadryas.gif
http://giant.gfycat.com/FrightenedGracefulClam.gif
http://fat.gfycat.com/ReflectingEnlightenedCleanerwrasse.gif
http://fat.gfycat.com/BitterRealisticElk.gif

I've made my wallpaper white, but I think contrasting with Github's background (dark terminal background) is a good idea.

@ghost
Copy link
Author

ghost commented Apr 25, 2015

Also, is there any way to insert webms into README.md? I hate the framerate on those gifs.

@ghost
Copy link
Author

ghost commented Apr 25, 2015

@livibetter White terminal background: http://gfycat.com/LiveSimpleElk

@livibetter
Copy link
Contributor

@CelestialWalrus white background with border looks a bit weird. I don't think you can embed webm or any video media in README on GitHub.

@ghost
Copy link
Author

ghost commented Apr 25, 2015

@livibetter Damn, I'll try to get a gif with a higher framerate.

@anko
Copy link
Contributor

anko commented Apr 27, 2015

How's this?

out2

96KiB because magic.

Capture script:

#!/bin/bash
TMP_AVI=$(mktemp /tmp/outXXXXXXXXXX.avi)
ffcast -s % ffmpeg -y -f x11grab -show_region 1 -framerate 30 \
    -video_size %s -i %D+%c -codec:v huffyuv                  \
    -vf crop="iw-mod(iw\\,2):ih-mod(ih\\,2)" $TMP_AVI         \
&& convert -set delay 1x30 -layers Optimize $TMP_AVI out.gif

Method explained here. ffcast's framerate 30 and ImageMagick convert's -set delay 1x30 deliberately mirror each other for 30 FPS.

Went for 30 FPS because it's a neat half of 60, a common screen refresh rate. Many browsers have trouble rendering GIFs with frame delays shorter than 0.2s, and 1/30 = 0.03333⋯, so it's nearly as low as browsers will go.

@livibetter
Copy link
Contributor

I like this one better, but it's @karlstav decision.

If this gets a green light, it might be a good idea to include the script above and probably a comment mentioning the script before where the image embedded in README.md.

@karlstav
Copy link
Owner

@anko verry nice looking gif! But I can see you have the problem with the horizontal lines (or do you prefer them?) If you want to get rid of them try to change the font used in the terminal. Droid sans Mono Regular works fine for me. If that doesn't help you could try a different terminal emulator like gnome-terminal.

@livibetter
Copy link
Contributor

@karlstav @anko it took me a while to figure out what you meant by "horizontal lines." Strangely, the first ones didn't have those lines.

I think if there is an option to deliberately to make sure those lines (or thin gap, so to speak) appear, that'd be nice. Some people might like that effect. If you search for spectrum analyzer for images, you can see both, although those with lines, they seem to be block by block as like LED, not smoothing like cava.

I also think we should have option for terminals that don't not support Unicode and/or color, some people might even prefer pure ASCII and monochrome.

@anko
Copy link
Contributor

anko commented Apr 28, 2015

@karlstav I don't mind the lines, but here's one with only horizontal gaps:

out4

And another with no gaps at all:

out3_wider

Because style is subjective, we could have a separate README section with static screenshots from various people, with the "recipes" used to make them. That should make it clear that cava is customisable.

@livibetter cava already supports pure-ASCII on dumb terminals. Works fine for me on a virtual console. Is that what you mean?


An aside on differences between terminals:

Terminal emulators display text differently and cava is just text. The st terminal keeps a 1-pixel vertical gap between each line. "Zooming" by Increasing or decreasing character spacing causes the gaps to be rounded off in various ways during rendering, each level causing different visual effects, until the lines disappear.

Some examples at different zoom levels:

shot2 shot3
shot4 shot5

In evilvte, the same font at the same size as the first GIF I posted (where the terminal was st) has no vertical gaps, but has horizontal ones:

shot

Don't know why—it's implementation-defined.

@karlstav
Copy link
Owner

@anko wow, looks like you already know heaps more about how the terminal emulators effect cava then I do.

I don't know if character spacing settings is available in other terminal emulators. A separate README section with those four screenshots and how to achieve them with st (and other terminal sw?) would be cool I think.

My personal preference is the one with only vertical lines, so I'm going to go for that in the README.md

In virtual consoles cava uses the included bitmap font (cava.psf), where i have manually changed the characters from 1 to 7 into 1/8 - 7/8 block pieces. So i don't know if a pure ASCII mode is necessary.

@livibetter
Copy link
Contributor

@anko Sorry, my previous comment wasn't written carefully, quite confusing now I read it.

What I meant is an option to specify ASCII-only whether the terminal (not virtual console) support Unicode or not. Some people might want to see ASCII-only, even they use Unicode-supported terminal emulators, and that's that option is for.

As for the gaps, from your well-made screenshots, it seems that's not something we can have full control. I now think we should just leave it there, perhaps adding a NOTES.md or FAQ.md with your screenshots, just in case someone else want to know why there are gaps.

@karlstav Still, some people might just not want to see bars, I am saying is options for styles. But if it's only one style by design, then that's it. Personally, I like the way it is, the current style fits me well.

@karlstav
Copy link
Owner

@livibetter if people want ASCII-only option then we shall give them ASCII-only option. Should be an easy implementation.

I don't really get what you're saying about styles. But as it is now with most standard terminal emulators I have tried (the ones bundled in ubuntu, mint, elementary) it will be with only vertical bars. So as to confuse as few people as possible I will use that gif and add a note about how individual appearance might vary.

@livibetter
Copy link
Contributor

@karlstav Here are two styles that I have seen in some output:

--
--
--  **
--  **

And for Unicode styles, one possibility I can think of, check out drawille. It would look very cool, if we plot the spectrum using Braille characters.

Anyway, maybe we don't have to do the ASCII-only option right now, wait until someone actually creating a feature request.

@karlstav
Copy link
Owner

karlstav commented May 4, 2015

I'm closing this now, thanks for the gif! Who wants to make the video?

@karlstav karlstav closed this as completed May 4, 2015
@ghost
Copy link
Author

ghost commented May 5, 2015

@karlstav I can't get sound to record on my ALSA. And I don't want to use Pulse. Is there any way to record sound directly from mpd's fifo?

@karlstav
Copy link
Owner

karlstav commented May 5, 2015

@CelestialWalrus that should work. I guess the fifo is just RAW audio, so you could output it to a file first

cat /tmp/mpd.fifo > "path to raw audio file"

and then use sox or mplayer to convert it to wav. Maybe mplayer can output it to wav "on the fly" also.

I think what I did for the last video was to use two loopback interfaces and output the audio to both. Use cava on one of them and record from the other. Then you wouldn't hear the audio while you record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants